Multi-agent dynamic task integrated allocation method and system

By constructing an emotion-memory resonance map and intention attractive field, dynamically scheduling multi-agent system is solved, and a more accurate task allocation and personalized intervention are achieved.

CN120336035AActive Publication Date: 2025-07-18GUANGDONG DIGITAL IND INTELLIGENT TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

When the existing psychological dialogue system faces the situation of interweaving multiple emotions and multiple cognitive goals, it is difficult to dynamically identify the task evolution path, and lacks the 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 functional drive grouping unit, and perform agent scheduling in combination with the intention attraction force field, realizing integrated allocation of dynamic tasks for multiple agents.

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 CN120336035A_ABST
    Figure CN120336035A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of intelligent psychological counseling, and provides a multi-agent dynamic task integrated allocation method and system, and the method comprises the steps: extracting user historical semantic memory fragments through a long-term memory agent, and constructing a memory node set; obtaining current and historical emotional states of a user by an emotion analysis agent, and constructing an emotion node set; based on the semantic correlation and emotion similarity between the memory node set and the emotion node set, constructing an emotion-memory resonance map; according to the type of a resonance mode in the atlas, activating a corresponding function to drive a marshalling unit; and an intention attraction field is constructed according to the state change of the resonance spectrum in the time dimension, and is used for dynamically guiding the task to flow to the current intention node with the most active degree, and scheduling distribution is carried out on the corresponding intelligent agent in the function-driven marshalling 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 in particular relates to a multi-agent dynamic task integrated allocation method and system. Background Art

[0002] In recent years, with the development of artificial intelligence, natural language processing and human-computer interaction technology, intelligent dialogue systems for mental health have gradually been applied to scenarios such as emotion recognition, psychological assessment and emotional counseling, especially in psychological support, psychological assessment and intervention services for primary and secondary school students, showing a rapid development trend. Multi-round dialogue and continuous interaction have become important means to obtain user psychological information, evaluate emotional changes and generate intervention suggestions, promoting the transformation of intelligent psychological services from static assessment to dynamic companionship.

[0003] In the existing technology, common psychological dialogue systems mostly use a single model architecture, combining keyword matching, sentiment classification and rule recommendation to achieve preliminary psychological state judgment and suggestion generation. For example, some systems use sentiment dictionaries and emotion recognition models to identify the type of emotion expressed by users, and then use templates to generate comforting sentences or push meditation practice resources. Some systems divide emotion recognition, semantic analysis and resource recommendation into multiple modules, and perform each task in a fixed process sequence to form a basic psychological dialogue process.

[0004] However, existing technologies generally have problems such as single modeling of user psychological states and insufficient support for multi-task scheduling mechanisms. Specifically, the current system is difficult to simultaneously handle the intertwined situations of multiple emotions and multiple cognitive goals in user expressions, lacks the ability to integrate emotional states with historical semantic information, cannot dynamically identify task evolution paths, and lacks a scheduling mechanism for multi-agent response grouping based on psychological state changes, resulting in rigid responses, insufficient personalization, and limited intervention effects in multiple rounds of dialogue. 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: 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 emotional node set; Step S20, constructing an emotion-memory resonance graph based on the semantic correlation and emotion similarity between the memory node set and the emotion node set, wherein the resonance graph is a heterogeneous graph structure including memory nodes and emotion nodes, and the weight of its edge represents the psychological resonance strength between the connected nodes; Step S30: Identify the emotional island region, memory high-frequency activation fragments, or memory-emotion conflict paths in the resonance map, and activate the corresponding function-driven grouping units according to the type of resonance pattern in the map. The function-driven grouping units include at least two agents that are functionally heterogeneous; Step S40: Construct an intention attraction field based on 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 schedule and allocate the corresponding agents in the function-driven grouping unit based on the attraction field.

[0006] Furthermore, step S10 includes the following sub-steps: Step S101: The long-term memory agent extracts the user's multi-round conversation corpus in the past, encodes the semantic content with psychological significance therein, and generates a semantic representation vector; Step S102: Screen representative semantic fragments through semantic clustering or attention mechanism to form a candidate set of memory nodes; Step S103: The sentiment analysis agent identifies the emotional state in the user's 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. The emotion node contains at least one emotion label and its corresponding emotion intensity index.

[0007] Furthermore, 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: Construct connection edges based on the semantic similarity and emotion co-occurrence factor, and calculate the psychological resonance intensity using a weighted formula; Step S203: Use the memory nodes and emotion nodes as a heterogeneous node set, and the psychological resonance intensity as the edge weight to construct an emotion-memory resonance map in the form of a heterogeneous graph structure.

[0008] Furthermore, step S30 includes the following sub-steps: Step S301: Identify the emotion nodes with the number of connection edges less than the set threshold in the resonance map, and mark them as emotion island nodes; Step S302: Identify the memory nodes that are frequently activated in the recent N conversations. If the node forms a high-resonance intensity connection with multiple emotion nodes, mark it as a memory high-frequency activation fragment; 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: According to the identified resonance pattern type of the spectrum, activate the function-driven grouping unit corresponding to this type. The grouping unit includes at least two agents with different task response capabilities.

