Methods, apparatus, devices and storage media for compressing intelligent agent interaction trajectory data

By converting the interaction trajectory information of intelligent agents into a directed graph and performing importance estimation and compression, the problem of computation and memory pressure in long-running tasks is solved, and efficient data compression and task processing are achieved.

CN122339486APending Publication Date: 2026-07-03BEIJING SILICON HEART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING SILICON HEART TECH CO LTD
Filing Date
2026-06-05
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In long-running tasks such as CLI and IDE, simply retaining the full context can lead to increased computational and memory pressure.

Method used

By acquiring the interaction trajectory information generated by the intelligent agent in real time, converting it into a directed graph, determining the target interaction trajectory information based on the importance estimation of nodes and edges, and compressing it to generate summary data.

Benefits of technology

While retaining important content, the input length is reduced, thus lowering computational and memory pressure and improving task processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122339486A_ABST
    Figure CN122339486A_ABST
Patent Text Reader

Abstract

This application proposes a method, apparatus, device, and storage medium for compressing intelligent agent interaction trajectory data, including: acquiring multiple interaction trajectory information generated by an intelligent agent in real time; converting the multiple interaction trajectory information into a directed graph, which includes nodes and edges, under preset compression conditions; estimating the importance of multiple nodes in the directed graph based on the nodes and edges, obtaining importance scores for each node; determining multiple target interaction trajectory information based on the importance scores of each node and constraints; and compressing the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information. The embodiments of this application determine multiple target interaction trajectory information through importance and constraints; thereby compressing the multiple target interaction trajectory information can reduce the input length while retaining important content, thus reducing the computational and memory pressure during the input stage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence technology, specifically relating to a method, apparatus, device, and storage medium for compressing interactive trajectory data of intelligent agents. Background Technology

[0002] In the typical large language model inference process, inference can be divided into two stages: input processing and autoregressive generation. When the input context is very long, input processing needs to perform parallel computation on the context, so long input will significantly increase the computation and memory pressure of a single request.

[0003] Therefore, in long-running tasks such as command-line interfaces (CLI) and integrated development environments (IDEs) that accumulate a large amount of logs, errors, patches, and repeated trial and error, simply retaining the full context will incur higher overhead due to the increased length of input. Summary of the Invention

[0004] This application proposes a method, apparatus, device, and storage medium for compressing intelligent agent interaction trajectory data, which can solve the technical problem that simply retaining the full context will result in higher overhead due to the increased length of input in long-running tasks such as CLI and IDE that accumulate a large amount of logs, errors, patches, and repeated trial and error.

[0005] The first aspect of this application proposes a method for compressing intelligent agent interaction trajectory data, including: Real-time acquisition of multiple interaction trajectory information generated by the intelligent agent, where each interaction trajectory information includes at least one of user input information, intelligent agent output information, tool call information, and running information; Under the condition of satisfying the preset compression, the multiple interaction trajectory information is converted into a directed graph, the directed graph including nodes and edges, the nodes being interaction trajectory information, and the edges being the dependencies between interaction trajectory information; Based on the nodes and edges of the directed graph, the importance of multiple nodes in the directed graph is estimated to obtain the importance score corresponding to each of the multiple nodes. Based on the importance scores and constraints of each of the multiple nodes, multiple target interaction trajectory information is determined. The constraints include the requirement to retain interaction trajectory information and the merging strategy for interaction trajectory information that meets the merging conditions. The interaction trajectory information of the multiple targets is compressed to generate summary data corresponding to the interaction trajectory information of the multiple targets.

[0006] An embodiment of the second aspect of this application provides an intelligent agent interaction trajectory data compression device, comprising: The acquisition module is used to acquire interactive trajectory information generated by the intelligent agent in real time. Any interactive trajectory information includes at least one of user input information, intelligent agent output information, tool call information, and running information. The conversion module is used to convert the multiple interaction trajectory information into a directed graph under the condition of satisfying preset compression conditions. The directed graph includes nodes and edges, where the nodes are interaction trajectory information and the edges are the dependencies between the interaction trajectory information. An estimation module is used to estimate the importance of multiple nodes in the directed graph based on the nodes and edges of the directed graph, and to obtain the importance score corresponding to each of the multiple nodes. The determination module is used to determine multiple target interaction trajectory information based on the importance scores corresponding to the multiple nodes and the constraints. The constraints include the interaction trajectory information that must be retained and the merging strategy of interaction trajectory information that meets the merging conditions. The compression module is used to compress the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information.

