APP intelligent marketing service method based on intelligent routing and multi-agent cooperation
By using intelligent routing and multi-agent collaboration, a directed acyclic graph for task planning is generated and dynamic routing is performed. This solves the problems of task collaboration difficulties and information inconsistency in intelligent customer service systems, realizes adaptive planning and robust execution of marketing tasks, and improves the automation and decision-making intelligence of marketing activities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-04-10
AI Technical Summary
Existing intelligent customer service systems face challenges in multi-stage, highly personalized, and goal-oriented marketing tasks, including difficulties in inter-task collaboration, strategy conflicts, information inconsistencies, and insufficient tool utilization, making it difficult to achieve adaptive planning and robust execution.
We adopt a method based on intelligent routing and multi-agent collaboration. By generating a directed acyclic graph for task planning, we dynamically route subtasks to functional agents, perform dependency scheduling and state consistency management, and optimize decision-making by combining a hierarchical memory mechanism.
It enables adaptive planning and robust execution of marketing tasks, improves the automation level and decision-making intelligence of marketing activities, and ensures the reliability and continuous optimization of complex business processes.
Smart Images

Figure CN121836766A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of multi-agent, in particular to an APP intelligent marketing service method and device based on intelligent routing and multi-agent cooperation, a computer device, a computer readable storage medium and a computer program product. BACKGROUND
[0002] In recent years, large language model (LLM) driven intelligent customer service has been widely used in enterprise marketing and service. Traditional customer service systems rely on rule matching or single-agent decision making, which can handle routine inquiries, but when faced with multi-stage, highly personalized and strongly goal-oriented marketing tasks, the single-agent architecture gradually shows performance bottlenecks. For example, complete customer conversion involves portrait analysis, intent recognition, recommendation strategy, dialogue generation and other sub-tasks with logical dependencies. Single-agent is difficult to achieve explicit division of labor and cooperation between tasks, which easily leads to response redundancy, strategy conflict and multi-target imbalance.
[0003] To break through the limitations of single-agent cognition, the industry has begun to explore multi-agent cooperation architecture to simulate human team division to improve decision-making intelligence. However, existing systems still face key challenges: first, there is a lack of unified task planning and global control mechanism, each agent has independent goals, which easily leads to strategy conflicts and makes it difficult to form KPI-oriented cooperation; second, the memory mechanism is fragmented, relying on short-term conversation context, unable to track user status across sessions, and the memory between agents is isolated, leading to inconsistent information and reasoning bias; third, the tool calling ability is insufficient, the existing single-round trigger type calling lacks cross-round planning and exception handling, which easily leads to execution interruption or state loss in complex business processes.
[0004] Therefore, there is an urgent need for an APP intelligent marketing service method and device based on intelligent routing and multi-agent cooperation, computer device, computer readable storage medium and computer program product, which can realize adaptive planning, stable execution and continuous optimization of marketing tasks through multi-agent dynamic cooperation and closed-loop learning mechanism of hierarchical memory. SUMMARY
[0005] Therefore, there is an urgent need for an APP intelligent marketing service method and device based on intelligent routing and multi-agent cooperation, computer device, computer readable storage medium and computer program product, which can realize adaptive planning, stable execution and continuous optimization of marketing tasks through multi-agent dynamic cooperation and closed-loop learning mechanism of hierarchical memory.
[0006] In a first aspect, the application provides an APP intelligent marketing service method based on intelligent routing and multi-agent cooperation, comprising:
[0007] Receive input information, including user-initiated queries or trigger event information generated based on user behavior monitoring;
[0008] The input information is semantically parsed and intent is identified, and a directed acyclic graph for task planning is generated based on the identification results. The directed acyclic graph for task planning contains multiple sub-task nodes and dependencies between nodes.
[0009] Based on the directed acyclic graph of the task planning, the state and historical performance indicators of each functional agent, dynamic routing is performed to assign the multiple subtasks to the corresponding functional agents. The functional agents include user profiling agents, marketing strategy agents, knowledge retrieval agents, dialogue execution agents, and reflection and optimization agents.
[0010] During the execution of the multiple subtasks, the external tool call chain initiated by the functional intelligent agent, which includes multiple steps, is subject to dependency scheduling and state consistency management, and the shared memory associated with the user is updated based on the execution results.
[0011] In one embodiment, generating the directed acyclic graph for task planning based on the recognition results includes:
[0012] If the input information is a trigger event information generated based on user behavior monitoring, the trigger event information is matched with a preset marketing opportunity rule base;
[0013] If a match is successful, the pre-stored task flow template is invoked, and the task flow template is instantiated in combination with the current user context state to generate the directed acyclic graph of the task planning.
[0014] In one embodiment, the dependency scheduling and state consistency management of the external tool call chain initiated by the functional intelligent agent, which includes multiple steps, includes:
[0015] For each call step in the external tool call chain, a corresponding subtask node is planned in the directed acyclic graph of the task, and a tool call request structure and execution status snapshot are created.
[0016] Based on the dependencies between nodes, the tool call request structure is scheduled and sorted to ensure that the output of the preceding call is used as the input of the following call;
[0017] If an abnormal tool call is detected, a tiered rollback operation is triggered based on the type of abnormality and the location of the abnormal node in the directed acyclic graph of the task planning.
[0018] In one embodiment, updating the shared memory associated with the user based on the execution result includes:
[0019] The context data and intermediate results during the execution of this task will be added to the short-term working memory area as new episode memory entries.
[0020] After the task is completed, the relevant entries in the short-term working memory are abstracted and summarized to generate structured semantic knowledge entries and store them in the long-term semantic memory.
[0021] The verified task execution paths and tool call sequences that have reached the preset success threshold are parameterized into reusable process templates, stored in the program memory, and the existing related templates in the program memory are iterated or their confidence levels are adjusted.
[0022] In one embodiment, the method further includes:
[0023] Historical task trajectory data is periodically sampled from the program memory, and the comprehensive reward value for each historical task trajectory is calculated.
[0024] A policy optimization algorithm based on group reinforcement learning is adopted, with the goal of maximizing the long-term accumulation of the comprehensive reward value, and the policy model is updated using the historical task trajectory as training samples.
[0025] By utilizing the feature weights output by the updated strategy model, the retrieval index of the long-term semantic memory is optimized or the priority of process templates in the program memory is adjusted.
[0026] In one embodiment, the method further includes:
[0027] Generate structured reflection entries that include task execution evaluation results and optimization strategies;
[0028] The structured reflection entries are written into the shared memory, and an association index is established with the relevant historical memory entries that triggered the task;
[0029] Based on the established association index, when processing the same or similar task intent again, the structured reflection entries and the historical memory entries are jointly retrieved to optimize task planning or dynamic routing decisions.
[0030] Secondly, this application also provides an APP intelligent marketing service device based on intelligent routing and multi-agent collaboration, comprising:
[0031] The receiving module is used to receive input information, including user-initiated queries or trigger event information generated based on user behavior monitoring.
[0032] The generation module is used to perform semantic parsing and intent recognition on the input information, and generate a directed acyclic graph of task planning based on the recognition results. The directed acyclic graph of task planning contains multiple sub-task nodes and dependencies between nodes.
[0033] The execution module is used to perform dynamic routing based on the directed acyclic graph of the task planning, the state and historical performance indicators of each functional agent, so as to assign the multiple subtasks to the corresponding functional agents. The functional agents include user profiling agents, marketing strategy agents, knowledge retrieval agents, dialogue execution agents and reflection and optimization agents.
[0034] The update module is used to perform dependency scheduling and state consistency management on the external tool call chain initiated by the functional agent, which includes multiple steps, during the execution of the multiple sub-tasks, and to update the shared memory associated with the user based on the execution results.
[0035] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0036] Receive input information, including user-initiated queries or trigger event information generated based on user behavior monitoring;
[0037] The input information is semantically parsed and intent is identified, and a directed acyclic graph for task planning is generated based on the identification results. The directed acyclic graph for task planning contains multiple sub-task nodes and dependencies between nodes.
[0038] Based on the directed acyclic graph of the task planning, the state and historical performance indicators of each functional agent, dynamic routing is performed to assign the multiple subtasks to the corresponding functional agents. The functional agents include user profiling agents, marketing strategy agents, knowledge retrieval agents, dialogue execution agents, and reflection and optimization agents.
[0039] During the execution of the multiple subtasks, the external tool call chain initiated by the functional intelligent agent, which includes multiple steps, is subject to dependency scheduling and state consistency management, and the shared memory associated with the user is updated based on the execution results.
[0040] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0041] Receive input information, including user-initiated queries or trigger event information generated based on user behavior monitoring;
[0042] The input information is semantically parsed and intent is identified, and a directed acyclic graph for task planning is generated based on the identification results. The directed acyclic graph for task planning contains multiple sub-task nodes and dependencies between nodes.
[0043] Based on the directed acyclic graph of the task planning, the state and historical performance indicators of each functional agent, dynamic routing is performed to assign the multiple subtasks to the corresponding functional agents. The functional agents include user profiling agents, marketing strategy agents, knowledge retrieval agents, dialogue execution agents, and reflection and optimization agents.
[0044] During the execution of the multiple subtasks, the external tool call chain initiated by the functional intelligent agent, which includes multiple steps, is subject to dependency scheduling and state consistency management, and the shared memory associated with the user is updated based on the execution results.
[0045] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0046] Receive input information, including user-initiated queries or trigger event information generated based on user behavior monitoring;
[0047] The input information is semantically parsed and intent is identified, and a directed acyclic graph for task planning is generated based on the identification results. The directed acyclic graph for task planning contains multiple sub-task nodes and dependencies between nodes.
[0048] Based on the directed acyclic graph of the task planning, the state and historical performance indicators of each functional agent, dynamic routing is performed to assign the multiple subtasks to the corresponding functional agents. The functional agents include user profiling agents, marketing strategy agents, knowledge retrieval agents, dialogue execution agents, and reflection and optimization agents.
[0049] During the execution of the multiple subtasks, the external tool call chain initiated by the functional intelligent agent, which includes multiple steps, is subject to dependency scheduling and state consistency management, and the shared memory associated with the user is updated based on the execution results.
[0050] The aforementioned APP intelligent marketing service method, device, computer equipment, computer-readable storage medium, and computer program product, based on intelligent routing and multi-agent collaboration, receives and parses user-initiated inquiries or behavior-triggered events, and generates a structured directed acyclic graph for task planning. The system can explicitly decompose complex marketing processes into sub-tasks with logical dependencies. Based on this, a dynamic routing mechanism using agent states and historical performance can intelligently assign sub-tasks to the most suitable specialized agents (such as profilers, policy agents, and dialogue agents) for execution, resolving common issues of task conflicts, blurred boundaries, and inconsistent policies when simply stacking single or multiple agents. During task execution, unified dependency scheduling and state consistency management of cross-agent external tool call chains ensure the reliable and stable completion of complex business processes involving multiple system operations, avoiding full-process interruptions due to localized failures. Ultimately, all execution results are systematically updated into a shared memory containing short, medium, and long-term hierarchical structures. This not only provides immediate contextual support for the current session but also transforms process experience into reusable knowledge assets, providing a data-driven foundation for the system's continuous self-optimization and future decision-making. This significantly improves the automation level, decision intelligence, and long-term adaptability of marketing campaigns. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is a flowchart illustrating an APP intelligent marketing service method based on intelligent routing and multi-agent collaboration in one embodiment.
[0053] Figure 2 This is a schematic diagram of a multi-agent collaborative workflow for an APP intelligent marketing service method based on intelligent routing and multi-agent collaboration in one embodiment.
[0054] Figure 3 This is a flowchart illustrating an APP intelligent marketing service method based on intelligent routing and multi-agent collaboration in another embodiment.
[0055] Figure 4 This is a tool call and exception rollback mechanism for an APP intelligent marketing service method based on intelligent routing and multi-agent collaboration in one embodiment;
[0056] Figure 5This is a schematic diagram of the multi-agent memory mechanism of an APP intelligent marketing service method based on intelligent routing and multi-agent collaboration in one embodiment;
[0057] Figure 6 This is a schematic diagram of the intelligent agent logic for the reflection and optimization of an APP intelligent marketing service method based on intelligent routing and multi-agent collaboration in one embodiment;
[0058] Figure 7 This is a structural block diagram of an APP intelligent marketing service device based on intelligent routing and multi-agent collaboration in one embodiment;
[0059] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0062] In one exemplary embodiment, such as Figure 1 As shown, an intelligent marketing service method for apps based on intelligent routing and multi-agent collaboration is provided. Taking the application of this method to a master intelligent agent server as an example, the method includes the following steps S102 to S108. Wherein:
[0063] Step S102: Receive input information, which includes user-initiated inquiry information or trigger event information generated based on user behavior monitoring.
[0064] Specifically, user-initiated information requests refer to text or voice requests initiated by users within the application through a dialogue interface. Trigger event information generated based on user behavior monitoring originates from a separate real-time behavior monitoring module within the system. This module continuously analyzes user behavior sequences within the application (such as page browsing, product favorites, and changes in search patterns) according to preset or learned rules. When a specific behavior pattern is identified, the module automatically generates a structured trigger signal. This signal not only includes the event type (e.g., frequent browsing without purchase, long-term inactivity) but also encapsulates relevant user identifiers, behavioral objects, and contextual snapshots.
[0065] Both types of input information are sent to the main control agent through a standardized interface for unified reception and parsing, essentially defining two parallel task initiation mechanisms. When the input is a user-initiated query, the system enters a reactive task flow, aiming to directly meet the user's explicit needs. When the input is a behavior-triggered event, the system enters an active task flow.
[0066] Step S104: Perform semantic parsing and intent recognition on the input information, and generate a directed acyclic graph for task planning based on the recognition results. The directed acyclic graph for task planning contains multiple sub-task nodes and dependencies between nodes.
[0067] Specifically, in-depth analysis is performed on received user-initiated inquiries or structured descriptions of triggering events to extract core user intent (such as purchase inquiries, price comparisons, and churn warning interventions) and key parameters (such as the products involved, time, and user status). The Task DAG (Directed Acyclic Graph) is a graph composed of nodes and directed edges. Each node represents an indivisible atomic subtask (e.g., querying user profiles, retrieving product inventory, generating recommendation messages, and calling coupon APIs), while directed edges define the dependencies and execution order between subtasks. For example, an edge from node A (querying user profiles) to node B (generating recommendation messages) means that B can only begin execution after A has completed and output its results. The DAG characteristic ensures that the task flow does not get stuck in logical loops, guaranteeing the executability of the plan.
[0068] After recognizing the intent, the master agent does not directly provide an answer or execute a single action. Instead, it initiates a task decomposition and planning process. Based on the recognized intent, it matches or dynamically generates a corresponding task template from the program memory (part of a multi-layered memory module). This template, in the form of a Directed Acyclic Graph (DAG), defines the types of subtasks (nodes) typically required to complete such an intent, as well as the approximate dependencies (edges) between them. For example, for a user's intent to inquire about products and seek discounts, the planned DAG might include multiple nodes such as intent confirmation, product detail retrieval, user historical order query, available discount strategy calculation, and comprehensive response generation. The discount strategy calculation node depends on the outputs of the product detail retrieval and user historical order query nodes.
[0069] Subsequently, the master control AI will instantiate and refine the template DAG by combining the current specific context information (such as the user's real-time level and session history), including filling in specific parameters for each node (such as specifying the product ID in the product details retrieval node), and judging whether to adjust dependencies or add or delete nodes based on real-time logic.
[0070] Step 106: Based on the directed acyclic graph of task planning, the state and historical performance indicators of each functional agent, perform dynamic routing to assign multiple subtasks to the corresponding functional agents. The functional agents include user profiling agent, marketing strategy agent, knowledge retrieval agent, dialogue execution agent, and reflection and optimization agent.
[0071] Specifically, the state of each functional agent refers to runtime information such as real-time load, current availability, and queue depth of specialized modules in the system, such as user profiling agents, marketing strategy agents, knowledge retrieval agents, and dialogue execution agents. Historical performance metrics are derived from the system's long-term memory, recording data such as the historical success rate, average response time, and output quality score of each functional agent in handling various subtasks. Dynamic routing is the process by which the master agent makes comprehensive decisions based on the above three aspects of information, selecting and assigning the most suitable functional agent to each executable subtask node in the DAG in real time to undertake its execution.
[0072] The Profile Agent aggregates user information from multiple data sources, including CRM systems, behavior logs, and transaction records. It employs vectorized modeling, mapping user interests, consumption habits, and time-based behavioral patterns to multi-dimensional embedding vectors, and dynamically updates these vectors through a continuous learning mechanism. When the controlling agent requests profile information, the Profile Agent returns structured labels (such as areas of interest, purchasing tendencies, and risk levels) based on user identifiers, providing feature support for subsequent decision-making.
[0073] The Marketing Strategy Agent employs a multi-objective optimization algorithm, comprehensively considering factors such as user conversion rate, campaign budget, timeliness, and user sensitivity to generate the optimal marketing strategy. Its core algorithm includes a strategy generation network and an evaluation network. The former generates candidate strategies based on a reinforcement learning framework, while the latter calculates a payoff function using historical interaction data to balance cost and conversion effectiveness. After the strategy is output, the agent attaches a confidence score and returns it to the master agent via a communication bus for aggregation and judgment.
[0074] The Knowledge Retrieval Agent employs a semantic indexing structure, uniformly encoding the knowledge graph, FAQ database, and business rule tables. Upon receiving a query task, the agent first converts the query content into a semantic vector, then retrieves the most relevant knowledge nodes through a vector recall mechanism, and finally returns the results after combining rule filtering and confidence ranking. To improve real-time performance, the system also performs result caching and partial updates after the retrieval to avoid duplicate queries.
[0075] The customer service agent is primarily responsible for calling internal enterprise system APIs to perform tasks such as account inquiries, order status updates, and repair requests. This agent communicates with various business systems through a standardized tool call adaptation layer. The adaptation layer defines a unified task request format (TaskMessage) and return format (ResultMessage). The former includes the task ID, task type, context summary, and parameter information, while the latter includes the execution result, confidence level, and status flag, ensuring interface consistency across different tasks. This module features an exception handling and retry mechanism; when an external interface is unavailable or returns an exception, the system can automatically retry or fall back to a backup process.
[0076] The Dialogue Execution Agent is responsible for converting the system's structured output into natural language expressions and maintaining contextual consistency across multiple rounds of dialogue. Internally, it includes a language generation module, an emotion regulation module, and a multimodal rendering module. The language generation module generates natural language sentences based on a large language model; the emotion regulation module adjusts the language style (such as soothing, encouraging, or recommending) by detecting the user's tone and contextual state; and the multimodal rendering module outputs the generated results to different terminals in the form of cards, images, or audio.
[0077] When the master agent obtains an instantiated DAG, it does not simply assign tasks according to their type. For each subtask node in the DAG that currently meets the execution conditions (i.e., all its predecessor dependent nodes have been completed), the master agent's routing module performs the following calculations: First, based on the type of the subtask node (e.g., profile query, policy generation, knowledge question answering), such as... Figure 2 As shown, the module filters out all candidate agents with the corresponding functions from the system. Then, it queries the real-time status of these candidate agents to avoid assigning tasks to overloaded or unavailable instances; at the same time, it retrieves the historical performance metrics of these candidate agents in handling similar subtasks from the memory module, forming a multi-dimensional score profile on efficiency, success rate, and other aspects.
[0078] The reflective optimization agent not only performs statistical analysis and anomaly diagnosis of task results, but also introduces a self-evolutionary optimization mechanism based on reinforcement learning (RL). This enables the entire multi-agent system to update its policies and adapt its behavior through experience accumulation over long-term operation. The system as a whole forms a learning loop of "execution → evaluation → reinforcement → re-execution".
[0079] Based on real-time status and historical performance, the routing module uses a built-in, adaptively updatable weighting algorithm (whose parameters can be periodically optimized by a reflective optimization agent) to comprehensively evaluate and calculate the confidence score or expected utility for assigning the current subtask to each candidate agent. Finally, the master agent selects the candidate with the highest score and assigns the task instructions and necessary input context to it via the system's internal message bus. For example, a subtask of generating personalized promotional strategies might fall within the processing scope of both marketing strategy agent A and marketing strategy agent B (a backup or specialized instance for a particular product category). If the routing module detects that agent A is currently under high load and has recently experienced increased response latency on similar tasks, while agent B is idle and has a stable historical success rate, it might dynamically route the current task to agent B for execution.
[0080] Step 108: During the execution of multiple subtasks, perform dependency scheduling and state consistency management on the external tool call chain initiated by the functional intelligent agent, which includes multiple steps, and update the shared memory associated with the user based on the execution results.
[0081] The external tool call chain refers to a series of external system interfaces that a functional intelligent agent needs to call in a specific order to complete its subtasks. This call chain has clear data dependencies between steps. Dependency scheduling refers to the unified tool management center arranging the initiation timing and data transmission of each step in an orderly manner based on these dependencies. State consistency management refers to the system ensuring the consistency of the execution state of the entire call chain (such as completed steps, intermediate results, and current progress) in the internal view of the system through transaction caching, snapshots, and rollback mechanisms during asynchronous calls that may span multiple rounds. Even if some steps fail or are interrupted, the state remains clear, avoiding data chaos or partial effectiveness. Updating the shared memory associated with the user refers to the structured storage of key data (original context, tool call records, intermediate results, and final output) throughout the entire task execution process into the storage area associated with the user identifier in the hierarchical memory module according to predefined rules.
[0082] Specifically, before and after each tool call, the management center creates or updates a corresponding execution status snapshot in the transaction-level cache, recording the request content, sending time, return result, and execution status (success, failure, in progress). If a step fails, the management center will intervene according to a preset hierarchical exception handling strategy (such as node-level retry, dependency chain rollback, and full-chain replanning), and use the status snapshot to achieve precise rollback or recovery, ensuring the cleanliness of the business state and avoiding dirty data caused by partial success. After the entire subtask (and its tool call chain) is completed, regardless of whether it ultimately succeeds or fails, the system will initiate a memory writing process. The original interaction records, key decision point data, tool call logs, and results generated during execution are first stored as plot memory in the short-term working area. Subsequently, the memory summarization module will abstract them and store them in the long-term semantic memory. At the same time, the repeatedly verified efficient and reliable tool call sequences and parameter combinations can be solidified into reusable templates in the program memory.
[0083] In the aforementioned intelligent marketing service method for apps based on intelligent routing and multi-agent collaboration, by receiving and parsing user-initiated inquiries or behavior-triggered events and generating a structured directed acyclic graph for task planning, the system can explicitly decompose complex marketing processes into sub-tasks with logical dependencies. Based on this, a dynamic routing mechanism using agent states and historical performance can intelligently assign sub-tasks to the most suitable specialized agents (such as profile, strategy, and dialogue agents) for execution, resolving common issues like task conflicts, blurred boundaries, and inconsistent policies when simply stacking single or multiple agents. During task execution, unified dependency scheduling and state consistency management of cross-agent external tool call chains ensure that complex business processes involving multiple system operations can be completed reliably and stably, avoiding full-process interruptions due to localized failures. Ultimately, all execution results are systematically updated into a shared memory containing short, medium, and long-term hierarchical structures. This not only provides immediate contextual support for the current session but also transforms process experience into reusable knowledge assets, providing a data-driven foundation for the system's continuous self-optimization and future decision-making. This significantly improves the automation level, decision intelligence, and long-term adaptability of marketing campaigns.
[0084] In one exemplary embodiment, generating a directed acyclic graph for task planning based on the identification results includes:
[0085] When the input information is a trigger event information generated based on user behavior monitoring, the trigger event information will be matched with a preset marketing opportunity rule base;
[0086] If a match is successful, the pre-stored task flow template is invoked, and the task flow template is instantiated in combination with the current user context state to generate a directed acyclic graph of task planning.
[0087] Specifically, the triggering condition is based on trigger event information generated from user behavior monitoring, rather than direct inquiries from the user. For example, this information might indicate that user A added item X to their shopping cart more than 30 minutes ago but has not yet paid for it. At this point, the system enters a proactive, opportunity-driven planning mode.
[0088] The first step is to match the triggered event information with a pre-defined marketing opportunity rule base. This rule base is a predefined collection of knowledge where each rule describes a specific user behavior pattern (e.g., adding items to the cart but not paying within the time limit, frequently browsing a category but not purchasing, or membership benefits about to expire) and the corresponding marketing intervention type the system should take (e.g., cart recovery, interest activation, renewal reminder). The controlling agent compares the received triggered events (including event type, user ID, object ID, etc.) with this rule base to find matches.
[0089] For each type of marketing intervention defined in the rule base, the system pre-stores a corresponding parameterized task flow template. This template is a standardized workflow blueprint defined in the form of a directed acyclic graph (DAG). It abstractly specifies the steps (sub-task nodes) typically required to complete this type of marketing intervention, as well as the logical dependencies between these steps. At this point, the controlling agent injects the current specific context, including the specific user ID and product ID in the triggering event, and detailed information such as the user's profile, level, and historical interactions obtained in real time from the memory module. This process is instantiation: it fills the parameter slots in the template (such as {user ID}, {product ID}) with specific values and may fine-tune the template according to the context (for example, for high-value users, adding an alternative node for priority customer service access to the template). After instantiation, a task planning DAG is generated.
[0090] In this embodiment, a high-quality execution plan is quickly assembled through a three-stage mechanism of "pattern matching, template invocation, and context instantiation." This ensures that marketing actions are based on mature business logic (encapsulated in templates) while also flexibly adapting to the real-time situations of individual users. In this way, domain knowledge can be distilled into reusable program templates (DAGs), automatically and accurately applying this knowledge to massive amounts of real-time user behavior events, thus achieving the large-scale and intelligent implementation of marketing strategies.
[0091] In one exemplary embodiment, such as Figure 3 As shown, dependency scheduling and state consistency management are performed on the external tool call chain initiated by a functional intelligent agent, which includes multiple steps.
[0092] Step S302: For each call step in the external tool call chain, create a tool call request structure and an execution status snapshot for the corresponding subtask node in the directed acyclic graph of the task plan.
[0093] Step S304: Based on the dependencies between nodes, schedule and sort the tool call request structure to ensure that the output of the preceding call is used as the input of the following call;
[0094] Step S306: If an abnormal tool call is detected, a tiered rollback operation is triggered based on the type of abnormality and the location of the abnormal node in the directed acyclic graph of the task planning.
[0095] Specifically, first, the trigger point and the object of operation of the process are clarified. When a functional agent (such as a customer service execution agent) needs to execute a series of external system calls to complete its assigned sub-task (for example, issuing coupons to user A and updating CRM records), the master agent receives the task. These call steps and the data dependencies between them are mapped to or constitute the internal implementation logic of the sub-task node in the directed acyclic graph (DAG) of task planning.
[0096] Each tool invocation step to be executed is encapsulated into a standardized tool invocation request structure. This structure contains complete execution metadata: a unique invocation ID, the target tool or API identifier, input parameters (which may include references to the output results of upstream steps), timeout settings, retry policies, etc. Simultaneously, the management center immediately creates an associated execution status snapshot for this structure in the transaction-level cache. This snapshot is initially recorded as pending execution, with space reserved for recording start time, completion time, return results, error messages, etc.
[0097] During the execution of the call chain, when a successful tool call is detected, it is written to the memory module and fed back to the master agent. When an anomaly is detected in a tool call (such as network timeout, interface error return, or business logic failure), a tiered rollback decision mechanism is initiated based on the anomaly type and the position of the anomaly node in the directed acyclic graph of the task planning. Anomaly logs are recorded, and the tool's effectiveness is evaluated through reflection and optimization agents, updating tool weights and scheduling strategies. Specifically, minor anomalies trigger node-level rollbacks, retrying only the current tool node; moderate anomalies trigger dependency chain rollbacks, reverting to upstream critical nodes to re-execute subsequent processes; and severe anomalies trigger full-chain rollbacks, with the master agent regenerating the task planning graph and replacing the execution path.
[0098] In this embodiment, by creating a standardized request structure and state snapshot for each invocation step, atomic encapsulation and full observability of the distributed invocation process are achieved. Secondly, based on the inherent dependencies of the directed acyclic graph (DAG), invocation requests are topologically sorted and scheduled, strictly ensuring the correctness of business logic and data flow, and avoiding logical errors caused by disordered execution order. Finally, through a hierarchical rollback mechanism based on exception type and node position, differentiated recovery strategies, ranging from partial retries to dependency chain rollback, can be automatically executed when an invocation fails.
[0099] In one exemplary embodiment, updating the shared memory associated with the user based on the execution result includes:
[0100] The context data and intermediate results during the execution of this task will be added to the short-term working memory area as new episode memory entries.
[0101] After the task is completed, the relevant entries in the short-term working memory are abstracted and summarized to generate structured semantic knowledge entries and store them in the long-term semantic memory.
[0102] The verified task execution paths and tool call sequences that have reached the preset success threshold are parameterized into reusable process templates, stored in the program memory, and the existing related templates in the program memory are iterated or their confidence levels are adjusted.
[0103] This embodiment incorporates a multi-layered, self-driving memory mechanism. This mechanism stores information generated during system operation in a three-tiered structure of "episode, semantics, and procedure," and combines the active writing and re-indexing capabilities of the reflective optimization agent and the reinforcement learning optimizer to form a closed-loop memory system capable of both passive retrieval and active decision-making. In this invention, memory functions not only as historical storage but also as the primary input source for agent decision-making. In particular, procedural traces are managed as core memory units to support cross-round reuse of complex tasks, toolchain dependency recovery, and policy migration.
[0104] The three-layer memory structure is logically divided into a plot memory layer, a semantic memory layer, and a program memory layer. The plot memory layer records the complete trajectory of a single task or session, including snapshots of the plan graph, tool call logs, context tokens, timestamps, and state sequences, used for replay and resuming from breakpoints. The semantic memory layer, above the plot layer, provides abstract storage, saving common facts, user feature summaries, common failure modes, and policy-effect mappings from multiple plots in the form of structured concepts or vector indexes, providing the master agent with semantic retrieval and pattern recognition capabilities. The program memory layer stores reusable operations and execution flows in the form of "Lego Units" and "Procedure Templates." Each unit contains a sequence of steps, parameter interfaces, applicable conditions, version number, and historical performance metrics, which the master agent can directly reference or combine when generating plans.
[0105] The memory storage strategy employs different data models and persistence schemes based on hierarchical differences. Episodic memory uses a transactional log and a time-series database to ensure strong consistency and immutability during writes; semantic memory uses a combined structure of vector and graph databases to support efficient semantic retrieval while maintaining entity associations and causal relationships; program memory uses templated structured storage with version and performance snapshots to facilitate confidence-based template selection by the controlling agent. To ensure access performance and storage economy, the system designs a hot-and-cold tiered storage mechanism, storing short-term session data and long-term experience data in a tiered manner. The former provides low-latency access, while the latter is compressed, indexed, and archived.
[0106] Specifically, such as Figure 5 As shown, the raw data throughout the entire task execution process, including initial user input or triggering events, the complete task planning directed acyclic graph generated by the master agent, the status and results of each subtask, request and response logs for all tool calls, and the final system output and user feedback, are used as experiential data. This data is then packaged into structured episode memory entries (including context, tags, references, etc.) through reflective optimization of the agent and added to the short-term working memory (STM) associated with the current user ID. The STM originally included dialogue state and task context data. The performance of the toolchain, task results, and other data are stored in the medium-term working memory.
[0107] After a task loop is closed (e.g., session ends or task chain completes), the system's memory induction module performs in-depth processing on the task-related entries in the short-term working memory. It doesn't simply store raw logs, but performs abstract induction: extracting key facts (e.g., a user showing strong interest in a certain type of product), identifying successful behavioral patterns (e.g., increased conversion rates after using specific persuasive strategies), and summarizing the relationship between decision-making logic and results (e.g., when a user profile meets certain conditions, recommendation strategy A is more effective than strategy B). These extracted insights are transformed into structured semantic knowledge entries (e.g., user U shows interest preference P for product type G in context C), and then stored in the long-term semantic memory. This memory is organized using vectorized indexes, supporting efficient retrieval based on semantic similarity. This allows the system to directly invoke this generalized experiential knowledge for reasoning when facing similar users or contexts in the future, rather than relying solely on limited context.
[0108] If the execution result reaches a preset success threshold, the key decision points, tool selections, and parameter sequences in this path are parameterized and solidified into a reusable process template, stored in the program memory, forming a knowledge network. Simultaneously, it is compared with existing similar templates in the program memory. If the newly generated template performs better or provides new effective variations, the system will initiate version iteration (updating the template content) or adjust its confidence score (increasing the priority of calling high-quality templates), re-executing the task or calling the tool.
[0109] In this embodiment, by storing the original interaction records as episodic memory, precise conversation retracing and context recovery capabilities are achieved, ensuring the real-time coherence of multi-turn dialogues. Secondly, by abstracting and summarizing episodic memory to form semantic knowledge, intelligent reasoning and decision support based on historical experience are realized when facing similar users or scenarios. Finally, by parameterizing high-frequency success paths into program templates and dynamically optimizing them, complex task planning can be directly instantiated from validated and efficient templates, significantly reducing the overhead of repetitive reasoning.
[0110] In one exemplary embodiment, the method further includes:
[0111] Historical task trajectory data is periodically sampled from the program memory and the comprehensive reward value for each historical task trajectory is calculated.
[0112] A policy optimization algorithm based on group reinforcement learning is adopted, with the goal of maximizing the long-term accumulation of comprehensive reward value, and the policy model is updated using historical task trajectories as training samples.
[0113] By utilizing the feature weights output by the updated strategy model, the retrieval index of the long-term semantic memory can be optimized or the priority of process templates in the program memory can be adjusted.
[0114] Specifically, such as Figure 6 As shown, the controlling agent samples a batch of historical task trajectories from the program memory. For each trajectory, the reflective optimization agent calculates its comprehensive reward value based on a comprehensive reward function. This function is multi-objective, typically quantifying the core business effect of the task (e.g., whether it leads to conversion), user experience (e.g., satisfaction rating, interaction smoothness), and system efficiency (e.g., response latency, resource consumption). Through calculation, each historical experience is assigned a quantified merit score; successful and efficient experiences receive high rewards, while unsuccessful or inefficient experiences receive low rewards or penalties.
[0115] A policy optimization algorithm based on swarm reinforcement learning (such as the GRPO optimization module) is employed. Its swarm nature is reflected in the fact that the algorithm does not optimize the policy of a single agent, but rather treats the entire multi-agent collaborative system as a whole, learning its collaborative strategy. The algorithm's optimization objective is to maximize the long-term cumulative expected value of the comprehensive reward value reflected in historical task trajectories. It uses sampled historical trajectories (including states, actions, and rewards) as training samples. Through simulation and replay, it learns which collaborative strategies (such as the routing preferences of the master agent and the behavioral parameters of agents with specific functions) will bring higher long-term rewards under which system states (such as user intent and contextual features). After training, an updated policy model is obtained, which incorporates the ability to identify high-value decision patterns and outputs feature weights representing these patterns.
[0116] The feature weights output by the policy model are used to update the policy and optimize the parameters of the master agent. This optimizes the retrieval index of the long-term semantic memory, improving the ranking of semantic knowledge strongly correlated with high-weight features (e.g., time-limited discount strategies for price-sensitive users) in the retrieval results. This allows for prioritizing more likely successful empirical patterns during planning. On the other hand, the weights are used to adjust the priority or confidence of process templates in the program memory. Templates matching or similar to high-reward historical trajectories (i.e., validated and more effective methodologies) receive higher priority; conversely, poorly performing templates are downgraded. Then, in the next round of task execution, the master agent uses the updated optimization policy, calls the toolchain to generate task logs and execution results, and forms a closed loop.
[0117] Specifically, in each round of task execution, the master agent executes task planning and toolchain invocation based on the current policy parameter π, while the functional agents complete the actual operations and response generation. Throughout the task, the system automatically records the multimodal execution trajectory, including the task context state (…). ), Execution of actions ( ), return results ( The trajectories are fed into a dependency graph (DAG) and other structural information. These trajectories are sent in real time to a reflective optimization agent, which performs structured organization and semantic annotation to form standardized memory entries to support sample input in subsequent reinforcement learning training phases.
[0118] During the evaluation phase, the reflective optimization agent comprehensively scores the results of each task execution and calculates the reward function:
[0119]
[0120] in, To improve the success rate of the task, For user satisfaction, Due to system response delay, These are dynamically adjusted weight parameters. The initial values of the weights are preset by the system, and then adaptively adjusted by the reflective optimization agent based on historical performance. For example, when the system detects that the impact of response latency on user satisfaction is increasing, the weight of γ will automatically increase, thereby guiding the system to prioritize improving response speed in subsequent optimizations.
[0121] All calculated reward values are associated with the corresponding state-action-context triples ( All of these trajectory data are written to the long-term storage area (PersistentMemory) of the memory module. After preprocessing by the reflective optimization agent, these trajectory data form "structured learning samples", which include meta-information such as task semantic labels, tool call paths, contextual dependencies, and historical decision confidence, providing an interpretable data foundation for subsequent offline training.
[0122] During the offline optimization phase, the system employs a policy update algorithm based on GRPO (Group Reinforcement Policy Optimization) to perform batch optimization on the aforementioned trajectory samples. Unlike traditional single-agent reinforcement learning methods, the GRPO algorithm uses a group of agents as the basic optimization unit, guiding the overall cooperative strategy of the multi-agent system by calculating the group-level reward distribution and behavioral differences.
[0123] The training process for GRPO is as follows: First, the reflective optimization agent samples multiple sets of trajectories from the memory bank and calculates the advantage function for each set:
[0124]
[0125] in Let represent the state-value function, used to measure the expected long-term return in that state. Subsequently, the system updates its policy by minimizing the following objective function:
[0126]
[0127] in This represents the ratio of the probabilities of the new and old strategies. This is the policy entropy term, used to maintain exploratory behavior. is the entropy weight hyperparameter. To enhance group cooperation and robustness, GRPO adds a group entropy regularization term and a collaborative reward function to the traditional PPO (Proximal Policy Optimization) structure. This mechanism avoids the system from getting trapped in a single policy local optimum by rewarding the policy differences and success path diversity among different agents.
[0128] During model training, the system periodically performs offline reinforcement learning updates without interfering with the online service logic. After training is complete, the reflective optimization agent updates the policy parameters. The group reward statistics and model difference index are written into the long-term memory layer, and the dynamic routing weight table of the master agent is updated. The new policy parameters take effect in the next round of task planning, enabling the system to complete the task with better path selection, higher confidence, and a more reasonable tool call sequence in each task loop.
[0129] Furthermore, after each strategy update, the reflective optimization agent automatically generates structured memory entries with context, tags, and reference information. For example, for a failed marketing task, the system records the user profile of the task, the type of marketing strategy used, the tool ID of the failed node, and key parameters. When a similar task occurs again, the controlling agent can retrieve the entry through semantic indexing and memory recall mechanisms and trigger the corresponding compensation decision, thereby achieving adaptive optimization based on historical experience.
[0130] To avoid memory overload and information redundancy caused by long-term operation, a memory update and forgetting mechanism based on reinforcement signals is also introduced. The reflective optimization agent periodically calculates the effectiveness score of each memory item. (Based on recent access frequency, relevance, and reward intensity), memory compression or rewriting is dynamically performed based on the score. Low-value entries will be converted into high-level semantic abstractions or deleted, thereby maintaining the efficiency and dynamic balance of the memory system.
[0131] In this embodiment, an evolutionary guideline for the system is constructed through offline reinforcement learning, which quantitatively evaluates the value of historical task trajectories. A swarm reinforcement learning algorithm is then used to extract the optimal multi-agent cooperative strategy to update the core policy model. Furthermore, the learned policy feature weights are fed back to the memory system to dynamically optimize the retrieval efficiency of semantic memory and the priority of program template invocation.
[0132] In one exemplary embodiment, the method further includes:
[0133] Generate structured reflection entries that include task execution evaluation results and optimization strategies;
[0134] Write structured reflection entries into shared memory and create an association index with relevant historical memory entries that triggered the task;
[0135] Based on the established association index, when processing the same or similar task intents again, the structured reflection entries and historical memory entries will be jointly retrieved to optimize task planning or dynamic routing decisions.
[0136] Specifically, firstly, the reflective optimization agent conducts a deep analysis of the entire task execution process, not only evaluating the final result (success / failure, user satisfaction), but more importantly, diagnosing the process and identifying the specific impact of key links in the decision chain (such as a particular route selection, a tool call, or a marketing strategy) on the outcome. Based on this analysis, it generates a structured reflection entry, which is not a simple log, but contains clear evaluation conclusions (such as when the user profile is Y, strategy A has a 15% higher conversion rate than strategy B) and derived optimization strategies (such as prioritizing strategy A when encountering similar profiles in the future or avoiding calling tool T in scenario C).
[0137] Secondly, this structured reflection entry is treated as a special type of semantic knowledge and written into shared memory. It is not stored in isolation, but rather through an associative index, establishing explicit logical links with the original input information that triggered the task (user queries or behavioral events) and other historical memory entries involved in the task execution (such as the user profile used, the strategy template invoked, etc.). This is equivalent to adding a node with a tag containing experience summary and improvement suggestions to the system's knowledge graph, and tightly connecting it with relevant context nodes.
[0138] Finally, when the system processes the same or similar task intents again, in the process of retrieving historical memories to assist in planning, based on the established association index, the master intelligent agent can not only refer to the specific practices of similar past cases when planning new tasks, but also directly obtain optimization suggestions and strategy adjustment guidance for such cases.
[0139] In this embodiment, by generating and associating structured reflection entries, the system not only stores how historical tasks were executed, but also extracts and solidifies optimization strategies and improvement suggestions for specific scenarios. When a similar intent is encountered again, by jointly retrieving historical cases and accompanying reflection entries, validated optimization guidance can be directly obtained, thereby enabling quick and accurate adjustments to task planning or dynamic routing decisions.
[0140] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0141] Based on the same inventive concept, this application also provides an APP intelligent marketing service device based on intelligent routing and multi-agent collaboration for implementing the above-mentioned APP intelligent marketing service method based on intelligent routing and multi-agent collaboration. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more APP intelligent marketing service device embodiments based on intelligent routing and multi-agent collaboration provided below can be found in the limitations of the APP intelligent marketing service method based on intelligent routing and multi-agent collaboration described above, and will not be repeated here.
[0142] In one exemplary embodiment, such as Figure 7 As shown, an APP intelligent marketing service device based on intelligent routing and multi-agent collaboration is provided, including:
[0143] The receiving module 702 is used to receive input information, including user-initiated inquiry information or trigger event information generated based on user behavior monitoring;
[0144] The generation module 704 is used to perform semantic parsing and intent recognition on the input information, and generate a directed acyclic graph of task planning based on the recognition results. The directed acyclic graph of task planning contains multiple sub-task nodes and dependencies between nodes.
[0145] The execution module 706 is used to perform dynamic routing based on the task planning directed acyclic graph, the state of each functional agent and historical performance indicators, so as to assign the multiple sub-tasks to the corresponding functional agents. The functional agents include user profile agents, marketing strategy agents, knowledge retrieval agents, dialogue execution agents and reflection and optimization agents.
[0146] The update module 708 is used to perform dependency scheduling and state consistency management on the external tool call chain initiated by the functional intelligent agent, which contains multiple steps, during the execution of multiple subtasks, and to update the shared memory associated with the user based on the execution results.
[0147] In an exemplary embodiment, the generation module 704 is specifically used to match the trigger event information with a preset marketing opportunity rule base when the input information is trigger event information generated based on user behavior monitoring; if the matching is successful, the pre-stored task flow template is invoked, and the task flow template is instantiated in combination with the current user context state to generate a directed acyclic graph of task planning.
[0148] In an exemplary embodiment, the update module 708 is specifically used to create a tool call request structure and an execution status snapshot for each call step in the external tool call chain, for the corresponding subtask node in the task planning directed acyclic graph; to schedule and sort the tool call request structure according to the dependencies between nodes, so as to ensure that the output of the preceding call is used as the input of the subsequent call; and to trigger a hierarchical rollback operation when a tool call anomaly is detected, based on the anomaly type and the position of the anomaly node in the task planning directed acyclic graph.
[0149] In an exemplary embodiment, the update module 708 is specifically used to add the context data and intermediate results during the execution of this task as new plot memory entries to the short-term working memory area; after the task is completed, the relevant entries in the short-term working memory area are abstracted and summarized to generate structured semantic knowledge entries and stored in the long-term semantic memory; the verified task execution path and tool call sequence that have reached the preset success threshold are parameterized into reusable process templates, stored in the program memory, and the existing relevant templates in the program memory are iterated or their confidence is adjusted.
[0150] In an exemplary embodiment, the update module 708 is further configured to periodically sample historical task trajectory data from the program memory and calculate the comprehensive reward value for each historical task trajectory; adopt a policy optimization algorithm based on group reinforcement learning and update the policy model with historical task trajectories as training samples with the goal of maximizing the long-term accumulation of comprehensive reward value; and optimize the retrieval index of the long-term semantic memory or adjust the priority of process templates in the program memory using the feature weights output by the updated policy model.
[0151] In an exemplary embodiment, the update module 708 is further configured to generate a structured reflection entry containing task execution evaluation results and optimization strategies; write the structured reflection entry into shared memory and establish an association index with the relevant historical memory entry that triggered the task; based on the established association index, when processing the same or similar task intent again, jointly retrieve the structured reflection entry and the historical memory entry to optimize task planning or dynamic routing decisions.
[0152] The modules in the aforementioned APP intelligent marketing service device based on intelligent routing and multi-agent collaboration can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0153] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The database stores user-initiated queries or trigger event information generated based on user behavior monitoring. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an APP intelligent marketing service method based on intelligent routing and multi-agent collaboration.
[0154] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0155] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0156] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0157] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described above.
[0158] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0159] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0160] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0161] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for providing intelligent marketing services for apps based on intelligent routing and multi-agent collaboration, characterized in that, Applied to a master control intelligent agent server, the method includes: Receive input information, including user-initiated queries or trigger event information generated based on user behavior monitoring; The input information is semantically parsed and intent is identified, and a directed acyclic graph for task planning is generated based on the identification results. The directed acyclic graph for task planning contains multiple sub-task nodes and dependencies between nodes. Based on the directed acyclic graph of the task planning, the state and historical performance indicators of each functional agent, dynamic routing is performed to assign the multiple subtasks to the corresponding functional agents. The functional agents include user profiling agents, marketing strategy agents, knowledge retrieval agents, dialogue execution agents, and reflection and optimization agents. During the execution of the multiple subtasks, the external tool call chain initiated by the functional intelligent agent, which includes multiple steps, is subject to dependency scheduling and state consistency management, and the shared memory associated with the user is updated based on the execution results.
2. The method according to claim 1, characterized in that, The generation of the directed acyclic graph for task planning based on the recognition results includes: If the input information is a trigger event information generated based on user behavior monitoring, the trigger event information is matched with a preset marketing opportunity rule base; If a match is successful, the pre-stored task flow template is invoked, and the task flow template is instantiated in combination with the current user context state to generate the directed acyclic graph of the task planning.
3. The method according to claim 1, characterized in that, The dependency scheduling and state consistency management of the external tool call chain initiated by the functional intelligent agent, which includes multiple steps, includes: For each call step in the external tool call chain, a corresponding subtask node is planned in the directed acyclic graph of the task, and a tool call request structure and execution status snapshot are created. Based on the dependencies between nodes, the tool call request structure is scheduled and sorted to ensure that the output of the preceding call is used as the input of the following call; If an abnormal tool call is detected, a tiered rollback operation is triggered based on the type of abnormality and the location of the abnormal node in the directed acyclic graph of the task planning.
4. The method according to claim 1, characterized in that, The step of updating the shared memory associated with the user based on the execution result includes: The context data and intermediate results during the execution of this task will be added to the short-term working memory area as new episode memory entries. After the task is completed, the relevant entries in the short-term working memory are abstracted and summarized to generate structured semantic knowledge entries and store them in the long-term semantic memory. The verified task execution paths and tool call sequences that have reached the preset success threshold are parameterized into reusable process templates, stored in the program memory, and the existing related templates in the program memory are iterated or their confidence levels are adjusted.
5. The method according to claim 4, characterized in that, The method further includes: Historical task trajectory data is periodically sampled from the program memory, and the comprehensive reward value for each historical task trajectory is calculated. A policy optimization algorithm based on group reinforcement learning is adopted, with the goal of maximizing the long-term accumulation of the comprehensive reward value, and the policy model is updated using the historical task trajectory as training samples. By utilizing the feature weights output by the updated strategy model, the retrieval index of the long-term semantic memory is optimized or the priority of process templates in the program memory is adjusted.
6. The method according to claim 1, characterized in that, The method further includes: Generate structured reflection entries that include task execution evaluation results and optimization strategies; The structured reflection entries are written into the shared memory, and an association index is established with the relevant historical memory entries that triggered the task; Based on the established association index, when processing the same or similar task intent again, the structured reflection entries and the historical memory entries are jointly retrieved to optimize task planning or dynamic routing decisions.
7. An APP intelligent marketing service device based on intelligent routing and multi-agent collaboration, characterized in that, The device includes: The receiving module is used to receive input information, including user-initiated queries or trigger event information generated based on user behavior monitoring. The generation module is used to perform semantic parsing and intent recognition on the input information, and generate a directed acyclic graph of task planning based on the recognition results. The directed acyclic graph of task planning contains multiple sub-task nodes and dependencies between nodes. The execution module is used to perform dynamic routing based on the directed acyclic graph of the task planning, the state and historical performance indicators of each functional agent, so as to assign the multiple subtasks to the corresponding functional agents. The functional agents include user profiling agents, marketing strategy agents, knowledge retrieval agents, dialogue execution agents and reflection and optimization agents. The update module is used to perform dependency scheduling and state consistency management on the external tool call chain initiated by the functional agent, which includes multiple steps, during the execution of the multiple sub-tasks, and to update the shared memory associated with the user based on the execution results.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Cited By
Task planning method and device, electronic equipment, medium and product
CN122047972A
Intelligent agent planning enhancement method based on knowledge graph
CN122132147A
An ai intelligent agent memory management method and device based on a postgresql database
CN122285707A