[0009] Further, step S40 includes the following sub-steps: Step S401: Construct a sequence diagram set from the resonance spectrum in the form of time slices, and extract the activity changes of each node. Step S402: Cluster the nodes based on the activity changes to form candidate regions of task intentions, and identify the set of intention nodes. Step S403: Calculate the attraction values of each intention node. The attraction function includes the weighted sum of the mean resonance intensity, the increment of node activity, and the user feedback priority. Step S404: Sort according to the attraction values, select the intention node with the greatest attraction as the current task target, and schedule the agents with corresponding capabilities in the function-driven grouping unit to execute task responses.

[0010] On the other hand, the present invention also provides a multi-agent dynamic task integrated allocation system, which includes the following modules: Memory and emotion node construction module, which is used to extract the user's historical semantic memory fragments by the long-term memory agent to construct a set of memory nodes, and obtain the user's current and historical emotional states by the emotion analysis agent to construct a set of emotion nodes. Resonance spectrum construction module, which is used to construct an emotion-memory resonance spectrum based on the semantic correlation and emotional similarity between the set of memory nodes and the set of emotion nodes. The resonance spectrum is a heterogeneous graph structure containing memory nodes and emotion nodes, and the weight of its edges represents the psychological resonance intensity between the connected nodes. Resonance pattern recognition and grouping module, which is used to identify emotion island regions, memory high-frequency activation fragments, or memory-emotion conflict paths in the resonance spectrum, and activate the corresponding function-driven grouping unit according to the type of resonance pattern in the spectrum. The function-driven grouping unit includes at least two agents that are functionally heterogeneous. Intention attraction and agent scheduling module, which is used to construct an intention attraction field according to the state change of the resonance spectrum in the time dimension, dynamically guide the task flow to the currently most active intention node, and schedule and allocate the corresponding agents in the function-driven grouping unit based on the attraction field.

[0011] Further, the memory and emotion node construction module includes: Semantic encoding module, which is used to extract the user's multi-round dialogue corpus by the long-term memory agent, encode the semantic content with psychological significance therein, and generate a semantic representation vector. A 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; An emotion recognition module, which is used to recognize the emotional state in the user's current input and historical input by an emotion analysis agent and construct an emotion embedding vector; An emotion classification module, which is used to classify emotion information based on timestamp, emotion category and expression intensity to generate an emotion node set. An emotion node includes at least one emotion label and its corresponding emotion intensity index.

[0012] Further, the resonance map construction module includes: A similarity calculation module, which is used to calculate the semantic similarity and emotion co-occurrence factor between each memory node and emotion node; A resonance intensity calculation module, which is used to construct connection edges based on semantic similarity and emotion co-occurrence factor and calculate the psychological resonance intensity using a weighted formula; A heterogeneous graph generation module, which is used to construct an emotion-memory resonance map in the form of a heterogeneous graph structure with memory nodes and emotion nodes as a heterogeneous node set and psychological resonance intensity as the edge weight.

[0013] Further, the resonance pattern recognition and grouping module includes: An emotion island recognition module, which is used to recognize emotion nodes with the number of connection edges less than a set threshold in the resonance map and mark them as emotion island nodes; A high-frequency memory recognition module, which is used to recognize memory nodes that are frequently activated in the recent N conversations. If the node forms high-resonance intensity connections with multiple emotion nodes, it is marked as a memory high-frequency activation fragment; A conflict path recognition module, which 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; A grouping unit activation module, which is used to activate a function-driven grouping unit of the corresponding type according to the recognized resonance pattern type of the map. The grouping unit includes at least two intelligent agents with different task response capabilities.

[0014] Further, the intention attraction and intelligent agent scheduling module includes: A map slice analysis module, which is used to construct a sequence graph set in the form of time slices for the resonance map and extract the activity changes of each node; An intention clustering module, which is used to cluster nodes based on activity changes to form a candidate area of task intention and identify an intention node set; An attraction calculation module, which is used to calculate the attraction value of each intention node. The attraction function includes the weighted sum of the mean resonance intensity, node activity increment and user feedback priority; A target selection module, configured to select, according to the sorting of attraction values, the intention node with the greatest attraction as the current task target; An agent scheduling module, configured to schedule the agents with corresponding capabilities in the function-driven grouping unit to execute task responses. By constructing an emotion-memory resonance map, the present invention realizes a structured expression of the linkage relationship between the user's emotional state and historical semantic memory, enabling the system to more deeply understand the user's psychological evolution process and improving the recognition ability of potential task intentions in multi-round conversations. Through the resonance analysis of the memory nodes and emotion nodes in the map, the system can dynamically capture the key trigger points in the psychological state, providing a clear basis for task generation and response.

[0015] Furthermore, the present invention further introduces an intention attraction field mechanism, which can accurately locate the intention node with the most psychological response value at present according to the evolution trend of the map in the time dimension, so as to realize the dynamic transfer and priority sorting of multiple tasks. Through this mechanism, the system can effectively avoid problems such as task mismatch and response delay, and improve the accuracy and efficiency of agent task scheduling.

[0016] Furthermore, the function-driven grouping unit constructed by the present invention realizes a flexible collaborative response mechanism among multiple function heterogeneous agents, which can be adaptively combined according to different psychological resonance modes to participate in task execution. This mechanism enhances the system's adaptability to complex psychological states and the intervention coverage, and helps to improve the intelligence, stability and user satisfaction of the psychological dialogue system. Brief Description of the Drawings

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0018] Figure 1 is a flowchart of the method of the present invention; Figure 2 is a system block diagram of the present invention. Detailed Embodiments