[0007] An embodiment of the third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.

[0008] An embodiment of the fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the method described in the first aspect above.

[0009] The technical solutions provided in this application embodiment have at least the following technical effects or advantages: This application proposes a method, apparatus, device, and storage medium for compressing intelligent agent interaction trajectory data, including: acquiring multiple interaction trajectory information generated by an intelligent agent in real time; converting the multiple interaction trajectory information into a directed graph, which includes nodes and edges, under preset compression conditions; estimating the importance of multiple nodes in the directed graph based on the nodes and edges, obtaining importance scores for each node; determining multiple target interaction trajectory information based on the importance scores of each node and constraints; and compressing the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information. The embodiments of this application determine multiple target interaction trajectory information through importance and constraints; thereby compressing the multiple target interaction trajectory information can reduce the input length while retaining important content, thus reducing the computational and memory pressure during the input stage.

[0010] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0011] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart of a method for compressing intelligent agent interaction trajectory data according to an embodiment of this application is shown; Figure 2 A flowchart of a method for compressing intelligent agent interaction trajectory data according to an embodiment of this application is shown; Figure 3 This illustration shows a structural schematic diagram of an intelligent agent interaction trajectory data compression device according to an embodiment of this application; Figure 4 This illustration shows a schematic diagram of the structure of an electronic device according to an embodiment of this application; Figure 5 A schematic diagram of a storage medium provided in one embodiment of this application is shown. Detailed Implementation

[0012] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.

[0013] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.

[0014] The intelligent agent interaction trajectory data compression method of this application can be executed by a computing device. The computing device can apply cloud computing and virtualization technologies, such as a single server, multiple servers, server clusters, cloud computing platforms, etc. Optionally, the computing device can also be a terminal device, such as a mobile phone, tablet computer, game console, portable computer, desktop computer, advertising machine, all-in-one machine, etc. This application does not limit the type or number of computing devices.

[0015] Building upon the aforementioned background technologies, input length can currently be reduced through truncation / sliding and one-time free text summarization. However, truncation irreversibly loses earlier but critical information; free text summarization lacks stable fields, making it difficult to guarantee coverage of information types such as "requests, errors, files, and incomplete tasks" in software engineering scenarios.

[0016] Recently, there has also been research on context compression and recursive summary memory methods specifically for long-term agent tasks, which are used to compress interaction history and environmental observations.

[0017] However, without stable structural fields and verifiable rules for engineering scenarios, compression quality is still difficult to achieve controllable evaluation and reproducible alignment in industrial systems; and different task types have stronger requirements for field structure.

[0018] To address the aforementioned issues, this application proposes a method, apparatus, device, and storage medium for compressing intelligent agent interaction trajectory data. The method includes: real-time acquisition of multiple interaction trajectory information generated by the intelligent agent; conversion of the multiple interaction trajectory information into a directed graph, which includes nodes and edges, under preset compression conditions; importance estimation of multiple nodes in the directed graph based on the nodes and edges, obtaining importance scores for each node; determination of multiple target interaction trajectory information based on the importance scores of each node and constraints; and compression of the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information. This application's embodiment determines multiple target interaction trajectory information based on importance and constraints; thereby compressing the multiple target interaction trajectory information can reduce the input length while retaining important content, thus reducing the computational and memory pressure during the input stage.

[0019] The following describes a method for compressing intelligent agent interaction trajectory data according to an embodiment of this application, with reference to the accompanying drawings.

[0020] See Figure 1 The method specifically includes the following steps: S101. Real-time acquisition of multiple interaction trajectory information generated by the intelligent agent.

[0021] Any interaction trajectory information includes at least one of user input information, agent output information, tool call information, and operation information.

[0022] S102. Under the condition of satisfying the preset compression conditions, convert multiple interaction trajectory information into a directed graph.

[0023] A directed graph consists of nodes and edges. Nodes represent interaction trajectory information, and edges represent the dependencies between interaction trajectory information.

[0024] S103. Based on the nodes and edges of the directed graph, the importance of multiple nodes in the directed graph is estimated to obtain the importance scores of each node.

[0025] S104. Based on the importance scores and constraints of each node, the interaction trajectory information of multiple targets is determined.

