Investment decision generation method and device in multi-agent cooperative environment, equipment and medium
Patent Information
- Application Number
- CN202611081957.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-08-18
AI Technical Summary
[0015] In summary, this application obtains the target investment task of the target intelligent agent, classifies the target investment task using a preset lightweight intent classification model in the target intelligent agent to obtain corresponding investment intent tags, and executes a hierarchical recall strategy based on the investment intent tags using a two-dimensional orthogonal preset memory storage architecture to obtain initial memory fragments for each layer. The preset memory storage architecture is divided into a private memory layer and a public memory layer according to permission affiliation, and into a working memory layer, a contextual memory layer, and a semantic memory layer according to time and abstraction level. Based on the timestamps of the initial memory fragments in each layer and/or the role permissions of the source intelligent agent, semantic fusion is performed on the initial memory fragments of each layer. The investment conflict resolution process obtains processed memory fragments for each layer. The source agent is the agent that generates and uploads the initial memory fragments in a multi-agent collaborative environment. The processed memory fragments for each layer are relevance-scored using preset indicators to generate corresponding scoring results. Based on the scoring results, target memory fragments that meet preset scoring conditions are determined. Each target memory fragment is compressed using a preset summary model in the target agent to obtain compressed memory fragments. These compressed memory fragments are then concatenated to generate an enhanced context, which is then filled into the prompt word template of the target agent to output the target investment decision result for the target investment task. As can be seen, this application uses a lightweight intent classification model to identify the intent of the target investment task, obtains investment intent tags, performs hierarchical recall based on a two-dimensional orthogonal memory storage architecture, and obtains the initial memory fragments for each layer. Subsequently, these fragments are semantically fused and investment conflict-resolved using timestamps and role permissions. Target memory fragments that meet the conditions are then selected through relevance scoring. Finally, an enhanced context is generated by compressing and concatenating these fragments using a summary model and filled into the prompt word template to output the target investment decision result. This approach resolves the CoT (Cooperation of Trust) overreach and logical contamination issues that arise in traditional flat vector library architectures due to multi-agent collaboration, ensuring that each agent has independent thinking space while strictly adhering to global consensus. Simultaneously, the investment conflict resolution engine can quickly arbitrate temporal and permission issues when multiple sources of information contradict each other, ensuring the absolute logical uniqueness of the context input to the large model and eliminating the illusion caused by receiving contradictory information in LLM (Limited Modeling).
Smart Images