[0019] The following will make a preferred description of the invention in combination with the drawings and specific embodiments.

[0020] This embodiment solves the above problems through the following steps: In one embodiment, refer to Figure 1, the present invention provides a multi-agent dynamic task integrated allocation method, which realizes a multi-agent dynamic task integrated allocation method for dynamic recognition, scheduling and joint execution of complex psychological tasks or cognitive tasks under the cooperation of multiple types of agents.

[0021] In the present invention, an agent refers to a functional module with the capabilities of autonomous perception, task execution and collaborative interaction, and is used to complete specific types of subtasks in an artificial intelligence psychological dialogue system. Each agent can independently analyze and process user input by invoking its embedded models, algorithms or knowledge bases, and exchange information and collaborate on tasks with other agents according to task requirements, so as to jointly realize the evaluation, intervention and recommendation generation of the user's mental state.

[0022] In the present invention, in order to realize a multi-agent dynamic task integrated allocation method, it is specifically realized through the following steps: Step S10: The long-term memory agent extracts the user's historical semantic memory fragments to construct a memory node set; the emotion analysis agent obtains the user's current and historical emotional states to construct an emotion node set.

[0023] In a multi-agent psychological dialogue system, in order to realize the personalized generation of tasks and the precise matching of agents, it is necessary to jointly model the user's historical semantic information and emotional state. For this purpose, it is necessary to construct a "memory node set" representing the user's long-term memory information and an "emotion node set" describing the current mental state respectively, so as to provide semantic-emotional dual-mode support for the subsequent construction of the task graph, intention prediction and agent scheduling. This processing step realizes the structured expression of multi-dimensional mental states by converting historical semantic content and current emotional states into node forms of a graph structure, and further supports the system's temporal modeling of the user's mental trajectory and the multi-agent grouping response.

[0024] 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 the user's long-term interaction information. Its core function is to extract the user's historical semantic content, establish a memory representation structure, and retrieve and provide support information for relevant memories when needed, so as to improve the system's understanding ability of the user's behavior patterns and mental states, and enhance the personalization and context relevance of dialogue generation or task recommendation.

[0025] The long-term memory agent mimics 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: Typical event descriptions (such as "I was bullied in primary school"); Recurring themes (such as "I'm afraid of facing exams"); The association between emotion and semantics (such as "I feel very low every time my mother is mentioned").

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

[0027] Memory nodes refer to semantic units extracted by the long-term memory agent, which are used to represent the psychologically indicative semantic content in the user's historical interaction content, including but not limited to key events, dialogue summaries, topic fragments, etc.

[0028] Emotion nodes refer to emotion labels or emotion embedding vectors identified by the sentiment analysis agent, which are used to depict the emotion fluctuation characteristics in the user's current or historical conversations, and can reflect the evolution of the user's mental state.

[0029] In one implementation of step S10, it includes the following sub-steps: Step S101, obtain the user's historical interaction data through the long-term memory agent, perform semantic encoding on the historical dialogue text using natural language processing techniques (such as pre-trained language models like BERT, RoBERTa, etc.), and extract the key semantic content. Specifically, use the sliding window mechanism to traverse the user's past multi-round dialogue fragments, represent each text with significant semantics as a semantic vector, calculate the semantic similarity and cluster by topic to obtain the representative semantic cluster center as the memory node candidate.

[0030] Step S102, screen the memory node candidates, set weight thresholds according to factors such as the matching degree of the current input semantics and the user usage frequency, select the semantic units that meet the conditions, and form the final memory node set. Optional implementation schemes include: using the attention mechanism to calculate the importance score of each node for the current input, and selecting the Top-K scoring items as memory nodes; or using the semantic distribution based on the topic model (such as LDA) to select high-confidence semantic topics.

[0031] Step S103, the sentiment analysis agent models the user's current input and historical emotion sequence, uses a fine-grained sentiment classification model (such as the TextCNN+BiLSTM structure) to label the emotion of each round of speech or text input, and extracts the emotion embedding vector. Emotion categories include but are not limited to anxiety, pleasure, depression, oppression, anger, confusion, etc.

[0032] Step S104, use each type of emotion embedding vector as the feature representation of the emotion node, divide the emotion trend region through a clustering algorithm (such as DBSCAN), and construct the emotion node set. The emotion node not only retains the original emotion type, but also contains the corresponding timestamp and context association strength.

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

[0034] 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 graphs and the intelligent agent scheduling mechanism.

[0035] Specifically, taking the user "Xiaolin" as an example, in his previous 5 psychological conversations, he has repeatedly mentioned content related to "entrance anxiety", "social avoidance", and "academic pressure". The system extracts three core memory nodes through the long-term memory intelligent agent, which are respectively marked as M1 (entrance anxiety), M2 (social avoidance), and M3 (academic pressure). At the same time, the sentiment analysis intelligent agent recognizes that the intonation and text expression in his current input show a "low" emotional trend, and combines the historical records to identify a long-term "alternating anxiety-low" emotional pattern, forming an emotion node set E1 (low), E2 (anxiety).