[0026] The constraints include the requirement to retain interaction trajectory information and the merging strategy for interaction trajectory information that meets the merging conditions; S105. Compress the interaction trajectory information of multiple targets to generate summary data corresponding to the interaction trajectory information of multiple targets.

[0027] Among them, the intelligent agent is an autonomous computing system with a large language model as its cognitive core, possessing a closed loop of perception-reasoning-action-memory, capable of autonomously using tools, decomposing tasks, continuously learning, and interacting with the environment and other intelligent agents.

[0028] By inputting corresponding task description information into the agent, the corresponding task execution result can be obtained. The information input into the agent and the output information of the agent can be regarded as the interaction trajectory information generated by the agent.

[0029] The interaction trajectory information is an event stream related to the large language model task, which may include at least one of the following: user input information, agent output information, tool invocation information, and runtime information. User input information may include natural language requests, feedback, confirmation / negation, and supplementary constraints. Agent output information may include plans and explanations. Tool invocation information may include tool invocation events and their returns, such as running commands, reading / editing files, executing tests, and retrieving data. Runtime information may include runtime errors and repair feedback, such as test failure summaries and critical stack information.

[0030] In some embodiments, the interaction trajectory information can be illustrated using the following examples.

[0031] The agent receives a programming task: "Write me a Python function to calculate the average of all numbers in a list and handle the case where the list is empty."

[0032] The corresponding interaction trajectory information can be composed of the following trajectory units: User message: "Write a Python function to calculate the average of a list and handle empty lists."

[0033] Overall thinking: We need to define a function that uses sum() and len() to check if the list is empty, otherwise divide it by zero.

[0034] Code editing: A utils.py file was created and code was written into it.

[0035] Run the command: In the terminal, execute python -c "from utils import calculate_average;print(calculate_average([]))" to test the case of an empty list.

[0036] Error message: The terminal returned ZeroDivisionError: division by zero.

[0037] Interim thought: An error occurred during execution due to division by zero. The list length needs to be checked before division.

[0038] Code edit: Modified the functions in the utils.py file.

[0039] Run the command: Execute python -c "from utils import calculate_average;print(calculate_average[])" again.

[0040] Result: The terminal outputs the preset result corresponding to the empty list.

[0041] Furthermore, the next task information can be input into the intelligent agent to obtain the next interaction trajectory information.

[0042] In some embodiments, interaction trajectory information can be obtained on the CLI / IDE plugin side in the CLI / IDE workflow.

[0043] As interaction trajectory information is continuously acquired, the amount of contextual information increases. When the amount of information increases to a certain level, it may put computational and memory pressure on the agent's processing. At this point, it is necessary to compress the acquired interaction trajectory information.

[0044] In some embodiments, the preset compression conditions include the amount of data of the interaction trajectory information being greater than a preset data amount, or the detection of a compression command input by the user.

[0045] In some embodiments, each time an interaction trajectory information is acquired, the interaction trajectory information can be stored in context information so that the agent can perform a task based on the context information in the next instance.

[0046] As interaction trajectory information accumulates, the context information increases, leading to higher overhead and interaction delays when the agent performs tasks based on the context information.

[0047] In some embodiments, when the amount of acquired interaction trajectory information data is relatively large, the context information can be compressed. Therefore, the preset compression condition can be that the amount of interaction trajectory information data is greater than the preset data amount, where the preset data amount can be flexibly set based on the actual situation.

[0048] In some embodiments, users may need to obtain the results of task execution as soon as possible. Therefore, in order to minimize latency, compression commands can be input to the agent.

[0049] In some embodiments, multiple target interaction trajectory information can be determined by converting the interaction trajectory information into a directed graph.

[0050] In some embodiments, multiple interaction trajectory information can first be normalized, that is, the multiple interaction trajectory information can be unified into standard interaction trajectory information. Each standard interaction trajectory information includes at least role, timestamp, content type, associated file and command tag.

[0051] After normalization, multiple interaction trajectory information can be converted into a directed graph, where each interaction trajectory information is a node in the directed graph, and the dependencies between the interaction trajectory information are edges in the directed graph, thus creating a directed graph.

[0052] In some embodiments, dependencies may include temporal dependencies; semantic reference dependencies; and causal chain dependencies.

[0053] In some embodiments, PageRank sorting can be performed on the directed graph to obtain an importance score for each node.