Figure CN122597085A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of investment research, and in particular to a method, apparatus, equipment and medium for generating investment decisions in a multi-agent collaborative environment. Background Technology
[0002] In recent years, multi-agent system technology based on large language models has developed rapidly. In complex business processes, it is often necessary to introduce agents with different functions to collaborate through directed graphs or workflows. During the interaction of multiple agents, a large amount of internal reasoning, environmental state, message broadcasting, and collaborative decision-making data are generated, which constitute the "distributed memory" of the multi-agent system.
[0003] Currently, existing memory retrieval technologies typically employ a single vector database for flattened storage and similarity retrieval. Typical implementation schemes include: unified storage architecture: storing all agents' memory data in the same vector database without distinguishing permissions or levels; similarity-based retrieval: returning the Top-K most similar memory fragments by calculating the cosine similarity between the query vector and the stored vector; and fixed-window context management: retaining only the most recent N rounds of dialogue as short-term memory, discarding or simply archiving any excess.
[0004] In summary, how to achieve multi-agent memory collaborative management in complex business scenarios is an urgent problem to be solved. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for generating investment decisions in a multi-agent collaborative environment, capable of realizing multi-agent memory collaborative management in complex business scenarios. The specific solution is as follows: Firstly, this application provides a method for generating investment decisions in a multi-agent collaborative environment, including: The target investment task is obtained and input into the target agent for investment decision-making. The target investment task is classified using a preset lightweight intent classification model in the target agent to obtain the corresponding investment intent label. Based on the investment intention tag, a hierarchical recall strategy is executed according to a two-dimensional orthogonal preset memory storage architecture to obtain the initial memory fragments of each layer; wherein, the preset memory storage architecture is divided into a private memory layer and a public memory layer according to the ownership of permissions, and into a working memory layer, a contextual memory layer and a semantic memory layer according to time and the degree of abstraction. Based on the timestamps of the initial memory fragments in each layer and / or the role permissions of the source agent, semantic fusion and investment conflict resolution are performed on the initial memory fragments of each layer to obtain the processed memory fragments of each layer. The source agent is the agent that generates and uploads the initial memory fragments in a multi-agent collaborative environment. If the investment intention tag includes querying historical causal events, a query vector corresponding to the target investment task is generated. Based on the query vector, a preset approximate nearest neighbor search operation is performed on the event fragments where the private memory layer and the context memory layer intersect to obtain a first preset number of initial candidate memory fragments that meet the preset most similarity condition. The similarity score between the target investment task and each memory fragment is determined, and a target similarity score that meets the preset maximum condition is obtained. It is determined whether the target similarity score is less than a preset safety threshold. If so, a downgrade signal is triggered, and the preset approximate nearest neighbor search operation is re-executed in the consensus resolution where the public memory layer and the context memory layer intersect to obtain a second preset number of first candidate memory fragments that meet the preset most similarity condition. If not, the initial candidate memory fragments are directly used as the first candidate memory fragments. The initial memory fragments are determined based on the first candidate memory fragments. The relevance of the processed memory fragments in each layer is scored by preset indicators to generate corresponding scoring results. Based on the scoring results, target memory fragments that meet the preset scoring conditions are determined. Based on the preset summary model in the target agent, each target memory fragment is compressed to obtain a compressed memory fragment. The compressed memory fragments are then spliced together to generate an enhanced context. The enhanced context is then filled into the prompt word template of the target agent to output the target investment decision result of the target investment task.
[0006] Optionally, the step of classifying the target investment task using a preset lightweight intent classification model in the target agent to obtain corresponding investment intent tags includes: The target investment task is input into a pre-trained intent classification model, which outputs structured investment intent labels that characterize the category of retrieval needs. The investment intent tags include any one or more of the following: querying recent context, querying historical causal events, querying global graph relationships, or querying group decision status.
[0007] Optionally, the process of executing a hierarchical recall strategy based on a two-dimensional orthogonal preset memory storage architecture according to the investment intention tag further includes: If the investment intention tag includes querying recent context, then the similarity between the target investment task and each memory segment of the private memory layer is determined. Based on the similarity, determine whether there is a memory fragment that meets the preset hit condition; If the preset hit condition is met, the corresponding second candidate memory fragment is output, and the process ends directly. If the preset hit conditions are not met, the step of executing the hierarchical recall strategy based on the preset two-dimensional orthogonal memory storage architecture according to the investment intention tag continues; If the investment intention tag includes querying global graph relationships, then the global knowledge graph of the semantic memory layer is obtained, entity or event identifiers in the target investment task are extracted, and multi-hop retrieval is performed in the global knowledge graph based on the entity or event identifiers to extract a relational subgraph containing multi-agent collaborative paths as a third candidate memory fragment. Accordingly, the determination of the initial memory segments for each layer includes: The first candidate memory fragment, the second candidate memory fragment, and the third candidate memory fragment are integrated to obtain the initial memory fragments of each layer.
[0008] Optionally, based on the timestamps of the initial memory fragments in each layer and / or the role permissions of the source agent, semantic fusion and investment conflict resolution are performed on the initial memory fragments of each layer to obtain the processed memory fragments of each layer, including: Determine the semantic spatial distance between the initial memory fragments in each layer; Determine whether the semantic space distance between each statement is lower than a preset deduplication threshold; If there is a semantic space distance lower than the preset deduplication threshold, then lightweight text similarity clustering is performed on the initial memory fragments of each layer to obtain clustered memory fragments. Compare the timestamps of the clustered memory fragments in the private memory layer and the public memory layer; If the timestamp of the first clustered memory segment of the public memory layer is later than the timestamp of the second clustered memory segment of the private memory layer, then the second clustered memory segment is removed, or a penalty decay operation is performed on the second clustered memory segment. Obtain the authoritative rating of the source agent's role permissions in the preset memory storage architecture; If the authority score of the first agent that publishes the first clustered memory fragment is higher than the authority score of the second agent that generates the second clustered memory fragment, then the first clustered memory fragment is retained as a processed memory fragment.
[0009] Optionally, the preset indicators include any one or more of the following: time decay factor, vector correlation factor, preset importance factor, and logical uncertainty penalty factor; Accordingly, the relevance of the processed memory fragments in each layer is scored using preset indicators to generate corresponding scoring results. Based on the scoring results, target memory fragments that meet preset scoring conditions are determined, including: The time decay factor, vector correlation factor, and preset importance factor of the processed memory segment are weighted and summed by preset weights, and the penalty score corresponding to the logical uncertainty penalty factor is subtracted from the weighted summation result to generate a corresponding score result. Based on the score result, a third preset number of target memory segments that meet the preset score conditions are determined.
[0010] Optionally, the step of compressing information from each target memory fragment based on a preset summary model in the target agent to obtain compressed memory fragments, and then concatenating the compressed memory fragments to generate an enhanced context, includes: The target memory fragment is compressed and refined using a summary language model to obtain a compressed memory fragment. The compressed memory segments are arranged in a preset ascending order based on their timestamps, and then spliced together to generate an enhanced context containing causal temporal relationships.
[0011] Optionally, the step of filling the enhanced context into the prompt word template of the target agent to output the target investment decision result of the target investment task includes: The enhanced context is added as a structured field to the prompt word template corresponding to the target agent to obtain the reconstructed decision prompt words; Based on the reconstructed decision prompts, the target agent is driven to output a target investment decision result that includes decision actions, execution objects, and constraints.
[0012] Secondly, this application provides an investment decision generation device in a multi-agent collaborative environment, comprising: The tag acquisition module is used to acquire the target investment task of the target intelligent agent, and to classify the target investment task using a preset lightweight intent classification model in the target intelligent agent to obtain the corresponding investment intent tags. The fragment acquisition module is used to execute a hierarchical recall strategy based on a two-dimensional orthogonal preset memory storage architecture according to the investment intention tag, so as to obtain the initial memory fragments of each layer; wherein, the preset memory storage architecture is divided into a private memory layer and a public memory layer according to permission ownership, and into a working memory layer, a contextual memory layer, and a semantic memory layer according to time and abstraction level; wherein, if the investment intention tag includes querying historical causal events, a query vector corresponding to the target investment task is generated, and a preset approximate nearest neighbor search operation is performed on the event fragments that intersect the private memory layer and the contextual memory layer based on the query vector, so as to obtain the event fragments that satisfy the preset most similar condition. A first preset number of initial candidate memory segments are selected, and the similarity score between the target investment task and each memory segment is determined to obtain a target similarity score that meets a preset maximum condition. It is then determined whether the target similarity score is less than a preset safety threshold. If so, a downgrade signal is triggered, and the preset approximate nearest neighbor search operation is re-executed at the consensus resolution where the common memory layer and the context memory layer intersect, to obtain a second preset number of first candidate memory segments that meet the preset most similar condition. If not, the initial candidate memory segments are directly used as the first candidate memory segments. The initial memory segments are determined based on the first candidate memory segments. The first segment determination module is used to perform semantic fusion and investment conflict resolution on the initial memory segments of each layer based on the timestamp of the initial memory segments of each layer and / or the role and permissions of the source agent, so as to obtain the processed memory segments of each layer; the source agent is the agent that generates and uploads the initial memory segments in a multi-agent collaborative environment. The second segment determination module is used to score the relevance of the processed memory segments of each layer using preset indicators to generate corresponding scoring results, and to determine the target memory segments that meet the preset scoring conditions based on the scoring results. The result output module is used to compress information from each target memory fragment based on a preset summary model in the target agent to obtain compressed memory fragments, splice the compressed memory fragments to generate an enhanced context, and fill the enhanced context into the prompt word template of the target agent to output the target investment decision result of the target investment task.
[0013] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the investment decision generation method in a multi-agent collaborative environment as described above.
[0014] Fourthly, this application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the investment decision generation method in a multi-agent cooperative environment as described above.
[0015] In summary, this application obtains the target investment task of the target intelligent agent, classifies the target investment task using a preset lightweight intent classification model in the target intelligent agent to obtain corresponding investment intent tags, and executes a hierarchical recall strategy based on the investment intent tags using a two-dimensional orthogonal preset memory storage architecture to obtain initial memory fragments for each layer. The preset memory storage architecture is divided into a private memory layer and a public memory layer according to permission affiliation, and into a working memory layer, a contextual memory layer, and a semantic memory layer according to time and abstraction level. Based on the timestamps of the initial memory fragments in each layer and / or the role permissions of the source intelligent agent, semantic fusion is performed on the initial memory fragments of each layer. The investment conflict resolution process obtains processed memory fragments for each layer. The source agent is the agent that generates and uploads the initial memory fragments in a multi-agent collaborative environment. The processed memory fragments for each layer are relevance-scored using preset indicators to generate corresponding scoring results. Based on the scoring results, target memory fragments that meet preset scoring conditions are determined. Each target memory fragment is compressed using a preset summary model in the target agent to obtain compressed memory fragments. These compressed memory fragments are then concatenated to generate an enhanced context, which is then filled into the prompt word template of the target agent to output the target investment decision result for the target investment task. As can be seen, this application uses a lightweight intent classification model to identify the intent of the target investment task, obtains investment intent tags, performs hierarchical recall based on a two-dimensional orthogonal memory storage architecture, and obtains the initial memory fragments for each layer. Subsequently, these fragments are semantically fused and investment conflict-resolved using timestamps and role permissions. Target memory fragments that meet the conditions are then selected through relevance scoring. Finally, an enhanced context is generated by compressing and concatenating these fragments using a summary model and filled into the prompt word template to output the target investment decision result. This approach resolves the CoT (Cooperation of Trust) overreach and logical contamination issues that arise in traditional flat vector library architectures due to multi-agent collaboration, ensuring that each agent has independent thinking space while strictly adhering to global consensus. Simultaneously, the investment conflict resolution engine can quickly arbitrate temporal and permission issues when multiple sources of information contradict each other, ensuring the absolute logical uniqueness of the context input to the large model and eliminating the illusion caused by receiving contradictory information in LLM (Limited Modeling). Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0017] Figure 1 This application discloses a flowchart of an investment decision generation method in a multi-agent collaborative environment. Figure 2 This application discloses a specific two-dimensional orthogonal memory storage architecture diagram; Figure 3 This is a schematic diagram illustrating a specific hierarchical memory retrieval and conflict resolution method disclosed in this application; Figure 4 This is a schematic diagram of an investment decision generation device in a multi-agent collaborative environment disclosed in this application. Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Currently, existing memory retrieval technologies typically employ a single vector database for flattened storage and similarity retrieval. Typical implementations include: a unified storage architecture where all agents' memory data is stored in the same vector database without distinction of permissions or hierarchies; similarity-based retrieval, which returns the Top-K most similar memory fragments by calculating the cosine similarity between the query vector and the stored vector; and fixed-window context management, retaining only the most recent N rounds of dialogue as short-term memory, discarding or simply archiving any remaining content. To address these technical issues, this application discloses a method, apparatus, device, and medium for generating investment decisions in a multi-agent collaborative environment, enabling collaborative memory management for multiple agents in complex business scenarios.
[0020] See Figure 1 As shown in the figure, this invention discloses an investment decision generation method in a multi-agent collaborative environment, including: Step S11: Obtain the target investment task and input it into the target agent for investment decision-making. Use the preset lightweight intent classification model in the target agent to classify the intent of the target investment task to obtain the corresponding investment intent label.
[0021] In this embodiment, the target investment task is input into a pre-trained intent classification model, which outputs structured investment intent tags representing the retrieval demand category. These investment intent tags include any one or more of the following: querying recent context, querying historical causal events, querying global graph relationships, or querying group decision states. Specifically, the target investment task is input into a pre-trained lightweight intent classification model, which can be constructed using a Transformer-based small-parameter classification network, a BERT (Bidirectional Encoder Representations from Transformers, pre-trained language model) classifier, or a distilled language model. The model performs semantic parsing on the keywords, entity objects, event types, time ranges, and decision objectives in the input task, and outputs structured investment intent tags representing the retrieval demand category. These investment intent tags include, but are not limited to, querying recent context; querying historical causal events; querying global graph relationships; querying group decision states; querying risk constraint rules; and querying historical execution results.
[0022] Step S12: Execute a hierarchical recall strategy based on a two-dimensional orthogonal preset memory storage architecture according to the investment intention tag to obtain the initial memory fragments of each layer.
[0023] In this embodiment, the following is constructed: Figure 2 The pre-defined memory storage architecture shown is based on two-dimensional orthogonality. It coordinates the memory fragments of various agents and divides them according to the dimensions of permission ownership, time, and abstraction. By permission ownership, it is divided into a private memory layer and a public memory layer; by time and level of abstraction, it is divided into a working memory layer, a contextual memory layer, and a semantic memory layer. The retrieval engine dynamically selects the corresponding memory layer for targeted recall based on intent tags. The private memory layer is for each independent agent within the system. iA physically isolated independent storage space is established. Only the current agent has read and write permissions; other agents cannot see it. This space is specifically used to store the agent's undisclosed CoT (Consensual Thoughts), historical execution instructions, internal transient states, and private variables. The common memory layer is a shared storage space for all collaborating agents or agents within a specific group. It consists of an environment state bus, group broadcast messages, final collaborative decisions reached between agents, and a standardized global business knowledge base. The working memory layer includes short-term transient memory. It employs high-performance memory-based queue storage, managing the context or interaction states of the most recent N rounds in the current task chain based on a sliding window. The context memory layer includes long-term historical event memory. It is stored in a distributed vector database, organized temporally using event chunks as the basic unit, recording causal logic fragments of historical execution. The semantic memory layer includes structured high-order knowledge. It is stored in a graph database, consisting of a directed graph of entities, attributes, and collaborative relationships extracted from context memory and common decisions by the asynchronous Consolidation module.
[0024] In this embodiment, if the investment intention tag includes querying historical causal events, a query vector corresponding to the target investment task is generated. Based on the query vector, a preset approximate nearest neighbor search operation is performed on the event fragments where the private memory layer and the context memory layer intersect to obtain a first preset number of initial candidate memory fragments that satisfy the preset most similarity condition. The similarity score between the target investment task and each memory fragment is determined, and a target similarity score that satisfies the preset maximum condition is obtained. It is determined whether the target similarity score is less than a preset safety threshold. If so, a downgrade signal is triggered, and the preset approximate nearest neighbor search operation is re-executed in the consensus resolution where the public memory layer and the context memory layer intersect to obtain a second preset number of first candidate memory fragments that satisfy the preset most similar condition. If not, the initial candidate memory fragments are directly used as the first candidate memory fragments. Specifically, firstly, an approximate nearest neighbor search is performed in the private context memory library where the private memory layer of the target agent intersects with the context memory layer to obtain the top K1 most similar memory fragments, and the original vector similarity score Sim for each fragment is calculated. private Set a system-level security routing threshold T. fallback The search engine determines whether the similarity of the currently recalled Top-1 segments meets the following criteria: Sim private (Top1) <T fallback If Sim private (Top1) <T fallback The establishment indicates that the current private history of the intelligent agent is insufficient to support the understanding of the intention. The routing gateway triggers a degradation signal, smoothly enters the public context memory across layers to perform a secondary retrieval, and recalls the first K2 public event fragments.
[0025] In this embodiment, if the investment intent tag includes querying recent context, the similarity between the target investment task and each memory segment of the private memory layer is determined; based on the similarity, it is determined whether any memory segment meets the preset hit condition; if the preset hit condition is met, the corresponding second candidate memory segment is output, and the process ends directly; if the preset hit condition is not met, the step of executing the hierarchical recall strategy based on the investment intent tag using a two-dimensional orthogonal preset memory storage architecture continues. Specifically, if the investment intent tag includes querying recent context, the working memory layer in the private memory layer corresponding to the target agent is accessed first. Direct interception and precise matching or sliding window extraction are performed from the private working memory queue physically isolated from the current agent; if a match is found, the retrieval ends directly.
[0026] In this embodiment, if the investment intention tag includes querying global graph relationships, then the global knowledge graph of the semantic memory layer is obtained, entity or event identifiers in the target investment task are extracted, and multi-hop retrieval is performed in the global knowledge graph based on the entity or event identifiers to extract a relational subgraph containing multi-agent collaborative paths as a third candidate memory segment. Specifically, entity and event IDs in the input are extracted and entered into the public semantic memory graph. Multi-hop retrieval is performed on the graph using a graph query language or graph attention network to extract a relational subgraph containing multi-agent collaborative paths.
[0027] In addition, if the investment intention tag includes querying the decision status of the group, the corresponding public consensus can be obtained directly from the public memory layer.
[0028] Finally, the memory fragments at each level are integrated to obtain the initial memory fragments for each level.
[0029] Step S13: Based on the timestamps of the initial memory fragments in each layer and / or the role permissions of the source agent, perform semantic fusion and investment conflict resolution on the initial memory fragments in each layer to obtain the processed memory fragments in each layer; the source agent is the agent that generates and uploads the initial memory fragments in a multi-agent collaborative environment.
[0030] In this embodiment, the semantic space distance between the initial memory fragments of each layer is determined; it is determined whether each semantic space distance is lower than a preset deduplication threshold; if there is a semantic space distance lower than the preset deduplication threshold, lightweight text similarity clustering is performed on the initial memory fragments of each layer to obtain clustered memory fragments; the timestamps of the clustered memory fragments of the private memory layer and the public memory layer are compared; if the timestamp of the first clustered memory fragment of the public memory layer is later than the timestamp of the second clustered memory fragment of the private memory layer, the second clustered memory fragment is removed, or a penalty decay operation is performed on the second clustered memory fragment; the authority score of the role permission of the source agent in the preset memory storage architecture is obtained; if the authority score of the first agent who published the first clustered memory fragment is higher than the authority score of the second agent who generated the second clustered memory fragment, the first clustered memory fragment is retained as a processed memory fragment.
[0031] Specifically, since working memory and long-term episodic memory may have overlapping representations, the semantic distance between any two memory segments is first calculated. This involves mapping all memory segments retrieved through multiple channels to high-dimensional vectors and calculating the Euclidean or cosine distance between each pair of segments. If the distance is less than the deduplication threshold T... dedup If these fragments belong to the same semantic cluster, lightweight text similarity clustering is used to retain only the one-sided fragments with the highest information density or the most recent timestamp, and redundant tokens caused by coarse retrieval are removed to obtain the corresponding processed memory fragments.
[0032] Then, when private memory and public memory semantically contradict or conflictingly describe the same subject, it triggers, for example... Figure 3 The conflict resolution process shown first compares the UTC timestamps of the two conflicting segments in the database using a retrieval engine. If the consensus resolution timestamp T in the public memory pool... public_consensus The internal state timestamp T is later than the private memory. private_CoT If the old private mindset is deemed invalid, the private fragment is forcibly removed from the recall list, or its relevance weight is penalized by attenuation, that is, the corresponding memory fragment is defined as the penalty term P. conflict In the calculation of the overall score, the penalty item is given a very large constant value, which causes its final overall score to become negative. It is naturally eliminated during the Top-N truncation and receives the corresponding processed memory fragment.
[0033] Next, a static authority score based on the multi-agent role definition is introduced. In a collaborative network, if the agent that publishes the public consensus has a higher policy weight, such as the global restriction instruction issued by the risk control agent, then the historical lenient policies stored in the private scenario library of the executing agent will be automatically overridden, and the corresponding processed memory fragments will be obtained.
[0034] Step S14: Use preset indicators to score the relevance of the processed memory fragments in each layer to generate corresponding scoring results, and determine the target memory fragments that meet the preset scoring conditions based on the scoring results.
[0035] In this embodiment, the time decay factor, vector correlation factor, and preset importance factor of the processed memory segment are weighted and summed using preset weights, and the penalty score corresponding to the logical uncertainty penalty factor is subtracted from the weighted summation result to generate a corresponding score result. Based on the score result, a third preset number of target memory segments that meet the preset score conditions are determined. The preset indicators include any one or more of the time decay factor, vector correlation factor, preset importance factor, and logical uncertainty penalty factor.
[0036] Specifically, for the clean candidate memory fragment set after deduplication and conflict resolution, the value of m for each fragment is calculated. i Final composite score (Score): Score(m i )=α·R recency (m i )+β·R relevance (m i )+γ·R importance (m i )-δ·P conflict (m i ); Among them, R recency R is the time decay factor; relevance For vector similarity or graph matching scores; R importance An objective score is given to the importance of memory fragments as marked by the large model upon entry into the database; P conflict The term represents a penalty for potential logical uncertainty; α, β, γ, and δ are configurable hyperparameters that satisfy α+β+γ=1, and δ is a preset weight value for the penalty term. The final scores are sorted in descending order, and the top-N highest-quality, logically self-consistent target memory segments are truncated and obtained.
[0037] Step S15: Based on the preset summary model in the target agent, compress the information of each target memory fragment to obtain compressed memory fragments, splice the compressed memory fragments to generate an enhanced context, and fill the enhanced context into the prompt word template of the target agent to output the target investment decision result of the target investment task.
[0038] In this embodiment, a summary language model is used to compress and refine the target memory fragments, resulting in compressed memory fragments. These compressed memory fragments are then arranged in ascending order based on their timestamps and concatenated to generate an enhanced context containing causal and temporal relationships. Specifically, the summary language model extracts core information from the memory fragments, such as investment targets, market events, risk states, agent decisions, execution results, and constraint rules, while retaining causal relationships and key time information between events. Redundant descriptions, intermediate reasoning processes, and repetitive content are removed, resulting in compressed memory fragments with higher information density. Subsequently, the timestamp information corresponding to each compressed memory fragment is read and arranged in ascending order according to chronological sequence, allowing memory content from different sources and levels to be organized according to the actual occurrence process. After sorting, the compressed memory fragments are further logically concatenated based on the triggering, influence, and decision-making transmission relationships between events to construct a continuous event evolution chain.
[0039] In this embodiment, the enhanced context is added to the prompt word template corresponding to the target agent in the form of structured fields to obtain the reconstructed decision prompt words. Based on the reconstructed decision prompt words, the target agent is driven to output a target investment decision result containing decision actions, execution objects, and constraints. Specifically, the enhanced context fields contain compressed key historical events, public consensus resolutions, collaborative relationship information, and risk control rules, organized in chronological order to provide the target agent with a complete and coherent decision-making basis. Subsequently, the reconstructed decision prompt words are input into the large language model corresponding to the target agent for inference calculation. The target agent combines the current market input data with the historical experience and constraints in the enhanced context to comprehensively analyze the market state, risk level, and execution feasibility, generating a target investment decision result that conforms to the collaborative rules. The target investment decision result includes decision actions, execution objects, and constraints. The decision actions can be operations such as buying, selling, holding, reducing positions, or adjusting positions. The execution objects can be specific securities, funds, futures contracts, or other financial assets. The constraints include position limits, risk exposure restrictions, fund usage limits, and public risk control rules.
[0040] As described above, this embodiment of the application uses a lightweight intent classification model to identify the intent of the target investment task. After obtaining the investment intent label, it performs hierarchical recall based on a two-dimensional orthogonal memory storage architecture to obtain the initial memory fragments of each layer. Subsequently, it combines timestamps and role permissions to perform semantic fusion and investment conflict resolution on these fragments. Then, it uses relevance scoring to filter out target memory fragments that meet the conditions. Finally, it uses a summary model to compress and splice the fragments to generate an enhanced context, which is then filled into the prompt word template to output the target investment decision result. In this way, it solves the problem of CoT over-authority retrieval and logical mutual contamination caused by multi-agent collaboration in the traditional flat vector library architecture, ensuring that each agent has independent thinking space while strictly following the global consensus. At the same time, the investment conflict resolution engine can quickly perform temporal and permission arbitration when there are contradictions in multi-source information, ensuring that the context input to the large model has absolute logical uniqueness and eliminating the illusion caused by LLM receiving contradictory information.
[0041] Based on the previous embodiment, this application discloses an investment decision generation method in a multi-agent collaborative environment, which can realize multi-agent memory collaborative management in complex business scenarios. When an investment manager responsible for the technology sector receives the target investment task of "evaluating the safety of long positions in ChiNext ETFs and the amount of positions that can be opened", the target task is input into the investment manager's private agent. Next, the investment decision generation method in a multi-agent collaborative environment will be described in detail.
[0042] First, the lightweight intent classification model built into the agent is invoked to analyze the target task and quickly determine the corresponding investment intent tag.
[0043] Subsequently, based on the investment intent tag, a tiered recall was conducted within a pre-defined two-dimensional orthogonal memory storage architecture. Specifically, the internal reasoning fragments generated during backtesting were retrieved from the agent's private contextual memory. These fragments had previously suggested "inertial upward movement, 100% buy-in." However, due to significant differences between the current market volatility characteristics and the stable environment during backtesting, the cosine similarity score fell below the pre-defined downgrade threshold. This automatically triggered cross-layer routing, successfully retrieving the global risk control instruction issued by the risk control-questioning agent five minutes prior from the public contextual memory pool: "Single purchases must not exceed 30%."
[0044] At this point, two contradictory initial memory fragments are obtained: the private fragment suggests a full-position buy, while the public fragment limits the position to 30%. Based on the timestamps of each fragment and the role permissions of the source agent, the semantic fusion and conflict resolution engine is activated: by querying the multi-agent role configuration table, it is identified that the agent questioning risk control has the highest authority level in the position limit management dimension, and its instruction timestamp is later than the agent's old inference time. Therefore, a logical uncertainty penalty is imposed on the private fragment, and the public fragment is promoted to the optimal level.
[0045] Subsequently, public risk control fragments that meet the criteria are selected through relevance scoring. These fragments are then compressed and concatenated using a summarization model to generate enhanced context, which is then filled into the agent's prompt word template. Finally, the large model eliminates its own historical bias in the injected context and outputs a decision result: maintaining a bullish bias but strictly sending buy orders to the transaction execution agent within a 30% limit.
[0046] See Figure 4 As shown, this embodiment of the invention discloses an investment decision generation device in a multi-agent collaborative environment, comprising: The tag acquisition module 11 is used to acquire the target investment task of the target intelligent agent, and to classify the target investment task by the preset lightweight intent classification model in the target intelligent agent to obtain the corresponding investment intent tag. The fragment acquisition module 12 is used to execute a hierarchical recall strategy based on a two-dimensional orthogonal preset memory storage architecture according to the investment intention tag, so as to obtain the initial memory fragments of each layer; wherein, the preset memory storage architecture is divided into a private memory layer and a public memory layer according to permission ownership, and into a working memory layer, a contextual memory layer and a semantic memory layer according to time and abstraction level; wherein, if the investment intention tag includes querying historical causal events, a query vector corresponding to the target investment task is generated, and a preset approximate nearest neighbor search operation is performed on the event fragments that intersect the private memory layer and the contextual memory layer based on the query vector, so as to obtain the most similar condition. The system firstly selects a first preset number of candidate memory segments and determines the similarity score between the target investment task and each memory segment, obtaining a target similarity score that meets a preset maximum condition; it then determines whether the target similarity score is less than a preset safety threshold; if so, it triggers a downgrade signal and re-executes the preset approximate nearest neighbor search operation at the consensus resolution where the common memory layer and the context memory layer intersect, to obtain a second preset number of first candidate memory segments that meet the preset most similar condition; if not, it directly uses the initial candidate memory segments as the first candidate memory segments; and determines the initial memory segments based on the first candidate memory segments. The first segment determination module 13 is used to perform semantic fusion and investment conflict resolution on the initial memory segments of each layer based on the timestamp of the initial memory segments of each layer and / or the role and permissions of the source agent, so as to obtain the processed memory segments of each layer; the source agent is the agent that generates and uploads the initial memory segments in a multi-agent collaborative environment. The second segment determination module 14 is used to score the relevance of the processed memory segments of each layer using preset indicators to generate corresponding scoring results, and to determine the target memory segments that meet the preset scoring conditions based on the scoring results. The result output module 15 is used to compress information of each target memory fragment based on the preset summary model in the target agent to obtain compressed memory fragments, splice each of the compressed memory fragments to generate an enhanced context, and fill the enhanced context into the prompt word template of the target agent to output the target investment decision result of the target investment task.
[0047] As shown above, this application uses a lightweight intent classification model to identify the intent of the target investment task. After obtaining the investment intent label, it performs hierarchical recall based on a two-dimensional orthogonal memory storage architecture to obtain the initial memory fragments of each layer. Subsequently, it combines timestamps and role permissions to perform semantic fusion and investment conflict resolution on these fragments. Then, it uses relevance scoring to filter out target memory fragments that meet the conditions. Finally, it uses a summarization model to compress and splice the fragments to generate enhanced context, which is then filled into the prompt word template to output the target investment decision result. In this way, it solves the problem of CoT over-authority retrieval and logical mutual contamination caused by multi-agent collaboration in the traditional flat vector library architecture, ensuring that each agent has independent thinking space while strictly following global consensus. At the same time, the investment conflict resolution engine can quickly perform temporal and permission arbitration when there are contradictions in multi-source information, ensuring that the context input to the large model has absolute logical uniqueness and eliminating the illusion caused by LLM receiving contradictory information.
[0048] In some specific embodiments, the tag acquisition module 11 may specifically include: The label output unit is used to input the target investment task into the pre-trained intent classification model and output structured investment intent labels that characterize the retrieval demand category; wherein, the investment intent labels include any one or more of the following: querying recent context, querying historical causal events, querying global graph relationships, or querying group decision states.
[0049] In some specific embodiments, the fragment acquisition module 12 may further include: A similarity determination unit is used to determine the similarity between the target investment task and each memory segment of the private memory layer if the investment intention tag includes a recent query context. A similarity determination unit is used to determine whether there is a memory fragment that meets a preset hit condition based on the similarity. The first similarity determination unit is used to output the corresponding second candidate memory fragment if the preset hit condition is met, and then directly end; The subgraph extraction unit is used to obtain the global knowledge graph of the semantic memory layer if the investment intention tag includes querying global graph relationships, extract entity or event identifiers in the target investment task, and perform multi-hop retrieval in the global knowledge graph based on the entity or event identifiers to extract the relationship subgraph containing multi-agent collaborative paths as the third candidate memory fragment. Accordingly, the determination of the initial memory segments for each layer may specifically include: The memory fragment acquisition unit is used to integrate the first candidate memory fragment, the second candidate memory fragment, and the third candidate memory fragment to obtain the initial memory fragments of each layer.
[0050] In some specific implementations, the first segment determination module 13 may specifically include: A distance determination unit is used to determine the semantic spatial distance between the initial memory segments of each layer; A distance determination unit is used to determine whether the distance between each semantic space is lower than a preset deduplication threshold. The memory fragment clustering unit is used to perform lightweight text similarity clustering on each layer of the initial memory fragments if there is a semantic space distance lower than a preset deduplication threshold, so as to obtain the clustered memory fragments. A timestamp comparison unit is used to compare the timestamps of clustered memory fragments in the private memory layer and the public memory layer. The timestamp determination unit is used to either remove the second clustered memory segment or perform a penalty decay operation on the second clustered memory segment if the timestamp of the first clustered memory segment of the public memory layer is later than the timestamp of the second clustered memory segment of the private memory layer. The rating acquisition unit is used to acquire the authoritative rating of the source agent's role and permissions in the preset memory storage architecture; The scoring and determination unit is used to retain the first clustered memory fragment as a processed memory fragment if the authoritative score of the first agent that publishes the first clustered memory fragment is higher than the authoritative score of the second agent that generates the second clustered memory fragment.
[0051] In some specific implementations, the preset index includes any one or more of the following: time decay factor, vector correlation factor, preset importance factor, and logical uncertainty penalty factor. Accordingly, the second segment determination module 14 may specifically include: The memory fragment determination unit is used to perform a weighted summation of the time decay factor, vector correlation factor, and preset importance factor of the processed memory fragment using preset weights, and to subtract the penalty score corresponding to the logical uncertainty penalty factor from the weighted summation result to generate a corresponding score result, and to determine a third preset number of target memory fragments that meet the preset score conditions based on the score result.
[0052] In some specific implementations, the result output module 15 may specifically include: The memory fragment extraction unit is used to compress and extract information from the target memory fragment using a summary language model to obtain a compressed memory fragment. The context generation unit is used to arrange the compressed memory segments in a preset ascending order according to the timestamps of each compressed memory segment, and to splice the compressed memory segments to generate an enhanced context containing causal temporal relationships.
[0053] In some specific implementations, the result output module 15 may specifically include: The prompt word acquisition unit is used to add the enhanced context in the form of structured fields to the prompt word template corresponding to the target agent to obtain the reconstructed decision prompt words; The result output unit is used to drive the target agent to output the target investment decision result containing the decision action, execution object and constraints based on the reconstructed decision prompt words.
[0054] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the investment decision generation method in a multi-agent collaborative environment disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0055] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0056] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon can include an operating system 221, computer programs 222, etc., and the storage method can be temporary storage or permanent storage.
[0057] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the investment decision generation method in a multi-agent collaborative environment disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0058] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned investment decision generation method in a multi-agent cooperative environment. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0059] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0060] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0061] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0062] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0063] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for generating investment decisions in a multi-agent collaborative environment, characterized in that, include: The target investment task is obtained and input into the target agent for investment decision-making. The target investment task is classified using a preset lightweight intent classification model in the target agent to obtain the corresponding investment intent label. Based on the investment intention tag, a hierarchical recall strategy is executed using a two-dimensional orthogonal preset memory storage architecture to obtain initial memory fragments for each layer. The preset memory storage architecture is divided into a private memory layer and a public memory layer according to permission affiliation, and into a working memory layer, a contextual memory layer, and a semantic memory layer according to time and abstraction level. If the investment intention tag includes querying historical causal events, a query vector corresponding to the target investment task is generated. Based on the query vector, a preset approximate nearest neighbor search operation is performed on the event fragments where the private memory layer and the contextual memory layer intersect to obtain a first preset number of initial candidate memory fragments that satisfy the preset most similarity condition. The similarity score between the target investment task and each memory fragment is determined, and a target similarity score satisfying the preset maximum condition is obtained. It is then determined whether the target similarity score is less than a preset safety threshold. If so, a downgrade signal is triggered, and the preset approximate nearest neighbor search operation is re-executed at the consensus resolution where the public memory layer and the contextual memory layer intersect to obtain a second preset number of first candidate memory fragments that satisfy the preset most similarity condition. If not, the initial candidate memory fragments are directly used as the first candidate memory fragments. The initial memory fragments are determined based on the first candidate memory fragments. Based on the timestamps of the initial memory fragments in each layer and / or the role permissions of the source agent, semantic fusion and investment conflict resolution are performed on the initial memory fragments in each layer to obtain the processed memory fragments in each layer; the source agent is the agent that generates and uploads the initial memory fragments in a multi-agent collaborative environment. The relevance of the processed memory fragments in each layer is scored by preset indicators to generate corresponding scoring results. Based on the scoring results, target memory fragments that meet the preset scoring conditions are determined. Based on the preset summary model in the target agent, each target memory fragment is compressed to obtain a compressed memory fragment. The compressed memory fragments are then spliced together to generate an enhanced context. The enhanced context is then filled into the prompt word template of the target agent to output the target investment decision result of the target investment task.
2. The investment decision generation method in a multi-agent collaborative environment according to claim 1, characterized in that, The step of classifying the target investment task using a preset lightweight intent classification model in the target agent to obtain corresponding investment intent tags includes: The target investment task is input into a pre-trained intent classification model, which outputs structured investment intent labels that characterize the category of retrieval needs. The investment intent tags include any one or more of the following: querying recent context, querying historical causal events, querying global graph relationships, or querying group decision status.
3. The investment decision generation method in a multi-agent collaborative environment according to claim 2, characterized in that, The process of executing a tiered recall strategy based on a two-dimensional orthogonal preset memory storage architecture according to the investment intention tag also includes: If the investment intention tag includes querying recent context, then the similarity between the target investment task and each memory segment of the private memory layer is determined. Based on the similarity, determine whether there is a memory fragment that meets the preset hit condition; If the preset hit condition is met, the corresponding second candidate memory fragment is output, and the process ends directly. If the preset hit conditions are not met, the step of executing the hierarchical recall strategy based on the preset two-dimensional orthogonal memory storage architecture according to the investment intention tag continues; If the investment intention tag includes querying global graph relationships, then the global knowledge graph of the semantic memory layer is obtained, entity or event identifiers in the target investment task are extracted, and multi-hop retrieval is performed in the global knowledge graph based on the entity or event identifiers to extract a relational subgraph containing multi-agent collaborative paths as a third candidate memory fragment. Accordingly, the determination of the initial memory segments for each layer includes: The first candidate memory fragment, the second candidate memory fragment, and the third candidate memory fragment are integrated to obtain the initial memory fragments of each layer.
4. The investment decision generation method in a multi-agent collaborative environment according to claim 1, characterized in that, Based on the timestamps of the initial memory fragments in each layer and / or the role permissions of the source agent, semantic fusion and investment conflict resolution are performed on the initial memory fragments of each layer to obtain the processed memory fragments of each layer, including: Determine the semantic spatial distance between the initial memory fragments in each layer; Determine whether the semantic space distance between each statement is lower than a preset deduplication threshold; If there is a semantic space distance lower than the preset deduplication threshold, then lightweight text similarity clustering is performed on the initial memory fragments of each layer to obtain clustered memory fragments. Compare the timestamps of the clustered memory fragments in the private memory layer and the public memory layer; If the timestamp of the first clustered memory segment of the public memory layer is later than the timestamp of the second clustered memory segment of the private memory layer, then the second clustered memory segment is removed, or a penalty decay operation is performed on the second clustered memory segment. Obtain the authoritative rating of the source agent's role permissions in the preset memory storage architecture; If the authority score of the first agent that publishes the first clustered memory fragment is higher than the authority score of the second agent that generates the second clustered memory fragment, then the first clustered memory fragment is retained as a processed memory fragment.
5. The investment decision generation method in a multi-agent collaborative environment according to claim 1, characterized in that, The preset indicators include any one or more of the following: time decay factor, vector correlation factor, preset importance factor, and logical uncertainty penalty factor; Accordingly, the relevance of the processed memory fragments in each layer is scored using preset indicators to generate corresponding scoring results. Based on the scoring results, target memory fragments that meet preset scoring conditions are determined, including: The time decay factor, vector correlation factor, and preset importance factor of the processed memory segment are weighted and summed by preset weights, and the penalty score corresponding to the logical uncertainty penalty factor is subtracted from the weighted summation result to generate a corresponding score result. Based on the score result, a third preset number of target memory segments that meet the preset score conditions are determined.
6. The investment decision generation method in a multi-agent collaborative environment according to claim 1, characterized in that, The process of compressing information from each target memory fragment based on a preset summary model in the target agent to obtain compressed memory fragments, and then concatenating the compressed memory fragments to generate an enhanced context, includes: The target memory fragment is compressed and refined using a summary language model to obtain a compressed memory fragment. The compressed memory segments are arranged in a preset ascending order based on their timestamps, and then spliced together to generate an enhanced context containing causal temporal relationships.
7. The investment decision generation method in a multi-agent collaborative environment according to claim 1, characterized in that, The step of filling the enhanced context into the prompt word template of the target agent to output the target investment decision result of the target investment task includes: The enhanced context is added as a structured field to the prompt word template corresponding to the target agent to obtain the reconstructed decision prompt words; Based on the reconstructed decision prompts, the target agent is driven to output a target investment decision result that includes decision actions, execution objects, and constraints.
8. An investment decision generation device in a multi-agent collaborative environment, characterized in that, include: The tag acquisition module is used to acquire the target investment task of the target intelligent agent, and to classify the target investment task using a preset lightweight intent classification model in the target intelligent agent to obtain the corresponding investment intent tags. The fragment acquisition module is used to execute a hierarchical recall strategy based on a two-dimensional orthogonal preset memory storage architecture according to the investment intention tag, so as to obtain the initial memory fragments of each layer; wherein, the preset memory storage architecture is divided into a private memory layer and a public memory layer according to permission ownership, and into a working memory layer, a contextual memory layer, and a semantic memory layer according to time and abstraction level; wherein, if the investment intention tag includes querying historical causal events, a query vector corresponding to the target investment task is generated, and a preset approximate nearest neighbor search operation is performed on the event fragments that intersect the private memory layer and the contextual memory layer based on the query vector, so as to obtain the event fragments that satisfy the preset most similar condition. A first preset number of initial candidate memory segments are selected, and the similarity score between the target investment task and each memory segment is determined to obtain a target similarity score that meets a preset maximum condition. It is then determined whether the target similarity score is less than a preset safety threshold. If so, a downgrade signal is triggered, and the preset approximate nearest neighbor search operation is re-executed at the consensus resolution where the common memory layer and the context memory layer intersect, to obtain a second preset number of first candidate memory segments that meet the preset most similar condition. If not, the initial candidate memory segments are directly used as the first candidate memory segments. The initial memory segments are determined based on the first candidate memory segments. The first segment determination module is used to perform semantic fusion and investment conflict resolution on the initial memory segments of each layer based on the timestamp of the initial memory segments of each layer and / or the role and permissions of the source agent, so as to obtain the processed memory segments of each layer; the source agent is the agent that generates and uploads the initial memory segments in a multi-agent collaborative environment. The second segment determination module is used to score the relevance of the processed memory segments of each layer using preset indicators to generate corresponding scoring results, and to determine the target memory segments that meet the preset scoring conditions based on the scoring results. The result output module is used to compress information from each target memory fragment based on a preset summary model in the target agent to obtain compressed memory fragments, splice the compressed memory fragments to generate an enhanced context, and fill the enhanced context into the prompt word template of the target agent to output the target investment decision result of the target investment task.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the investment decision generation method in a multi-agent collaborative environment as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the investment decision generation method in a multi-agent collaborative environment as described in any one of claims 1 to 7.