[0036] Step S20: Based on the semantic correlation and emotional similarity between the memory node set and the emotion node set, construct an emotion-memory resonance graph. The resonance graph is a heterogeneous graph structure containing memory nodes and emotion nodes, and the weight of its edges represents the psychological resonance intensity between the connected nodes.

[0037] In a multi-intelligent agent psychological dialogue system, to achieve effective perception, expression, and collaborative response of the user's psychological state among intelligent agents, a structured psychological state representation method needs to be established to reveal the correlation between the user's long-term semantic memory and emotional fluctuations. This step aims to jointly model the memory node set and the emotion node set constructed in the previous stage, and express the coupling strength between the two through a graph structure, forming an "emotion-memory resonance graph". This graph can not only reflect the emotional activation state in the current conversation, but also reveal the ability of a specific emotion to evoke past memory content, thereby supporting subsequent task intention prediction and multi-intelligent agent scheduling decisions.

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

[0039] The emotion-memory resonance graph is a graph model proposed in the present invention for structurally representing the linkage relationship between emotional factors and long-term semantic memory in the user's psychological state, aiming to provide a computational basis for multi-intelligent agents to accurately perceive the user's psychological trajectory and task collaborative scheduling.

[0040] This atlas constructs "memory nodes" and "emotion nodes" as two types of core nodes in a heterogeneous graph, and establishes weighted connection edges based on the semantic correlation and emotion activation relationship between the two, forming a multi-dimensional graph structure with semantic-emotional coupling characteristics, so as to express the dynamic resonance pattern between the user's current mental state and past mental events.

[0041] The human mental state has the characteristic of high linkage between long-term memory and short-term emotion. For example, specific emotional states (such as anxiety, anger) often activate the memory of related past events. In a psychological intervention task, if the system can accurately identify the memory content evoked by a certain emotion, it can provide more personalized dialogue strategies and intervention suggestions.

[0042] Based on this cognitive mechanism, the present invention designs an emotion-memory resonance atlas, which depicts the resonance intensity between the current emotional state and historical semantic fragments through a graph structure, and drives subsequent task generation, intention recognition, and collaborative execution of the agent group.

[0043] In one implementation of step S20, it includes the following sub-steps: 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 can be used to encode the original semantic text (such as BERT, RoBERTa, ERNIE, etc.) to obtain the high-dimensional vector representation of each node. This semantic vector is denoted as where d represents the vector dimension and m represents the memory node number.

[0044] Step S202, based on the emotion node set generated in step S10, extract the emotion embedding vector of each emotion node. The emotion embedding can be generated by a multi-label emotion recognition model (such as BiLSTM-CNN+attention or RoBERTa+MLP classifier) to recognize the user's current input emotion, and at the same time use the representation vector before the intermediate layer or classification output layer of the model as the emotion embedding vector, denoted as , where e represents the emotion node number, and the vector dimension is the same as that of the memory vector.

[0045] Exemplarily, the historical dialogue fragment of user "Xiaolin" is: "I always can't sleep before exams and get anxious when thinking about tomorrow's exam", and the current dialogue is: "My sleep has gotten worse recently, and I'm starting to worry about future things."

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

[0047] When obtaining the emotional node vector, based on "My sleep has gotten worse recently, and I'm starting to worry about future things", perform sentiment analysis model prediction, its emotional label is "anxiety", and at the same time extract the emotional embedding vector for output.

[0048] Step S203, calculate the psychological resonance intensity for each pair of memory nodes m and emotional nodes e .

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

[0050] where sim(⋅,⋅) represents the cosine similarity function, which is used to measure the similarity degree between two vectors in the semantic space, and its value range is [−1,1]; represents whether there is a co-occurrence relationship between the memory node and the emotional node in time, and its value is 0 or 1, which can be judged by the time window strategy; α and β are adjustable weight coefficients, satisfying α + β = 1.

[0051] Optional implementation schemes include: using the dot product to replace the cosine similarity function to enhance the resonance directionality, or dynamically learning the weights α and β through the Transformer attention mechanism.

[0052] Step S204, establish a graph structure connection for all memory nodes and emotional nodes. The memory nodes and emotional nodes are used as the node set of the heterogeneous graph, and the edge weight between the nodes is the resonance intensity . The constructed graph structure is denoted as , where is the memory node set, is the emotional node set, represents the weighted edge set.

[0053] Step S205, perform normalization processing on the graph structure, including node encoding, edge weight normalization, and graph representation format conversion. The normalization method can be min-max normalization or Softmax normalization for subsequent use in graph convolution calculations or task scheduling strategies.

[0054] The emotion-memory resonance graph constructed through the above steps can effectively express the linkage relationship between different dimensional information in the user's psychological structure, not only improving the system's structured modeling ability for complex psychological states, but also enhancing the response accuracy of subsequent intelligent agent task grouping and intention prediction. The introduction of this graph structure enables the system to have the ability to understand the global context, which helps with the evolutionary expression of tasks and the structured scheduling of multi-intelligent agents.