[0054] Specifically, the main idea behind PageRank is that the more nodes that point to a given node, the higher the importance score of that node, and the higher the importance score of the nodes that point to a given node, the higher the importance score of that node.

[0055] Correspondingly, based on the dependencies between interaction trajectory information, the number of nodes pointing to each node and the specific node pointing to each node can be determined, and the importance score of each node can be determined based on the number of nodes pointing to each node and the specific node pointing to each node.

[0056] Furthermore, based on the importance scores and constraints of each node, the interaction trajectory information of multiple targets is determined.

[0057] The constraints can be merging certain interaction trajectory information, or directly determining certain interaction trajectory information from multiple interaction trajectory information as the target interaction trajectory information.

[0058] Understandably, the process of determining multiple target interaction trajectory information is used to delete or merge obviously invalid interaction trajectory information, that is, to delete invalid information in the context in order to reduce the length of the context.

[0059] After removing invalid information from the context, the interaction trajectory information of multiple targets can be compressed to further reduce the length of the context.

[0060] In some embodiments, the compression method may be: Active autonomous compression: Autonomous decision-making: The agent decides for itself when to integrate key learning into persistent "knowledge blocks".

[0061] Active pruning: Actively delete the original interaction history, rather than passively relying on external summaries.

[0062] Alternatively, hard-coded compression: Use perplexity (PPL) to filter or learn importance scores and retain important tokens.

[0063] Key tokens are selected based on information entropy.

[0064] Of course, other compression methods can also be used to compress the interaction trajectory information of multiple targets.

[0065] This application proposes a method, apparatus, device, and storage medium for compressing intelligent agent interaction trajectory data, including: acquiring multiple interaction trajectory information generated by an intelligent agent in real time; determining multiple target interaction trajectory information from the acquired multiple interaction trajectory information according to importance and constraints, under preset compression conditions; compressing the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information. The embodiments of this application determine multiple target interaction trajectory information from the acquired multiple interaction trajectory information by considering importance and constraints; compressing the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information, thereby reducing the input length while retaining important content, thus reducing the computational and memory pressure during the input stage.

[0066] In some embodiments, multiple target interaction trajectory information is determined from the acquired multiple interaction trajectory information based on importance and constraints, including: determining a first node whose importance score is greater than or equal to a first preset score threshold; determining a second node corresponding to the constraints; and determining multiple target interaction trajectory information based on the first node and the second node.

[0067] After obtaining the importance score of each node, the first node with an importance score greater than or equal to the first preset score threshold can be identified. Nodes with an importance score greater than or equal to the first preset score threshold can be considered relatively important, as they contain more effective information. That is, the corresponding interaction trajectory information needs to be retained in the context information. The first preset score threshold can be flexibly set based on the actual situation.

[0068] In some embodiments, in the process of determining the target interaction trajectory information, in addition to determining the corresponding target interaction trajectory information based on importance scores, the corresponding target interaction trajectory information can also be determined based on constraints.

[0069] In some embodiments, the interaction trajectory information that meets the merging conditions is the interaction trajectory information with an importance score less than a first preset score threshold and greater than a second preset score threshold. Determining the second node corresponding to the constraint condition includes: determining the node corresponding to the interaction trajectory information that must be retained in the constraint condition as the second node; and / or, determining at least one third node with an importance score less than the first preset score threshold and greater than the second preset score threshold; determining the fourth node with the greatest relevance to the at least one third node among the first nodes; and merging the at least one third node with the corresponding fourth node to obtain at least one second node.

[0070] In some embodiments, the node corresponding to the mandatory retention of interaction trajectory information in the constraints can be determined as the second node.

[0071] Among them, the constraints may include the requirement to retain the interaction trajectory information, that is, the node corresponding to the required interaction trajectory information can be directly determined as the second node.

[0072] The interaction trajectory information that must be retained can be the first interaction trajectory information, the last interaction trajectory information, the most recent failed interaction trajectory information and the most recent successful interaction trajectory information, and the interaction trajectory information of the edited file node and its corresponding information.

[0073] In some embodiments, in addition to including the requirement to retain interaction trajectory information, the constraints may also include a merging strategy for merging interaction trajectory information that meets the conditions with the corresponding interaction trajectory information.

[0074] In some embodiments, at least one third node with an importance score less than a first preset score threshold and greater than a second preset score threshold can be identified. This at least one third node can be considered as interactive trajectory information containing some valid information. Therefore, the third node can be merged with the corresponding fourth node.

[0075] The degree of correlation can be determined based on the dependencies in the directed graph. The dependencies can include the connection weights between each node. The higher the connection weight, the higher the degree of correlation. The degree of correlation between nodes can be determined based on the degree of dependency between nodes. Then, at least one third node and its corresponding fourth node can be determined from the degree of correlation between nodes. At least one third node and its corresponding fourth node can be merged to obtain at least one second node.

[0076] The merging process can be implemented by obtaining the same information from the third and fourth nodes, merging the other information, and obtaining the second node.

[0077] In some embodiments, if the second node includes at least one third node that is merged with the corresponding fourth node to obtain at least one second node, then the process of determining multiple target interaction trajectory information based on the first node and the second node can be implemented by removing the fourth node from the first node and determining the remaining node and the second node as multiple target interaction trajectory information.

[0078] In some embodiments, if the second node only includes the interaction trajectory information that must be retained, then the first node and the second node can be determined as multiple target interaction trajectory information.

[0079] In some embodiments, multiple target interaction trajectory information is compressed to generate summary data corresponding to the multiple target interaction trajectory information, including: extracting field information corresponding to preset fields from the multiple target interaction trajectory information, where preset fields refer to fields that represent each thinking stage; and combining the field information to obtain summary data corresponding to the multiple target interaction trajectory information.

[0080] Generally, when there is a lot of contextual information, even if the model has a long contextual capability, its robustness to long inputs is still insufficient: when the key information is located in the middle of the input, the model performance often drops significantly, showing a positional bias phenomenon of missing the middle, that is, the information in the middle of the context may be ignored by the model.

[0081] To address the issue of information loss in the middle, a nine-segment structured extraction method can be used to compress the interaction trajectory information of the multiple targets.

[0082] Among them, the preset fields refer to the fields that represent each stage of thinking. Each stage of thinking can include background → problem → method → ​​details → verification → conclusion.

[0083] Furthermore, all thought fields can include nine fields: request intent, key concepts, relevant documents, error information, repair method, user feedback, resolved items, unfinished items, and next steps.

[0084] The nine-segment structured summary includes several preset fields: Background: Request Intent; Problem: Key Concepts; Method: Relevant Documents; Details: Error Messages, Fixes, User Feedback, Resolved Issues; Verification: Unresolved Items; Conclusion: Next Steps.

[0085] In some embodiments, the field information corresponding to the above-mentioned preset fields can be extracted from the interaction trajectory information of multiple targets. As can be seen from the above-mentioned preset fields, the final generated nine-segment structured summary will include all explicit requests and intentions of the user; key technical concepts, frameworks, decisions; and key information related to files, code segments, edit points and their significance in the foreground, thereby avoiding the problem of loss in the middle.

[0086] In some embodiments, after generating the nine-segment structured summary, a mapping table from the summary fields to the target interaction trajectory information can be maintained. That is, the original field of the interaction trajectory information corresponding to each summary field is determined, so that when details are needed later, "backtracking and supplementing" can be performed to recover the local original text from the original long trajectory as needed.

[0087] Furthermore, the generated summary can be verified. The verification method can be semantic similarity comparison, that is, determining whether the semantic similarity between the summary field and the original field corresponding to the summary field is greater than a preset similarity threshold. If it is greater, the verification is successful.

[0088] It can also perform schema validation, which means enforcing the following constraints: fields must be complete, types must be correct, length constraints must be enforced, and contradictions between fields must be prohibited.

[0089] If the digest verification is successful, the digest can be used as input to the agent to execute the task.

[0090] In some embodiments, multiple target interaction trajectory information is compressed to generate summary data corresponding to the multiple target interaction trajectory information, including: inputting multiple target interaction trajectory information, preset fields and output constraint information into a preset model to output summary data corresponding to the multiple target interaction trajectory information.

[0091] The preset fields can be the fields corresponding to the above nine-segment structured digest, and the output constraint information can be the verification information used to verify the nine-segment structured digest.

[0092] The preset models can be general generation models and special long text models, etc.

[0093] In some embodiments, the preset model needs to be trained to output a nine-segment structured summary.