[0055] Exemplarily, the user "Xiaolin" mentioned "feeling anxious due to exam failure" in his historical semantic memory node M1, and the emotion node E1 in the current conversation was identified as the "anxious" state by the sentiment analysis agent. Through semantic similarity calculation, it is obtained that , E1 and M1 co-occur in time, then , if α = 0.7 and β = 0.3, the final resonance intensity . Based on this, the system establishes a high-strength connection relationship between M1 and E1 and uses it for subsequent task intention recognition and agent scheduling.

[0056] Step S30: Identify the emotional island area, memory high-frequency activation segment or memory-emotion conflict path in the resonance map, and activate the corresponding function-driven grouping unit according to the type of resonance pattern in the map. The function-driven grouping unit includes at least two agents that are functionally heterogeneous.

[0057] To improve the response ability of the multi-agent psychological dialogue system to the complex psychological states of users, it is necessary to identify the current potential psychological task type based on the structural characteristics in the "emotion-memory resonance map" and dynamically activate the appropriate agent cluster based on the recognition result. The core of this step is to judge what kind of psychological state structure mode the current user is in through map pattern recognition, such as whether there are isolated high-risk emotions, repeatedly activated cognitive themes, or inconsistent paths between emotions and memories. According to different types of psychological states, the system needs to select agents with complementary functions for combination to form a function-driven grouping unit, so as to complete the division of labor and collaborative execution of subsequent tasks. This mechanism can ensure that the system has the ability to respond quickly and intervene accurately when facing different types of psychological tasks.

[0058] In the present invention, the emotional island area refers to an emotion node in the resonance map that is connected to only a few or no memory nodes, usually indicating the emotional fluctuations of the user with short-term high intensity but not supported by cognitive content.

[0059] The memory high-frequency activation segment refers to a memory node that is repeatedly connected to multiple emotion nodes, reflecting the highly sensitive or repeatedly thought cognitive themes in the user's mental activities.

[0060] The memory-emotion conflict path refers to a memory node that is connected to multiple emotion nodes and the corresponding emotion labels are contradictory or have drastic changes, which may represent the decoupling or conflict between cognition and emotion.

[0061] The function-driven grouping unit refers to a temporary collaborative task execution cluster composed of multiple agents with heterogeneous functions, which is used to execute different task processes according to different psychological resonance patterns. For example, the island area, memory high-frequency activation segment, and memory-emotion conflict path respectively correspond to different function-driven grouping units.

[0062] In one implementation of step S30, it includes the following sub-steps: Step S301: Conduct a traversal analysis on the emotion-memory resonance graph, and count the number of connection edges and the total edge weight between each emotion node and memory node. For emotion nodes with the number of edges less than the set threshold τ and the edge weight sum lower than the average value μ, they are marked as emotion isolated island nodes. The system defines the sub-graph area where this node belongs as the emotion isolated island area.

[0063] Step S302: Analyze the out-edge weight distribution of memory nodes. If a certain memory node has strong connections with the current emotion node in the recent k conversations, that is, the resonance intensity is greater than the preset threshold θ for all, and this node forms connections with multiple different emotion nodes, then it is marked as a memory high-frequency activation segment. Optional implementation schemes include: statistically counting the node activation frequency based on a sliding window mechanism or using an exponential decay function to weighted update the activation frequency.

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

[0065] Step S304: According to the identified graph resonance mode type, determine the corresponding functional drive grouping unit type: For the emotion isolated island area, activate a guidance type grouping unit including an emotion analysis agent and a recommendation agent, which is used to guide emotion expression.

[0066] For the memory high-frequency activation segment, activate a focus type grouping unit including a long-term memory agent and a summary agent, which is used to integrate historical themes.

[0067] For the memory-emotion conflict path, activate a reconciliation type grouping unit including an emotion analysis agent and a long-term memory agent, which is used to identify cognitive conflicts and generate emotion regulation suggestions.

[0068] At least two functionally different agents are included in the grouping unit, and they complete division of labor and cooperation through an asynchronous or synchronous communication mechanism during task execution.

[0069] Through the above steps, the system can identify the psychological imbalance area in the structure of the emotion-memory resonance map, and automatically select the appropriate combination of agents for targeted processing accordingly, significantly improving the flexibility, adaptability and intervention accuracy of the multi-agent system in dealing with complex psychological states. This method avoids the deficiencies in traditional psychological dialogue systems that rely solely on single emotion judgment or static semantic matching, and realizes a closed-loop scheduling chain of "emotion trigger - structure recognition - agent collaboration".

[0070] Specifically and exemplarily, in the psychological dialogue case of "Xiaolin", at the current anxiety emotion node E1, the system detects that this node only establishes a weak connection with one historical memory node M2, and no resonance relationship is formed with other memory nodes, and the connection edge weight is lower than the system average. This phenomenon is marked as an "emotional island". Further analysis reveals that the historical semantic themes represented by M2 and M4 connected to E1 are "excessive stress caused by exam failure" and "winning applause at the sports meeting", respectively, and their corresponding historical emotion labels are "depression" and "pride", and the emotional polarities between the two are significantly opposite. Based on this, the system judges that there is a "memory-emotion conflict path" in the current graph structure. To sum up, the system identifies that there are two types of resonance patterns, namely "emotional island" and "conflict path", in the current user's psychological state, automatically activates a reconciliation type grouping unit including a sentiment analysis agent and a recommendation agent, executes a joint task mainly focused on emotion clarification and emotion resource guidance, and generates a guiding statement "You just mentioned your recent anxiety. In fact, there are also many experiences that you can be proud of. Maybe we can start from these positive experiences and adjust your current stress emotion together".