[0094] In some embodiments, due to the teacher model's thinking chain capability—that is, the teacher model first reads through the entire text, identifies the core issues, then analyzes the methodological framework, then extracts details paragraph by paragraph to ensure alignment with the framework, and finally checks the beginning and end for consistency—this deep reasoning, which is planned before being generated, ensures the internal consistency of the nine-segment structure. The nine-segment structured summary output by the teacher model can be used as a supervisory signal to train the preset model.

[0095] In some embodiments, the teacher model cannot be directly used to generate the final summary data because it is costly and cannot locate the original fields corresponding to each field of the nine-segment structured summary.

[0096] In some embodiments, the training process of the above-mentioned preset model can be implemented as follows: The sample interaction trajectory information, preset fields, and output constraint information are input into the preset model to output the corresponding sample nine-segment structured summary. The sample interaction trajectory information, preset fields, and output constraint information are input into the teacher model to output the corresponding high-quality nine-segment structured summary. The loss function value is calculated based on the sample nine-segment structured summary and the high-quality nine-segment structured summary. The preset model is adjusted based on the loss function value until the loss function value meets the preset requirements or the number of iterations reaches the preset number, and the trained preset model is obtained.

[0097] In some embodiments, after obtaining a nine-segment structured summary of the samples during each training process, the preset model can be adjusted based on the following reward function: Information coverage: Check whether the nine fields cover information types such as "request, key concept, file, error, progress, all user messages, incomplete task, current work, next step"; and use the mapping table M to verify whether the summary entries can be located in the original interaction trajectory information.

[0098] Illusion Penalty: Points are deducted if the summary contains facts that cannot be traced back to in the original interaction trajectory information, such as non-existent filenames or errors that did not occur. This item is highly relevant to engineering issues related to unstable exploitation of long contexts and susceptibility to bias.

[0099] Field consistency: Check for contradictions between fields, such as "completed" and "incomplete" appearing at the same time, or the same entity conflicting in different fields.

[0100] Schema compliance: Fields are complete, field order / naming is correct, and each field meets length and format specifications; and meets the specification requirements for "standardized wording and clear sentences".

[0101] Compression quality: Optimize compression ratio and information density while meeting the above constraints.

[0102] If the reward function is greater than the preset function value, a well-trained preset model can be obtained.

[0103] In some embodiments, after compressing multiple target interaction trajectory information to generate summary data corresponding to multiple target interaction trajectory information, the method further includes: inputting the summary data and a preset number of most recently acquired interaction trajectory information from the multiple interaction trajectory information into a large language model to obtain inference results.

[0104] In some embodiments, after compression is complete, the compressed summary data and corresponding interaction trajectory information can be used for the next inference.

[0105] The preset number of interaction trajectory information can be flexibly set based on the actual situation. For example, it can be the most recently obtained interaction trajectory information or the two most recently obtained interaction trajectory information among multiple target interaction trajectory information, etc.

[0106] In some embodiments, to facilitate understanding of the above-described intelligent agent interaction trajectory data compression method, this application also provides a flowchart illustrating the intelligent agent interaction trajectory data compression method.

[0107] like Figure 2 As shown, the method includes the following steps: S201. Real-time acquisition of interaction trajectory information generated by the intelligent agent.

[0108] S202. Under the condition of satisfying the preset compression conditions, convert the acquired multiple interaction trajectory information into a directed graph.

[0109] A directed graph consists of nodes and edges. Nodes represent interaction trajectory information, and edges represent the dependencies between interaction trajectory information.

[0110] S203. Determine the first node whose importance score is greater than or equal to the first preset score threshold.

[0111] S204. Determine the node corresponding to the mandatory interaction trajectory information in the constraint conditions as the second node.

[0112] Alternatively, execute S205 to determine at least one third node whose importance score is less than a first preset score threshold and greater than a second preset score threshold; determine the fourth node with the greatest relevance to the at least one third node among the first nodes; and merge the at least one third node with its corresponding fourth node to obtain at least one second node.

[0113] S206. Determine the interaction trajectory information of multiple targets based on the first node and the second node.

[0114] S207. Extract the field information corresponding to the preset fields from the interaction trajectory information of multiple targets.

[0115] S208. Combine the field information to obtain summary data corresponding to multiple target interaction trajectory information.

[0116] This application also provides an intelligent agent interaction trajectory data compression device, which is used to execute the intelligent agent interaction trajectory data compression method provided in any of the above embodiments. Figure 3 As shown, the device includes an acquisition module 301, a conversion module 302, an estimation module 303, a determination module 304, and a compression module 305.

[0117] The acquisition module 301 is used to acquire multiple interaction trajectory information generated by the intelligent agent in real time. Any interaction trajectory information includes at least one of user input information, intelligent agent output information, tool call information, and running information. The conversion module 302 is used to convert the multiple interaction trajectory information into a directed graph under the condition of satisfying the preset compression conditions. The directed graph includes nodes and edges, where the nodes are interaction trajectory information and the edges are the dependencies between the interaction trajectory information. The estimation module 303 is used to estimate the importance of multiple nodes in the directed graph based on the nodes and edges of the directed graph, and obtain the importance score corresponding to each of the multiple nodes. The determination module 304 is used to determine multiple target interaction trajectory information based on the importance scores corresponding to the multiple nodes and the constraints. The constraints include the interaction trajectory information that must be retained and the merging strategy of the interaction trajectory information that meets the merging conditions. Compression module 305 is used to compress the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information.

[0118] This application proposes a device for compressing intelligent agent interaction trajectory data, comprising: acquiring multiple interaction trajectory information generated by an intelligent agent in real time; converting the multiple interaction trajectory information into a directed graph, wherein the directed graph includes nodes and edges, under preset compression conditions; estimating the importance of multiple nodes in the directed graph based on the nodes and edges of the directed graph, obtaining importance scores corresponding to each of the multiple nodes; determining multiple target interaction trajectory information based on the importance scores corresponding to each of the multiple nodes and constraints; and compressing the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information. The embodiments of this application determine multiple target interaction trajectory information through importance and constraints; thereby compressing the multiple target interaction trajectory information can reduce the input length while retaining important content, thus reducing the computational and memory pressure during the input stage.

[0119] In some embodiments, the determining module 304 is specifically used for: Identify the first node whose importance score is greater than or equal to a first preset score threshold; Determine the second node corresponding to the constraint condition; Multiple target interaction trajectory information are determined based on the first node and the second node. In some embodiments, the interaction trajectory information that meets the merging conditions is interaction trajectory information with an importance score less than the first preset score threshold and greater than the second preset score threshold. The determining module 304 is further specifically used for: The node corresponding to the mandatory interaction trajectory information in the constraint conditions is determined as the second node; And / or, Identify at least one third node whose importance score is less than the first preset score threshold and greater than the second preset score threshold; identify the fourth node among the first nodes that is most relevant to the at least one third node; merge the at least one third node with the corresponding fourth node to obtain at least one second node.

[0120] In some embodiments, the compression module 305 is specifically used for: Extract field information corresponding to preset fields from the multiple target interaction trajectory information, wherein the preset fields refer to fields that represent each stage of thinking; The field information is combined to obtain summary data corresponding to the multiple target interaction trajectory information.

[0121] In some embodiments, the compression module 305 is also specifically used for: The multiple target interaction trajectory information, preset fields, and output constraint information are input into the preset model to output summary data corresponding to the multiple target interaction trajectory information.

[0122] In some embodiments, the above-described apparatus further includes an input module for: The summary data and the most recently acquired preset number of interaction trajectory information from the multiple interaction trajectory information are input into the large language model to obtain the inference result.

[0123] In some embodiments, the preset compression conditions include either the amount of data in the interaction trajectory information being greater than a preset data amount, or the detection of a compression command input by the user.

[0124] This application also provides an electronic device for performing the above-described intelligent agent interaction trajectory data compression method. Please refer to... Figure 4 It illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 4As shown, the electronic device 7 includes: a processor 700, a memory 701, a bus 702 and a communication interface 703. The processor 700, the communication interface 703 and the memory 701 are connected through the bus 702. The memory 701 stores a computer program that can run on the processor 700. When the processor 700 runs the computer program, it executes the intelligent agent interaction trajectory data compression method provided in any of the foregoing embodiments of this application.

[0125] The memory 701 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between the device network element and at least one other network element is achieved through at least one communication interface 703 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0126] Bus 702 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. The memory 701 is used to store programs. After receiving execution instructions, the processor 700 executes the program. The intelligent agent interaction trajectory data compression method disclosed in any of the aforementioned embodiments of this application can be applied to the processor 700, or implemented by the processor 700.

[0127] The processor 700 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 700 or by instructions in software form. The processor 700 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 701. Processor 700 reads the information in memory 701 and, in conjunction with its hardware, completes the steps of the above method.