[0071] Step S40: Construct an intention attraction field based on 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 schedule and allocate the corresponding agents in the function-driven grouping unit based on the attraction field.

[0072] In the multi-agent psychological dialogue system, the user's psychological state has obvious dynamic evolution characteristics, and its emotion and cognitive structure change continuously with the progress of the dialogue, resulting in changes in the types of tasks and psychological goals that the system needs to respond to in different time periods. To achieve dynamic adaptation and priority sorting of task allocation, a task-driven mechanism needs to be introduced based on the time evolution of the resonance map. For this purpose, in this step, by constructing an "intention attraction field", an attraction model is established for all potential task goals, the intention node with the most psychological response value in the current stage is identified, and based on this, the agents in the function-driven grouping unit are driven for optimal scheduling and resource allocation.

[0073] The intention attraction field refers to a vector field calculated by the system based on factors such as the user's current mental state, resonance intensity, and node activity. It is used to measure the attraction ability of each intention node to the task flow. The larger the value, the more suitable the node is to be preferentially scheduled as the task execution target at present.

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

[0075] In a specific implementation, step S40 includes the following sub-steps: Step S401: Serialize the emotion-memory resonance map constructed in the previous step along 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 active trend of the node is identified. The activity can be calculated by the following formula:

[0076] where, represents the activity increment of node i at time t; represents the set of adjacent nodes connected to node i; represents the resonance intensity between node i and j at time t.

[0077] Step S402: According to the activity index, select a group of nodes that meet the activity growth threshold and construct them into an intention candidate set. Cluster these candidate nodes in the semantic space to form an intention node set .

[0078] Optional implementation schemes for the clustering method include: using the KMeans algorithm to divide the node vector representation, or performing density division based on the connected subgraph structure of the graph.

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

[0080] where, represents the average resonance intensity of all edges in the intention node ; Indicates the change in the activity of the intention node in the time dimension; Indicates the user feedback priority or historical effect score of the task corresponding to the intention; Is the normalization weight, satisfying .

[0081] Step S404, select the set of intention nodes with the current maximum attraction in the intention attraction field as the task target, map the task type bound to the intention node to the corresponding function-driven grouping unit. Schedule the corresponding type of agent into the task scheduling pool according to the mapping relationship. Prioritize scheduling the agents required for the target with the highest attraction, and the remaining agents are used as alternatives, arranged in descending order.

[0082] Step S405, output the intention node with the current highest attraction to the task allocation module, and the allocation module performs parameter initialization and context binding on the activated agents to complete the task collaboration preparation.

[0083] By constructing an intention attraction field based on time changes, not only can the focus of the user's current psychological goal be dynamically tracked, but also the continuous control and priority sorting of the task flow can be realized, effectively avoiding the situations of agent response delay, task mismatch or resource redundancy in the traditional system, and improving the intelligent response ability, real-time intervention ability and task execution efficiency of the multi-agent system in the dynamic psychological scenario.

[0084] Exemplarily, in the psychological dialogue scenario of "Xiaolin", in the previous round, the system recognized 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", and this theme formed a dense connected subgraph in the semantic graph. The system accordingly identified this area as the intention node I1. Another theme is "past failure experiences", corresponding to the intention node I2, and its activity change is relatively small. The system calculates through the attraction function to obtain , , and accordingly judges that the task most needed by the user currently is "emotional counseling for the future". The system automatically schedules the sentiment analysis agent and the recommendation agent into the task collaboration execution process, and generates a system prompt: "You just mentioned that you are worried about the future, which may be related to the recent changes you have experienced. You might as well try some methods to help reduce the sense of uncertainty. We can take a look at the suitable practice resources together."

[0085] See Figure 2 , in another embodiment, the present invention also provides a multi-agent dynamic task integrated allocation system, including: A memory and emotion node construction module, which is used to extract historical semantic memory fragments of the user by a long-term memory agent to construct a memory node set, and obtain the current and historical emotional states of the user by an emotion analysis agent to construct an emotion node set; A resonance map construction module, which is used to construct an emotion-memory resonance map based on the semantic correlation and emotional similarity between the memory node set and the emotion node set. The resonance map is a heterogeneous graph structure containing memory nodes and emotion nodes, and the weight of the edge represents the psychological resonance intensity between the connected nodes; A resonance pattern recognition and grouping module, which is used to identify emotion island regions, memory highly activated fragments or memory-emotion conflict paths in the resonance map, and activate corresponding function-driven grouping units according to the type of resonance pattern in the map. The function-driven grouping unit includes at least two functionally heterogeneous agents; An intention attraction and agent scheduling module, which is used to construct an intention attraction field according to the state change of the resonance map in the time dimension, dynamically guide the task flow to the currently most active intention node, and schedule and allocate the corresponding agents in the function-driven grouping unit based on the attraction field.