[0128] The electronic device provided in this application embodiment and the intelligent agent interaction trajectory data compression method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.

[0129] This application also provides a computer-readable storage medium corresponding to the intelligent agent interaction trajectory data compression method provided in the foregoing embodiments. Please refer to... Figure 5 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the intelligent agent interaction trajectory data compression method provided in any of the aforementioned embodiments.

[0130] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.

[0131] The computer-readable storage medium provided in the above embodiments of this application and the intelligent agent interaction trajectory data compression method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0132] It should be noted that: Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known structures and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0133] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0134] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for compressing intelligent agent interaction trajectory data, characterized in that, include: Real-time acquisition of multiple interaction trajectory information generated by the intelligent agent, where each interaction trajectory information includes at least one of user input information, intelligent agent output information, tool call information, and running information; Under the condition of satisfying the preset compression, the multiple interaction trajectory information is converted into a directed graph, the directed graph including nodes and edges, the nodes being interaction trajectory information, and the edges being the dependencies between interaction trajectory information; Based on the nodes and edges of the directed graph, the importance of multiple nodes in the directed graph is estimated to obtain the importance score corresponding to each of the multiple nodes. Based on the importance scores and constraints of each of the multiple nodes, multiple target interaction trajectory information is determined. The constraints include the requirement to retain interaction trajectory information and the merging strategy for interaction trajectory information that meets the merging conditions. The interaction trajectory information of the multiple targets is compressed to generate summary data corresponding to the interaction trajectory information of the multiple targets.

2. The method according to claim 1, characterized in that, The determination of multiple target interaction trajectory information based on the importance scores and constraints corresponding to each of the multiple nodes includes: Identify the first node whose importance score is greater than or equal to a first preset score threshold; Determine the second node corresponding to the constraint condition; Multiple target interaction trajectory information is determined based on the first node and the second node.

3. The method according to claim 2, characterized in that, The interaction trajectory information that meets the merging conditions is interaction trajectory information with an importance score less than the first preset score threshold and greater than the second preset score threshold. The determination of the second node corresponding to the constraint condition includes: The node corresponding to the mandatory interaction trajectory information in the constraint conditions is determined as the second node; And / or, Identify at least one third node whose importance score is less than the first preset score threshold and greater than the second preset score threshold; identify the fourth node among the first nodes that is most relevant to the at least one third node; merge the at least one third node with the corresponding fourth node to obtain at least one second node.

4. The method according to claim 1, characterized in that, The step of compressing the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information includes: Extract field information corresponding to preset fields from the multiple target interaction trajectory information, wherein the preset fields refer to fields that represent each stage of thinking; The field information is combined to obtain summary data corresponding to the multiple target interaction trajectory information.

5. The method according to claim 1, characterized in that, The step of compressing the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information includes: The multiple target interaction trajectory information, preset fields, and output constraint information are input into the preset model to output summary data corresponding to the multiple target interaction trajectory information.

6. The method according to claim 1, characterized in that, After compressing the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information, the method further includes: The summary data and the most recently acquired preset number of interaction trajectory information from the multiple interaction trajectory information are input into the large language model to obtain the inference result.

7. The method according to claim 1, characterized in that, The preset compression conditions include the amount of data in the interaction trajectory information being greater than a preset data amount, or the detection of a compression command input by the user.

8. A device for compressing interactive trajectory data of an intelligent agent, characterized in that, include: The acquisition module is used to acquire multiple interaction trajectory information generated by the intelligent agent in real time. Each interaction trajectory information includes at least one of user input information, intelligent agent output information, tool call information, and running information. The conversion module is used to convert the multiple interaction trajectory information into a directed graph under the condition of satisfying preset compression conditions. The directed graph includes nodes and edges, where the nodes are interaction trajectory information and the edges are the dependencies between the interaction trajectory information. An estimation module is used to estimate the importance of multiple nodes in the directed graph based on the nodes and edges of the directed graph, and to obtain the importance score corresponding to each of the multiple nodes. The determination module is used to determine multiple target interaction trajectory information based on the importance scores corresponding to the multiple nodes and the constraints. The constraints include the interaction trajectory information that must be retained and the merging strategy of interaction trajectory information that meets the merging conditions. The compression module is used to compress the multiple target interaction trajectory information to generate summary data corresponding to the multiple target interaction trajectory information.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by a processor to implement the method as described in any one of claims 1-7.