[0086] In a further implementation, the memory and emotion node construction module includes: A semantic encoding module, which is used to extract the user's past multi-round dialogue corpus by a long-term memory agent, encode the semantic content with psychological significance therein, and generate a semantic representation vector; A semantic screening module, which is used to screen representative semantic fragments through semantic clustering or attention mechanism to form a memory node candidate set; An emotion recognition module, which is used to recognize the emotional state in the user's current input and historical input by an emotion analysis agent to construct an emotion embedding vector; An emotion classification module, which is used to classify emotion information based on timestamp, emotion category and expression intensity to generate an emotion node set. An emotion node includes at least one emotion label and its corresponding emotion intensity index.

[0087] In a further implementation, the resonance map construction module includes: A similarity calculation module, which is used to calculate the semantic similarity and emotion co-occurrence factor between each memory node and emotion node; A resonance intensity calculation module, which is used to construct a connection edge based on the semantic similarity and emotion co-occurrence factor, and calculate the psychological resonance intensity by using a weighted formula; A heterogeneous graph generation module, which is used to construct an emotion-memory resonance map in the form of a heterogeneous graph structure with memory nodes and emotion nodes as heterogeneous node sets and psychological resonance intensity as edge weights.

[0088] In a further implementation, the resonance mode recognition and grouping module includes: An emotional island recognition module, configured to identify emotional nodes with the number of connected edges less than a set threshold in the resonance map and mark them as emotional island nodes; A high-frequency memory recognition module, configured to identify memory nodes that are frequently activated in the recent N conversations. If such a node forms high-resonance-intensity connections with multiple emotional nodes, it is marked as a memory high-frequency activation segment; A conflict path recognition module, configured to compare the historical emotional polarities of multiple memory nodes associated with a single emotional node. If there are obvious emotional conflicts, a memory-emotion conflict path is constructed; A grouping unit activation module, configured to activate a function-driven grouping unit of the corresponding type according to the recognized resonance mode type of the map. The grouping unit includes at least two intelligent agents with different task response capabilities.

[0089] In a further implementation, the intention attraction and intelligent agent scheduling module includes: A map slice analysis module, configured to construct a sequence map set in the form of time slices for the resonance map and extract the activity changes of each node; An intention clustering module, configured to cluster nodes based on the activity changes to form candidate regions for task intentions and identify a set of intention nodes; An attraction calculation module, configured to calculate the attraction values of each intention node. The attraction function includes the weighted sum of the mean resonance intensity, the node activity increment, and the user feedback priority; A target selection module, configured to select the intention node with the greatest attraction as the current task target according to the sorted attraction values; An intelligent agent scheduling module, configured to schedule the intelligent agents with corresponding capabilities in the function-driven grouping unit to perform task responses.

[0090] It should be noted that the explanatory descriptions of the foregoing embodiments of the multi-intelligent-agent dynamic task integrated allocation method also apply to the device of the embodiments of the present application and will not be elaborated herein.

[0091] Those of ordinary skill in the art can realize that the units and algorithm steps described in the embodiments disclosed herein can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present application.

[0092] Those skilled in the art can 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 foregoing method embodiments, and will not be elaborated herein.

[0093] In several embodiments provided in the present 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 such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (hereinafter referred to as ROM), random access memory (hereinafter referred to as RAM), magnetic disks, or optical discs that can store program codes.

[0094] The above is only the specific implementation manner of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all should be covered by the protection scope of the present application. For the part of the module structure that is not specifically defined in the present invention, the content recorded in the prior art shall prevail. The prior art mentioned in the foregoing background art part and the specific embodiment part of the present invention can be used as a part of the present invention 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 includes the following steps: Step S10: The long-term memory agent extracts the user's historical semantic memory fragments to construct a memory node set; the sentiment analysis agent obtains the user's current and historical emotional states to construct an emotion node set; Step S20: Based on the semantic correlation and emotional similarity between the memory node set and the emotion node set, construct an emotion-memory resonance map. The resonance map is a heterogeneous graph structure containing memory nodes and emotion nodes, and the weight of its edges represents the psychological resonance intensity between the connected nodes; Step S30: Identify emotion island regions, memory high-frequency activation fragments, or memory-emotion conflict paths in the resonance map, and activate the corresponding function-driven grouping unit according to the type of resonance pattern in the map. The function-driven grouping unit includes at least two agents that are functionally heterogeneous; Step S40: Construct 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 schedule and allocate the corresponding agents in the function-driven grouping unit based on the attraction field.

2. The multi-agent dynamic task integrated allocation method according to claim 1, characterized in that The step S10 includes the following sub-steps: Step S101: The long-term memory agent extracts the user's past multi-round conversation corpus, encodes the semantic content with psychological significance therein, and generates a semantic representation vector; Step S102: Screen representative semantic fragments through semantic clustering or attention mechanism to form a memory node candidate set; Step S103: The sentiment analysis agent identifies the emotional states in the user's current input and historical inputs, 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. The emotion node includes at least one emotion label and its corresponding emotion intensity index.

3. The multi-agent dynamic task integrated allocation method according to claim 1, 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: Construct connection edges based on the semantic similarity and emotion co-occurrence factor, and calculate the psychological resonance intensity using a weighted formula; Step S203: With the memory nodes and emotion nodes as a heterogeneous node set and the psychological resonance intensity as the edge weight, construct an emotion-memory resonance map in the form of a heterogeneous graph structure.

4. The multi-agent dynamic task integrated allocation method according to claim 1, characterized in that The step S30 includes the following sub-steps: Step S301: Identify the emotion nodes in the resonance map with the number of connected edges less than the set threshold, and mark them as emotion island nodes; Step S302: Identify the memory nodes that are frequently activated in the recent N conversations. If the node forms high-resonance-intensity connections with multiple emotion nodes, mark it as a memory high-frequency activation fragment; 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: According to the identified resonance pattern type of the map, activate the corresponding type of function-driven grouping unit. The grouping unit includes at least two agents with different task response capabilities.

5. The multi-agent dynamic task integrated allocation method according to claim 1, wherein The step S40 includes the following sub-steps: Step S401: Construct a sequence graph set in the form of time slices for the resonance spectrum diagram, and extract the activity changes of each node; Step S402: Cluster the nodes based on the activity changes to form candidate regions of task intentions, and identify the set of intention nodes; Step S403: Calculate the attraction values of each intention node. The attraction function includes the weighted sum of the mean resonance intensity, the increment of node activity, and the user feedback priority; Step S404: Sort according to the attraction values, select the intention node with the greatest attraction as the current task target, and schedule the agents with corresponding capabilities in the function-driven grouping unit to execute task responses.

6. A multi-agent dynamic task integrated allocation system, characterized in that, The system includes the following modules: Memory and emotion node construction module, which is used to extract the user's historical semantic memory fragments by the long-term memory agent to construct a set of memory nodes, and obtain the user's current and historical emotional states by the emotion analysis agent to construct a set of emotion nodes; Resonance spectrum construction module, which is used to construct an emotion-memory resonance spectrum based on the semantic correlation and emotional similarity between the set of memory nodes and the set of emotion nodes. The resonance spectrum is a heterogeneous graph structure containing memory nodes and emotion nodes, and the weight of the edge represents the psychological resonance intensity between the connected nodes; Resonance mode recognition and grouping module, which is used to identify emotion island regions, memory high-frequency activation fragments, or memory-emotion conflict paths in the resonance spectrum, and activate the corresponding function-driven grouping unit according to the type of resonance mode in the spectrum. The function-driven grouping unit includes at least two agents that are functionally heterogeneous; Intention attraction and agent scheduling module, which is used to construct an intention attraction field according to the state change of the resonance spectrum in the time dimension, dynamically guide the task flow to the most active intention node currently, and schedule and allocate the corresponding agents in the function-driven grouping unit based on the attraction field.

7. The multi-agent dynamic task integrated allocation system according to claim 6, wherein The memory and emotion node construction module includes: Semantic encoding module, which is used to extract the user's past multi-round dialogue corpus by the long-term memory agent, encode the semantic content with psychological significance therein, 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; Emotion recognition module, which is used to identify the emotional states in the user's current input and historical input by the emotion analysis agent to construct an emotion embedding vector; Emotion classification module, which is used to classify the emotion information based on the timestamp, emotion category, and expression intensity to generate a set of emotion nodes. The emotion node includes at least one emotion label and its corresponding emotion intensity index.

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

9. The multi-agent dynamic task integrated allocation system according to claim 6, wherein The resonance mode recognition and grouping module includes: An emotional isolation island recognition module, which is used to recognize emotional nodes with the number of connected edges less than a set threshold in the resonance map and mark them as emotional isolation island nodes; A high-frequency memory recognition module, which is used to recognize memory nodes that are frequently activated in the recent N conversations. If the node forms a high-resonance intensity connection with multiple emotional nodes, it is marked as a memory high-frequency activation segment; A conflict path recognition module, which is used to compare the historical emotional polarities of multiple memory nodes associated with a single emotional node. If there is an obvious emotional conflict, a memory-emotion conflict path is constructed; A grouping unit activation module, which is used to activate the corresponding type of function-driven grouping unit according to the recognized resonance pattern type of the map. The grouping unit includes at least two intelligent agents with different task response capabilities.

10. The multi-agent dynamic task integrated allocation system according to claim 6, characterized in that, The intention attraction and intelligent agent scheduling module includes: A map slice analysis module, which is used to construct a sequence map set in the form of time slices for the resonance map and extract the activity changes of each node; An intention clustering module, which is used to cluster nodes based on the activity changes to form candidate regions for task intentions and identify a set of intention nodes; An attraction calculation module, which is used to calculate the attraction values of each intention node. The attraction function includes the weighted sum of the mean resonance intensity, the node activity increment, and the user feedback priority; A target selection module, which is used to select the intention node with the greatest attraction as the current task target according to the attraction value ranking; An intelligent agent scheduling module, which is used to schedule the intelligent agents with corresponding capabilities in the function-driven grouping unit to execute 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

  • Psychological counseling strategy generation method and device based on intelligent agent, equipment and medium

    CN118964598A

  • Psychological accompanying dialogue method based on multi-agent collaboration and storage medium

    CN119599029A

  • Intelligent teaching method and system based on large model, server and medium

    CN119884290A

Cited By

  • Interaction task generation method and device and storage medium

    CN120822625A

  • Digital employee operation method, system and device and medium

    CN121008897A

  • Intelligent agent cooperation system and method based on hierarchical context and global bridging scheduling

    CN121116528A