Memory management method and device for intelligent agent, equipment and medium

By real-time detection and multi-dimensional evaluation of the agent's memory database, low-value memories are deleted while high-value memories are retained. This solves the problem of intelligent management of memory systems with limited agent resources, and improves the agent's generalization ability and resource utilization efficiency.

CN121919210APending Publication Date: 2026-04-24XG TECHNOLOGIES PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XG TECHNOLOGIES PTE LTD
Filing Date
2025-12-29
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing agent memory systems cannot effectively distinguish the importance of memory when resources are limited, resulting in the incorrect elimination of infrequent but important operation sequences. This leads to a decline in the agent's generalization ability, and manual rule configuration is inflexible and cannot automatically adapt to changes in user behavior patterns.

Method used

By monitoring the memory database in real time, the system obtains a comprehensive value score for the memory data, deletes the memory data with the lowest comprehensive value, retains the key memories with higher comprehensive value, and uses multi-dimensional evaluation such as retrieval hit rate, rarity, and recentity scores. Combined with machine learning models, the system achieves intelligent management of memories.

Benefits of technology

With limited equipment resources, it can efficiently and accurately retain high-value memories, reduce redundant storage, and improve the generalization ability and resource utilization efficiency of intelligent agents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121919210A_ABST
    Figure CN121919210A_ABST
Patent Text Reader

Abstract

The invention discloses a memory management method and device for an intelligent agent, equipment and a medium, and the method comprises the steps: obtaining a comprehensive value score of at least one piece of memory data stored in a memory database in response to the detection that the occupancy rate of the memory database is greater than or equal to a first preset threshold value; wherein the comprehensive value score is used for indicating the total value of one piece of memory data under multiple dimensions; determining to-be-deleted target memory data in the at least one piece of memory data based on the comprehensive value score of the at least one piece of memory data; and deleting the target memory data from the memory database. According to the scheme, under the condition that equipment resources are limited, the value degrees of different memories can be intelligently distinguished, and under the condition that low-value redundant memories are eliminated, high-value memories (such as low-frequency high-value memories) are reserved at the same time, so that efficient and accurate intelligent management of the memories is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of artificial intelligence and human-computer interaction, specifically to a method, apparatus, device, and medium for memory management of intelligent agents. Background Technology

[0002] Graphical User Interface Agents (GUI Agents) perform various tasks by mimicking human actions in software applications. Their functionality is highly dependent on their ability to learn from historical experience, so the agent needs a memory system to store sequences of user behaviors. Summary of the Invention

[0003] To address the aforementioned technical problems, this disclosure provides a memory management method, apparatus, device, and medium for intelligent agents, capable of storing high-value memories to prevent some infrequently used but crucial operation sequences from being mistakenly discarded due to prolonged inaccessibility.

[0004] The first aspect of this disclosure provides a method for memory management of an intelligent agent, comprising:

[0005] In response to detecting that the occupancy rate of the memory database is greater than or equal to a first preset threshold, the comprehensive value score of at least one memory data stored in the memory database is obtained; wherein, the comprehensive value score is used to indicate the total value of a memory data in multiple dimensions;

[0006] Based on the comprehensive value score of the at least one memory data, target memory data to be deleted is determined from the at least one memory data;

[0007] Delete the target memory data from the memory database.

[0008] A second aspect of this disclosure provides a memory management device for an intelligent agent, comprising:

[0009] The acquisition module is used to acquire the comprehensive value score of at least one memory data stored in the memory database in response to detecting that the occupancy rate of the memory database is greater than or equal to a first preset threshold; wherein the comprehensive value score is used to indicate the total value of a memory data in multiple dimensions;

[0010] A determination module is used to determine target memory data to be deleted from the at least one memory data based on the comprehensive value score of the at least one memory data.

[0011] A processing module is used to delete the target memory data from the memory database.

[0012] A third aspect of this disclosure provides a computer-readable storage medium storing a computer program for performing the memory management method for an intelligent agent described in the first aspect above.

[0013] A fourth aspect of this disclosure provides an electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the memory management method for an intelligent agent described in the first aspect above.

[0014] A fifth aspect of this disclosure provides a computer program product that, when executed by an instruction processor, performs the memory management method for an intelligent agent as proposed in the first aspect of this disclosure.

[0015] The technical solution provided in this disclosure can monitor the memory database of an intelligent agent in real time. When the occupancy rate of the memory database exceeds a preset threshold, the system can delete the memory data with the lowest comprehensive value score from at least one memory data point, based on the comprehensive value score of that memory data. This allows the occupancy rate of the memory database to return to a normal level. Therefore, during the memory elimination process, some daily redundant memories with low comprehensive value scores are deleted, while key memories with high comprehensive value scores are successfully retained. Thus, this solution, under conditions of limited device resources, can intelligently distinguish the value of different memories and, while eliminating low-value redundant memories, simultaneously retain high-value memories (such as frequently used key memories and rare key memories), thereby achieving efficient and accurate intelligent management of memories. Attached Figure Description

[0016] Figure 1 This is a system architecture flowchart of a value-based memory management system provided in an exemplary embodiment of this disclosure.

[0017] Figure 2 This is a flowchart illustrating a memory management method for an intelligent agent provided in an exemplary embodiment of this disclosure.

[0018] Figure 3 This is a flowchart illustrating a memory management method for an intelligent agent provided in an exemplary embodiment of this disclosure.

[0019] Figure 4 This is a flowchart illustrating a memory management method for an intelligent agent provided in an exemplary embodiment of this disclosure.

[0020] Figure 5 This is a flowchart illustrating a memory management method for an intelligent agent provided in an exemplary embodiment of this disclosure.

[0021] Figure 6 This is a flowchart illustrating a memory management method for an intelligent agent provided in an exemplary embodiment of this disclosure.

[0022] Figure 7 This is a flowchart illustrating a memory management method for an intelligent agent provided in an exemplary embodiment of this disclosure.

[0023] Figure 8 This is a schematic diagram of the structure of a memory management device for an intelligent agent provided in an exemplary embodiment of the present disclosure.

[0024] Figure 9 This is a structural diagram of an electronic device provided in an exemplary embodiment of this disclosure. Detailed Implementation

[0025] To explain this disclosure, exemplary embodiments of the disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the disclosure, and not all of them. It should be understood that the disclosure is not limited to exemplary embodiments.

[0026] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this disclosure.

[0027] Application Overview

[0028] On resource-constrained devices, the agent's memory system employs simple cache eviction strategies, such as First-In-First-Out (FIFO) or Least Recently Used (LRU). Because it cannot distinguish the importance of memories, some infrequently used but crucial operation sequences are mistakenly evicted due to prolonged inactivity, causing the agent to "forget" key skills and severely impairing generalization ability. Alternatively, developers or administrators can predefine rules to determine which types of behavioral sequences are worth retaining, for example, only retaining successfully completed task sequences. However, manual rule configuration lacks flexibility and cannot automatically adapt to changes in user behavior patterns. Any rule adjustments require manual intervention, resulting in high maintenance costs and slow response times.

[0029] Based on the above problems, the technical solution provided in this disclosure can monitor the memory database of an intelligent agent in real time. When the occupancy rate of the memory database exceeds a preset threshold, the system can delete the memory data with the lowest comprehensive value score from at least one memory data point, thereby reducing the occupancy rate of the memory database back to a normal level. Therefore, during the memory elimination process, some daily redundant memories with low comprehensive value scores are deleted, while key memories with high comprehensive value scores are successfully retained. Thus, this solution, even with limited device resources, can intelligently distinguish the value of different memories and, while eliminating low-value redundant memories, simultaneously retain high-value memories (such as frequently used key memories and rare key memories), thereby achieving efficient and accurate intelligent management of memories.

[0030] Exemplary System

[0031] Figure 1 This is a system architecture flowchart of a value-based memory management system provided in an exemplary embodiment of this disclosure. The system achieves efficient and intelligent management of the memory bank through three core steps: preprocessing user behavior sequences, value assessment, and storage eviction. This memory management system manages memory through the following three stages:

[0032] Memory storage phase: For example, such as Figure 1 As shown, the system can collect the current user behavior sequence in real time and preprocess it to obtain the corresponding feature sequence. Based on the feature sequence, it can determine whether the current user behavior sequence is a complete repetition of a historical behavior sequence. If so, the hit count and latest access time of the target historical behavior sequence that is completely identical to the current user behavior sequence are updated. If not, it determines whether there exists a target behavior sequence cluster that is highly similar to the current user behavior sequence. If so, the current user behavior sequence is associated with the target behavior sequence cluster, and the metadata of the target behavior sequence cluster is updated. If not, the current user behavior sequence is stored as a new memory in the memory database. Thus, the memory database stores at least one memory record, and each memory record can include a user behavior sequence and its metadata. The user behavior sequence can include user interface screenshots and user coordinate operations. User coordinate operations are coordinate operations on the user interface, i.e., user coordinate operations can be represented as coordinates (x, y), and can include click operations, swipe operations, etc. Metadata can refer to descriptive data of user behavior sequences, which may include the operation steps, operation duration, and number of hits of the user behavior sequence.

[0033] Storage eviction phase: For example, such as Figure 1As shown, at least one memory data point stored in the memory database can be valued to obtain a comprehensive value score for each memory data point. If the occupancy rate of the memory database reaches a threshold, the comprehensive value score of each memory data point can be obtained, and all memory data points can be sorted according to their comprehensive value scores. The memory data point with the lowest comprehensive value score is then removed from the memory database. It should be noted that the comprehensive value score of each memory data point can also be stored in the memory database, and there is no limitation on when the comprehensive value score of each memory data point is calculated.

[0034] Execution of retrieval task phase: For example, such as Figure 1 As shown, if a user inputs a retrieval task description, the memory retrieval device can retrieve a list of candidate memories from the memory database based on the keywords in the retrieval task description.

[0035] For a detailed description of the above embodiments, please refer to the relevant explanations in the following method embodiments. The embodiments disclosed herein will not be repeated here.

[0036] The technical solution provided in this disclosure can monitor the memory database of an intelligent agent in real time. When the occupancy rate of the memory database exceeds a preset threshold, the system can delete the memory data with the lowest comprehensive value score from at least one memory data point, based on the comprehensive value score of that memory data. This allows the occupancy rate of the memory database to return to a normal level. Therefore, during the memory elimination process, some daily redundant memories with low comprehensive value scores are deleted, while key memories with high comprehensive value scores are successfully retained. Thus, this solution, under conditions of limited device resources, can intelligently distinguish the value of different memories and, while eliminating low-value redundant memories, simultaneously retain high-value memories (such as frequently used key memories and rare key memories), thereby achieving efficient and accurate intelligent management of memories.

[0037] Furthermore, by preprocessing user behavior sequences to determine if there are any historical behavior sequences that completely repeat the current user behavior sequence, data redundancy can be reduced at the source. This allows for the effective processing of large numbers of repetitive or highly similar behavior sequences before data is stored, improving storage efficiency. Additionally, when the agent performs a retrieval task, relevant historical experience can be efficiently retrieved from the memory.

[0038] Exemplary methods

[0039] Figure 2 This is a schematic flowchart illustrating a memory management method for an intelligent agent provided in an exemplary embodiment of this disclosure. This embodiment can be applied to electronic devices (e.g., vehicles) or cloud servers, such as... Figure 2 As shown, the above may include the following steps:

[0040] Step 201: In response to detecting that the occupancy rate of the memory database is greater than or equal to a first preset threshold, obtain the comprehensive value score of at least one memory data stored in the memory database.

[0041] The overall value score is used to indicate the total value of a piece of memory data across multiple dimensions.

[0042] In some embodiments, due to limited storage space, it is necessary to monitor the memory database. One possible approach is to detect the memory database occupancy rate in real time; another possible approach is to detect the memory database occupancy rate periodically, for example, periodically within a preset time period; yet another example is to periodically detect the memory database occupancy rate at preset intervals.

[0043] In some examples, the memory database occupancy rate can be obtained directly by reading the configuration file; alternatively, it can be obtained based on the ratio between the occupied storage space of the memory database and the total storage space of the memory database; or, it can be obtained based on the ratio between the number of historical memory entries stored in the memory database and the total number of memory entries that the memory database can support storing. Of course, the memory database occupancy rate can also be obtained through other methods, which are not limited in this embodiment.

[0044] In some embodiments, the first preset threshold may be set at the factory or be user-defined, and this disclosure does not limit this. Furthermore, the user may modify the first preset threshold according to actual needs. For example, the first preset threshold may be 90%.

[0045] In some embodiments, the aforementioned at least one memory data point may be all memory data in the entire memory database; or it may be a portion of the memory data in the memory database, such as memory data from the last 10 days.

[0046] In some embodiments, the comprehensive value score of at least one memory data can be pre-calculated and stored in the memory database, so the comprehensive value score of each memory data can be directly obtained from the memory database; or, the comprehensive value score of at least one memory data needs to be calculated in real time, that is, the value score of each memory data under different dimensions can be calculated separately, and then the comprehensive value score of each memory data can be calculated by combining the value scores under different dimensions. For details, please refer to the detailed description in the following embodiments, which are not limited in this disclosure.

[0047] Step 202: Based on the comprehensive value score of at least one memory data, identify the target memory data to be deleted from at least one memory data.

[0048] In some embodiments, the overall value score of the target memory data is less than the overall value score of the other memory data in at least one memory data set besides the target memory data. The at least one memory data set can be sorted from lowest to highest overall value score, and the memory data set with the lowest overall value score at the top of the list can be identified as the target memory data to be deleted. Alternatively, the at least one memory data set can be sorted from highest to lowest overall value score, and the memory data set with the lowest overall value score at the bottom of the list can be identified as the target memory data to be deleted. Or, a value score threshold can be set, and the memory data set with an overall value score less than the value score threshold can be identified as the target memory data to be deleted.

[0049] Step 203: Delete the target memory data from the memory database.

[0050] In some embodiments, after identifying the target memory data to be deleted, all of the target memory data can be deleted directly; alternatively, a portion of the target memory data (i.e., a certain number or proportion of memory data) can be deleted first. If the occupancy rate of the memory database is still greater than a first preset threshold, another portion of the target memory data can be deleted from the memory database. That is, steps 202 and 203 can be repeated until the occupancy rate of the memory database is less than the first preset threshold.

[0051] For example, let's take a first preset threshold of 90%. Assume the memory database includes memory data A, memory data B, and memory data C. When the memory occupancy rate is detected to be 95%, meaning the occupancy rate exceeds the first preset threshold, a memory eviction strategy needs to be initiated. The comprehensive value score of memory data A is obtained as x1, the comprehensive value score of memory data B as x2, and the comprehensive value score of memory data C as x3. Since x2 > x3 > x1, memory data A can be identified as the target memory data to be deleted, and thus memory data A can be automatically deleted from the memory database. Afterward, the system can continue to delete other low-value memories until the storage occupancy rate drops to a safe level. In this way, the system automatically completes "garbage collection," clearing out useless memories and freeing up space for storing high-value new memories; the entire process requires no manual intervention.

[0052] For example, a user performs the action sequence "open accounting software -> export annual statement -> print report" at the end of the year, denoted as M0. Meanwhile, the memory database is filled with memories of daily operations, M1. When the memory database reaches a preset threshold triggering eviction, although the retrieval hit rate of M2 is very low, its rarity score is extremely high. When calculating the overall value score of M2, its high rarity score compensates for the low hit rate, resulting in a still high overall value score. Therefore, during the eviction process, some redundant daily memories with lower overall value scores are deleted, while the crucial annual operation memory M2 is successfully retained.

[0053] In other embodiments, after deleting target memory data from the memory database, if the memory database occupancy rate is detected to be greater than a second preset threshold, other memory data with lower comprehensive value scores can continue to be deleted from the memory database, so that the memory database occupancy rate is less than or equal to the second preset threshold; wherein the second preset threshold is less than the first preset threshold. Thus, steps 202 and 203 can be repeated until the storage occupancy rate falls back to a safe level (e.g., below 80%).

[0054] The technical solution provided in this disclosure can monitor the memory database of an intelligent agent in real time. When the occupancy rate of the memory database exceeds a preset threshold, the system can delete the memory data with the lowest comprehensive value score from at least one memory data point, based on the comprehensive value score of that memory data. This allows the occupancy rate of the memory database to return to a normal level. Therefore, during the memory elimination process, some daily redundant memories with low comprehensive value scores are deleted, while key memories with high comprehensive value scores are successfully retained. Thus, this solution, under conditions of limited device resources, can intelligently distinguish the value of different memories and, while eliminating low-value redundant memories, simultaneously retain high-value memories (such as frequently used key memories and rare key memories), thereby achieving efficient and accurate intelligent management of memories.

[0055] like Figure 3 As shown above, in the above Figure 2 Based on the illustrated embodiment, step 201 above may include the following steps:

[0056] Step 2011: Obtain the retrieval hit rate score, rarity score, and recentity score for each memory data in at least one memory data.

[0057] Among them, the retrieval hit rate score is used to indicate the frequency with which a piece of memory data is successfully used, the rarity score is used to indicate the criticality of a piece of memory data, and the recentity score is used to indicate the timeliness of a piece of memory data.

[0058] In some examples, the system records the number of times (m) each piece of memory data is successfully accessed by the retrieval module of an agent (e.g., a GUI agent), and obtains the current time (t0) and the creation time (t1) of each piece of memory data. Thus, the retrieval hit rate for each piece of memory data is p1 = m / (t0-t1); where t0-t1 represents the interval between the current time and the creation time of a piece of memory data. In other words, the retrieval hit rate reflects the usability of the memory data.

[0059] In some examples, the rarity score mentioned above is primarily used to identify and protect low-frequency but critical memory data. The system can record the document frequency (DF) of each memory data entry in the entire memory database, and denote the total number of memory entries in the database as n. Thus, the rarity score p2 = log(n / DF). In this way, by evaluating the rarity score of memory data, isolated operations that occur amidst a large number of common operations (such as configuring annual report templates) are given higher value, preventing them from being discarded.

[0060] In some examples, the aforementioned recency score is used to reflect the timeliness of the memory data. Therefore, the recency score of a memory data entry can be calculated based on its last access time. The system records the last access time t3 for each memory data entry and obtains the current time t0. Thus, the recency score of each memory data entry is p2 = -log(t0-t3); where t0-t3 refers to the number of days between the last access time and the current time. In other words, the closer the last access time of a memory data entry is to the current time, the higher its recency score; conversely, the further the last access time of a memory data entry is from the current time, the lower its recency score.

[0061] Step 2012: Based on the retrieval hit rate score, rarity score, and recentity score of each memory data, determine the comprehensive value score of each memory data in at least one memory data.

[0062] In some embodiments, the aforementioned comprehensive value score is obtained by weighted fusion of multiple dimensions of search hit rate score, rarity score, and recentity score; that is, the comprehensive value score is a weighted sum. Therefore, it is necessary to determine the weight coefficients assigned to each of the search hit rate score, rarity score, and recentity score. These weight coefficients can be preset or user-defined, and the specific determination depends on actual use; this disclosure does not limit this.

[0063] For example, the overall value score of a memory data is P = w1*P1 + w2*P2 + w3*P3; where P1 represents the retrieval hit rate score of the memory data, P2 represents the rarity score of the memory data, and P3 represents the recentity score of the memory data.

[0064] In other embodiments, machine learning models, such as Gradient Boosting Decision Trees (GBDT), can be used to learn the complex nonlinear relationships between various features such as retrieval hit rate, rarity, sequence length, and success rate. This allows for the training of a large model to calculate the comprehensive value score. The trained model can then be used to process the retrieval hit rate score, rarity score, and recentity score of a memory record to obtain its comprehensive value score. Thus, by using a machine learning model instead of a simple weighted sum to calculate the comprehensive value score, the true value of the memory is more accurately assessed, thereby improving the accuracy of elimination decisions.

[0065] The technical solution provided in this disclosure can obtain the retrieval hit rate score, rarity score, and recentity score of each memory data in at least one memory data, and determine the comprehensive value score of each memory data in at least one memory data based on the retrieval hit rate score, rarity score, and recentity score of each memory data. Therefore, the comprehensive value score under multi-dimensional evaluation ensures the comprehensiveness and accuracy of system decision-making, and can simultaneously take into account the characteristics of frequent use, key and recent memory.

[0066] In some embodiments, such as Figure 4 As shown above, in the above Figure 2 Based on this, the method provided in the embodiments of this application further includes:

[0067] Step 204: Obtain the current user behavior sequence.

[0068] In some embodiments, whenever a user interaction event occurs, a current user behavior sequence can be collected; wherein, the user behavior sequence may include a screenshot of the user interface and user coordinate operations. The user coordinate operations are coordinate operations on the user interface, that is, user coordinate operations can be represented as coordinates (x, y), and these user coordinate operations may include click operations, swipe operations, etc.

[0069] In some examples, when the device receives a user coordinate operation, it can trigger the system to take a screenshot using a screenshot software to obtain a screenshot of the user interface. Alternatively, when the user switches between graphical interfaces, the system can trigger the system to take a screenshot using a screenshot software to obtain a screenshot of the user interface. When the user performs a user coordinate operation on the user interface, the coordinates of the user's touch point on the user interface can be obtained by listening to touch events; this is the user coordinate operation.

[0070] Step 205: Determine the similarity between the current user behavior sequence and all historical behavior sequences.

[0071] In some embodiments, when calculating the similarity between the current user behavior sequence and all historical behavior sequences, the feature sequences corresponding to each behavior sequence can be determined first, and then the similarity between the two can be calculated based on the feature sequences corresponding to the current user behavior sequence and the feature sequences corresponding to all historical behavior sequences respectively. For details, please refer to the detailed description in the following embodiments, which will not be repeated here.

[0072] Step 206: Store the current user behavior sequence in the memory database based on the similarity between the current user behavior sequence and all historical behavior sequences.

[0073] In some embodiments, when a historical behavior sequence identical to the current user's behavior sequence exists among all historical behavior sequences, it indicates that the current behavior sequence is not a new memory. Therefore, it is not necessary to create a new memory in the memory database; only the latest access time and hit count of the historical behavior sequence identical to the current user's behavior sequence are updated. Conversely, when no historical behavior sequence similar to the current user's behavior sequence exists among all historical behavior sequences, it indicates that the current behavior sequence is a new memory. Therefore, it is necessary to create a new memory in the memory database, i.e., to store the current user's behavior sequence separately in the memory database. For details, please refer to the detailed description in the following embodiments; the embodiments disclosed herein will not be repeated here.

[0074] It should be noted that steps 204 to 206 can be performed after step 203 or before step 201. The specific execution can be determined according to the actual usage situation, and this embodiment does not limit it.

[0075] The technical solution provided in this disclosure can obtain the current user behavior sequence, determine the similarity between the current user behavior sequence and all historical behavior sequences, and store the current user behavior sequence in a memory database based on the similarity between the current user behavior sequence and all historical behavior sequences. In other words, this solution avoids duplicate storage, reduces redundancy, and saves storage space by judging similarity.

[0076] like Figure 5 As shown above, in the above Figure 3 Based on the illustrated embodiment, step 205 above may include the following steps:

[0077] Step 2051: Extract features from the current user behavior sequence and all historical behavior sequences to obtain the feature sequence corresponding to each behavior sequence.

[0078] In order to compare the current user behavior sequence with all historical behavior sequences, since both the current user behavior sequence and all historical behavior sequences are composed of user interface screenshots and user coordinate operations, it is necessary to convert each behavior sequence into a stable and comparable feature sequence.

[0079] In some embodiments, when extracting features from the current user behavior sequence and all historical behavior sequences respectively, the appropriate feature extraction algorithm can be used according to the type of each behavior sequence to extract features from the current user behavior sequence and all historical behavior sequences respectively, so as to obtain the feature sequence corresponding to each behavior sequence. For details, please refer to the detailed description in the following embodiments.

[0080] In some embodiments, when the agent is an image interface agent, step 2051 may specifically include: in response to each behavior sequence including user interface screenshots and user coordinate operations, processing the user interface screenshots using a first preset algorithm to generate a visual fingerprint; and converting the user coordinate operations into semantic operation representations using a second preset algorithm; wherein the feature sequence corresponding to each behavior sequence includes a visual fingerprint and a semantic operation representation.

[0081] In some embodiments, each behavior sequence includes at least one set of data, and each set of data may include user interface screenshots and user coordinate operations. That is, each behavior sequence includes at least one user interface screenshot and at least one user coordinate operation, and each user interface screenshot corresponds to a different user coordinate operation in the at least one user coordinate operation. Further, the feature sequence corresponding to each behavior sequence may include at least one visual fingerprint and at least one semantic operation representation, and each visual fingerprint corresponds to a different semantic operation representation in the at least one semantic operation representation.

[0082] For example, a feature sequence corresponding to a behavior sequence can be represented as (pHash1, semantic operation representation 1, pHash2, semantic operation representation 2...). Here, pHash represents a visual fingerprint.

[0083] In some examples, the aforementioned first preset algorithm can be a screenshot-perceptual hashing algorithm, which may include perceptual hashing (pHash) or difference hashing (dHash), etc. The screenshot-perceptual hashing algorithm extracts low-frequency perceptual features from user interface screenshots and generates a fixed-length binary hash value (i.e., a visual fingerprint) based on these features. This visual fingerprint represents the macroscopic content of the user interface screenshot and is insensitive to subtle changes such as cursor, time, and animation, thus ensuring that visually identical user interface screenshots can generate consistent hash values. For a detailed description of the screenshot-perceptual hashing algorithm's processing of user interface screenshots, please refer to the descriptions in related technologies; this disclosure will not elaborate on this aspect.

[0084] In some examples, the aforementioned user coordinate operations can be click operations, swipe operations, or other types of coordinate operations. The second preset algorithm is used to convert the user coordinate operations from physical operations into logical operations, that is, into semantic descriptions independent of specific locations. For example, the second preset algorithm can be Optical Character Recognition (OCR) and UI automation tools. The element text at the user coordinate operation location is extracted using OCR, and the element attributes (such as type, text, etc.) corresponding to the user coordinate operation are obtained using UI automation tools. Then, the element text and element attributes are combined into a location-independent semantic operation description (i.e., semantic operation representation).

[0085] For example, let's take a click operation as an example. Assuming the coordinates of the click operation are (123, 456), we can use an OCR algorithm and UI automation testing tools to convert the click operation (123, 456) into a semantic operation representation (element type = 'button', element text = 'login').

[0086] Based on the above embodiments, since the user interface screenshots are processed to generate visual fingerprints when each action sequence includes user interface screenshots and user coordinate operations, and the user coordinate operations are converted into semantic operation representations using the first preset algorithm and the second preset algorithm, feature extraction is performed before memory storage. This aims to reduce data redundancy from the source and make the memory representation robust to visual and layout changes unrelated to the interface. This also provides a more efficient and accurate foundation for subsequent agent behavior understanding, similarity calculation and continuous learning.

[0087] Step 2052: Based on the feature sequences corresponding to each behavior sequence, calculate the feature signature of the feature sequences corresponding to each behavior sequence.

[0088] In some examples, the aforementioned feature signature is a unique representation of the feature sequence corresponding to the behavior sequence, used to store the core information of the feature sequence. Essentially, it extracts the "fingerprint" of the feature sequence using a specific algorithm, preserving the key semantics of the feature sequence while simultaneously reducing its data dimensionality. Feature signatures can include hash signatures, vector embedding signatures, or other types of signatures; this disclosure does not limit the specific type. Different algorithms are required for different types of feature signatures, calculating the feature signature of each behavior sequence based on its corresponding feature sequence. The aforementioned feature signature can be a string.

[0089] For example, let's take a hash signature as an example of a feature signature. A fast hash algorithm, such as the Secure Hash Algorithm 256-bit (SHA-256), can be used to calculate the hash signature of the feature sequence corresponding to each behavior sequence based on the feature sequence corresponding to each behavior sequence.

[0090] In other embodiments, if the feature signatures of all historical behavior sequences have been pre-calculated, the feature signatures of all historical behavior sequences can be obtained directly from the memory database.

[0091] Step 2053: Compare the feature signature of the current user behavior sequence with the feature signatures of all historical behavior sequences to determine the similarity between the current user behavior sequence and all historical behavior sequences.

[0092] In some embodiments, the feature signature of the current user behavior sequence is compared with the feature signatures of all historical behavior sequences one by one. If there is a historical behavior sequence among all historical behavior sequences that has the same feature signature as the current user behavior sequence, it can be determined that the current user behavior sequence is completely the same as that historical behavior sequence. If there is no historical behavior sequence among all historical behavior sequences that has the same feature signature as the current user behavior sequence, it can be determined that the current user behavior sequence is different from that historical behavior sequence. For details, please refer to the detailed description in the following embodiments.

[0093] In some embodiments, step 2053 may specifically include: in response to the fact that the feature signature of the current user behavior sequence is the same as the feature signature of the target historical behavior sequence in all historical behavior sequences, determining that the current user behavior sequence and the target historical behavior sequence are completely identical.

[0094] In some examples, the signature is a binary string. When the signature of the current user behavior sequence is the first string and the signature of the target historical behavior sequence is the second string, the first string and the second string are compared bit by bit. If the corresponding characters in the first string and the second string are the same, that is, the first string and the second string are the same, then it is determined that the current user behavior sequence and the target historical behavior sequence are exactly the same.

[0095] In some other embodiments, step 2053 may specifically include: in response to the fact that the feature signature of the current user behavior sequence is different from the feature signatures of all historical behavior sequences, and all historical behavior sequences are clustered to obtain at least one behavior sequence cluster, determining the similarity between the current user behavior sequence and at least one behavior sequence cluster.

[0096] In some examples, the signature is a binary string. When the signature of the current user behavior sequence is the first string and the signature of each historical behavior sequence is the second string, the first string and each second string are compared bit by bit. If at least one corresponding character in the first string and each second string is different, that is, the first string and each second string are different, then it is determined that the current user behavior sequence is different from all historical behavior sequences.

[0097] In some embodiments, among all historical behavioral sequences, there may be functionally similar but not identical behavioral sequences. Therefore, these behavioral sequences can be clustered to form a "paradigm".

[0098] (Canonical Trace) involves clustering all historical behavior sequences to obtain at least one behavior sequence cluster. If no historical behavior sequence has a feature signature that overlaps with the current user's behavior sequence, the system further calculates the similarity between the current user's behavior sequence and the at least one clustered behavior sequence. The similarity calculation can use the Levenshtein algorithm to calculate the edit distance between the feature sequence corresponding to the current user's behavior sequence and the feature sequences corresponding to each behavior sequence cluster. The edit distance is then normalized to obtain the similarity. This allows us to determine the similarity between the current user's behavior sequence and each behavior sequence cluster.

[0099] The technical solution provided in this disclosure can extract features from the current user behavior sequence and all historical behavior sequences separately to obtain feature sequences corresponding to each behavior sequence. Based on these feature sequences, feature signatures are calculated for each behavior sequence. Therefore, the feature signatures of the current user behavior sequence are compared with the feature signatures of all historical behavior sequences to determine the similarity between them. In other words, this solution reduces behavior sequences from high-dimensional data to low-dimensional feature signatures, thereby reducing the computational cost of large-scale data processing, improving the accuracy of similarity judgment, and providing reliable data support for subsequent memory storage of the intelligent agent.

[0100] like Figure 6 As shown above, in the above Figure 5 Based on the illustrated embodiment, step 206 above can be specifically implemented through the following steps 2061, 2062, or 2063:

[0101] Step 2061: In response to determining that the current user behavior sequence is exactly the same as the target historical behavior sequence, update the hit count and latest access time of the target historical behavior sequence.

[0102] In some embodiments, when it is determined that the current user behavior sequence is exactly the same as the target historical behavior sequence, that is, the current user behavior sequence and the target historical behavior sequence are functionally identical behavior sequences, the functionally identical behavior sequences are merged. That is, it is not necessary to create new entries in the memory database, but only to update the hit count of the target historical behavior sequence, and the latest access time is the current time.

[0103] For example, on day 1, a user performs the action sequence "login to email -> read new email -> logout". The system stores this as a new memory M2 in the memory database, with a hit count of 1. On day 2, the user performs the action sequence M3. Since the preprocessing module calculates that the hash signature of M3 is the same as that of M3, it can be determined that M3 and M3 are completely identical. Therefore, the system does not create a new memory, updates the hit count of M2 to 2, and refreshes its latest access time to the execution time of M3. In this way, the user continues to repeat the above action sequence for 100 days. The memory database contains only one memory M2 related to this operation, but its hit count is 100, and its latest access time is the access time of day 100, thus greatly saving storage space.

[0104] Step 2062: In response to determining that the similarity between the current user behavior sequence and a target behavior sequence cluster in at least one behavior sequence cluster is greater than or equal to a similarity threshold, the current user behavior sequence is divided into a target behavior sequence cluster, and the metadata of the target behavior sequence cluster is updated based on the description data of the current user behavior sequence.

[0105] In some embodiments, when it is determined that the similarity between the current user behavior sequence and the target behavior sequence cluster in at least one behavior sequence cluster is greater than or equal to a similarity threshold, that is, the current user behavior sequence and the target behavior sequence cluster are functionally similar but not completely the same behavior sequences, the current user behavior sequence can be classified as the target behavior sequence cluster, and the metadata of the target behavior sequence cluster is updated based on the description data of the current user behavior sequence; wherein, the similarity threshold can be a factory setting or a user-defined setting.

[0106] In some examples, the descriptive data for the current user behavior sequence may include the operation type, element text, etc. For example, the descriptive data for the current user behavior sequence is: [Click the menu, select Save, browse the path, select the local path, enter the file name, and click Save].

[0107] In some examples, metadata refers to descriptive data of a set of behavioral sequences included in a target behavioral sequence cluster. This metadata may include the operation steps of the behavioral sequence, the operation duration, the number of historically similar behavioral sequences, etc. For example, the "Regular Save" cluster contains 100 similar "Local File Save" operations in history, and its metadata includes the following: operation steps [click menu, select save, browse path, select local path, enter file name, click save]; average operation duration 45 seconds; common storage path "D:\Work Documents"; number of historically similar sequences: 100.

[0108] For example, suppose that at least one behavior sequence cluster obtained by clustering all historical behavior sequences includes: a "Regular Save" cluster, a "Quick Save" cluster, and a "Cloud Save" cluster, and each behavior sequence cluster contains a set of similar behavior sequences. In the current user interface, the user performs the following actions: click "File" → "Save" in the top menu bar → click "Browse" in the pop-up window → select the local path "D:\Work Documents" → enter the filename "Project Report_v2" → click "Save". If the similarity between the current behavior sequence and the "Regular Save" cluster (i.e., the target behavior sequence cluster) is greater than or equal to a similarity threshold, the current behavior sequence can be classified into the "Regular Save" cluster, and the input filename in the "Regular Save" cluster can be updated to a filename with a version number. The number of historical similar sequences included in the "Regular Save" cluster can also be updated from 100 to 101. This achieves compressed storage of similar behavior sequences.

[0109] Step 2063: In response to determining that the similarity between the current user behavior sequence and at least one behavior sequence cluster is less than a similarity threshold, the current user behavior sequence is stored in the memory database.

[0110] In some embodiments, when it is determined that the similarity between the current user behavior sequence and at least one behavior sequence cluster is less than a similarity threshold, that is, the current user behavior sequence and at least one behavior sequence cluster are not functionally similar, i.e. the current user behavior sequence is a newly emerging behavior sequence, a new entry needs to be created in the memory database, so that the current user behavior sequence is stored separately in the memory database.

[0111] For example, consider a similarity threshold of 0.7. A user performs the following action sequence in the current user interface: "Click the 'Voice Input' button → Start speaking, click 'Stop Recording' → System automatically transcribes → Click the 'Translate' button → Select the target language 'English' → View the translation result". Since the calculated similarity between the current action sequence and at least one cluster of action sequences is less than 0.7, the current action sequence is considered a new action sequence, and an independent entry is created in the memory database to store the current user action sequence.

[0112] The technical solution provided in this disclosure, based on robust features, achieves deduplication of behavior sequences by merging functionally identical behavior sequences when it is determined that the current user behavior sequence is completely identical to the target historical behavior sequence, only updating the hit count and latest access time of the target historical behavior sequence. Furthermore, when the similarity between the current user behavior sequence and at least one target behavior sequence cluster is greater than or equal to a similarity threshold, the current user behavior sequence is divided into target behavior sequence clusters, and the metadata of the target behavior sequence clusters is updated based on the description data of the current user behavior sequence. Therefore, by clustering functionally similar but not identical behavior sequences, compressed storage of similar behavior sequences is achieved. This significantly saves storage space. Moreover, when the similarity between the current user behavior sequence and at least one behavior sequence cluster is less than the similarity threshold, the current user behavior sequence can be stored separately in the memory database, thus enabling timely storage of new behavior sequences, thereby capturing new user needs and improving agent performance.

[0113] In some embodiments, such as Figure 7 As shown above, in the above Figure 2 Based on this, the technical solution provided in the embodiments of this application may further include the following:

[0114] Step 207: In response to receiving the user's input description of the retrieval task, retrieve a list of candidate memories from the memory database based on the keywords in the retrieval task description.

[0115] In some examples, when the agent receives a retrieval task description input by the user, the retrieval task description will go through a sparse retrieval phase. That is, using traditional algorithms such as Best Matching 25 (BM25), based on the keywords in the retrieval task description and the keywords in the historical memory data stored in the memory data, such as application names, button text ("send", "save", "login", "search", etc.), a batch of candidate memories that match the keywords in the retrieval task description are retrieved from the memory repository, thus obtaining a candidate memory list.

[0116] Step 208: Identify at least one candidate memory in the candidate memory list that has a semantic similarity to the description of the retrieval task that is greater than or equal to the second similarity threshold.

[0117] In some examples, after the sparse retrieval stage, a dense retrieval based on the retrieval task description is required. This can be achieved using text embedding models, such as the unified text model (text-embedding-ada-002, Ada-002), to convert the retrieval task description into query vectors and convert each memory data in the candidate memory list into a query vector to obtain a vector database. Then, the cosine similarity between the query vector corresponding to the retrieval task description and each vector in the vector database is calculated. Each cosine similarity is compared with a second similarity threshold to determine at least one candidate memory from the candidate memory list whose semantic similarity to the retrieval task description is greater than or equal to the second similarity threshold. That is, at least one candidate memory can be a memory that is completely different from the literal description of the user's retrieval task description but has the same semantics.

[0118] Step 209: Obtain the current context information and sort at least one candidate memory based on the current context information.

[0119] In some examples, the aforementioned current context information could be the application currently running on the device, or the current page structure of the user interface. The current context information can be obtained through system interfaces and accessibility features. After obtaining the current context information, the matching degree between the current context information and each of the at least one candidate memory can be calculated, and then the at least one candidate memory can be reordered according to the matching degree from high to low. In this way, memories with a higher matching degree to the current context information are assigned higher priority.

[0120] For example, consider a retrieval task described as "Please order me a bowl of beef noodles". Assume that at least one candidate memory retrieved includes ordering beef noodles on Meituan and ordering beef noodles on Eleme. If the current device is running Meituan, the memory data of "ordering beef noodles on Meituan" can be ranked first, and the memory data of "ordering beef noodles on Eleme" can be ranked last.

[0121] It should be noted that steps 207 to 209 can be performed after step 203 or before step 201. The specific execution method can be determined according to the actual usage situation, and this embodiment does not limit the execution method.

[0122] The technical solution provided in this disclosure, in response to receiving a user-inputted retrieval task description, retrieves a list of candidate memories from a memory database based on the keywords in the retrieval task description. It then identifies at least one candidate memory from the list whose semantic similarity to the retrieval task description is greater than or equal to a second similarity threshold, and further sorts the at least one candidate memory based on the acquired current context information. Therefore, when the agent performs a retrieval task, this solution can efficiently retrieve relevant historical experience from the memory database and optimize the retrieval results by combining them with current context information, thereby providing the agent with more accurate and timely guidance. This improves the overall response speed and task success rate of the GUI agent.

[0123] Exemplary device

[0124] Figure 8 This is a schematic diagram of a memory management device for an intelligent agent, provided as an exemplary embodiment of the present disclosure. The device can be installed in electronic devices such as terminal devices and servers, or on objects such as vehicles, to execute the memory management method for an intelligent agent according to any of the above embodiments of the present disclosure.

[0125] like Figure 8 As shown, the above-mentioned device 300 may include: a first acquisition module 301, which can be used to acquire the comprehensive value score of at least one memory data stored in the memory database in response to detecting that the occupancy rate of the memory database is greater than or equal to a first preset threshold; wherein the comprehensive value score is used to indicate the total value of a memory data in multiple dimensions; a first determination module 302, which can be used to determine the target memory data to be deleted from the at least one memory data based on the comprehensive value score of the at least one memory data; and a first processing module 303, which can be used to delete the target memory data from the memory database.

[0126] In one possible implementation, the first acquisition module 301 described above can be specifically used to: acquire the retrieval hit rate score, rarity score, and recentity score of each memory data in the at least one memory data; wherein the retrieval hit rate score is used to indicate the frequency of successful utilization of a memory data, the rarity score is used to indicate the criticality of a memory data, and the recentity score is used to indicate the timeliness of a memory data; and based on the retrieval hit rate score, the rarity score, and the recentity score of each memory data, determine the comprehensive value score of each memory data in the at least one memory data.

[0127] In one possible implementation, the above apparatus may further include: a second acquisition module, which can be used to acquire a current user behavior sequence; a second determination module, which can be used to determine the similarity between the current user behavior sequence and all historical behavior sequences; and a first storage module, which can be used to store the current user behavior sequence in the memory database based on the similarity between the current user behavior sequence and all historical behavior sequences.

[0128] In one possible implementation, the second determining module described above can be specifically used to: extract features from the current user behavior sequence and all historical behavior sequences respectively to obtain feature sequences corresponding to each behavior sequence; calculate feature signatures of the feature sequences corresponding to each behavior sequence based on the feature sequences corresponding to each behavior sequence; and compare the feature signatures of the current user behavior sequence with the feature signatures of all historical behavior sequences respectively to determine the similarity between the current user behavior sequence and all historical behavior sequences.

[0129] In one possible implementation, the agent is an image interface agent; the second determining module can also be specifically used to: in response to each behavior sequence including user interface screenshots and user coordinate operations, process the user interface screenshots using a first preset algorithm to generate a visual fingerprint; and convert the user coordinate operations into semantic operation representations using a second preset algorithm; wherein the feature sequence corresponding to each behavior sequence includes the visual fingerprint and the semantic operation representation.

[0130] In one possible implementation, the second determining module described above can also be specifically used to: determine that the current user behavior sequence and the target historical behavior sequence are completely identical in response to the feature signature of the current user behavior sequence being the same as the feature signature of the target historical behavior sequence among all historical behavior sequences; or, determine the similarity between the current user behavior sequence and the at least one behavior sequence cluster in response to the feature signature of the current user behavior sequence being different from the feature signatures of all historical behavior sequences, and all historical behavior sequences being clustered to obtain at least one behavior sequence cluster.

[0131] In one possible implementation, the first storage module described above can be specifically used to: update the hit count and latest access time of the target historical behavior sequence in response to determining that the current user behavior sequence is completely identical to the target historical behavior sequence; or, in response to determining that the similarity between the current user behavior sequence and the target behavior sequence cluster in the at least one behavior sequence cluster is greater than or equal to a similarity threshold, divide the current user behavior sequence into the target behavior sequence cluster, and update the metadata of the target behavior sequence cluster based on the description data of the current user behavior sequence.

[0132] In one possible implementation, the first storage module described above may also be specifically used to: store the current user behavior sequence in the memory database in response to determining that the similarity between the current user behavior sequence and the at least one behavior sequence cluster is less than the similarity threshold.

[0133] In one possible implementation, the above apparatus further includes: a memory retrieval module, which can be used to retrieve a list of candidate memories from the memory database based on keywords in the memory database in response to receiving a retrieval task description input by a user; a third determination module, which can be used to determine at least one candidate memory in the candidate memory list whose semantic similarity to the retrieval task description is greater than or equal to a second similarity threshold; and a memory sorting module, which can be used to obtain current context information and sort the at least one candidate memory based on the current context information.

[0134] The beneficial technical effects corresponding to the exemplary embodiments of this device can be found in the corresponding beneficial technical effects of the exemplary method section above, and will not be repeated here.

[0135] Exemplary electronic devices

[0136] Figure 9 A structural diagram of an electronic device provided in an embodiment of this disclosure includes at least one processor 111 and a memory 112.

[0137] The processor 111 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 11 to perform desired functions.

[0138] The memory 112 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 111 may execute one or more computer program instructions to implement the memory management methods for intelligent agents and / or other desired functions of the various embodiments of this disclosure described above.

[0139] In one example, the electronic device 11 may also include an input device 113 and an output device 114, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0140] The input device 113 may include various sensors, including but not limited to: a distance sensor for detecting the distance between a target object and the vehicle; an image sensor for acquiring information about the vehicle's surrounding environment. In some examples, the input device may also include a pressure sensor for detecting seat pressure to determine the presence and location of passengers; a temperature sensor for monitoring the temperature inside the cabin; a humidity sensor for monitoring the humidity inside the cabin to assist in regulating the in-vehicle environment; an air quality sensor for monitoring in-vehicle air quality, such as carbon dioxide and volatile organic compounds (VOCs); a light sensor for detecting the intensity of light inside and outside the vehicle; an acceleration sensor for detecting changes in the vehicle's acceleration; a distance sensor for detecting the distance between the vehicle and other objects; a touchscreen sensor for interaction with the vehicle's infotainment system; biometric sensors, such as fingerprint recognition and facial recognition; a heart rate monitor for monitoring the driver's heart rate; a sound sensor for voice recognition and interaction to enable voice control; a seat sensor for monitoring seat usage, such as whether the seat is occupied and the passenger's body size; and wireless communication sensors, such as Bluetooth and Wi-Fi, for connecting to smart devices to achieve data transmission and remote control. In addition to the examples given above, the input device may include more or fewer sensors, which will not be elaborated here.

[0141] The output device 114 can output various information or signals to other hardware or devices, which may include displays, car audio systems, seats, windows, steering wheels, communication networks, and their connected remote output devices. The displays may include multiple different displays such as a driver's side display, a passenger side display, and a rear-seat display. The car audio system may include multiple speakers located in different positions within the vehicle cabin, and each display or speaker can operate independently.

[0142] Of course, for the sake of simplicity, Figure 9 Only some of the components of the electronic device 11 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 11 may include any other suitable components depending on the specific application.

[0143] Exemplary computer program products and computer-readable storage media

[0144] In addition to the methods and apparatus described above, embodiments of this disclosure may also provide a computer program product, including computer program instructions that, when executed by a processor, cause the processor to perform the steps in the memory management methods for intelligent agents described in the various embodiments of this disclosure in the "Exemplary Methods" section above.

[0145] Computer program products can be written in any combination of one or more programming languages ​​to perform the operations of embodiments of this disclosure. These programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0146] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the memory management methods for intelligent agents described in the various embodiments of this disclosure in the "Exemplary Methods" section above.

[0147] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, but is not limited to, systems, apparatuses, or devices that are electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0148] The basic principles of this disclosure have been described above with reference to specific embodiments. However, the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0149] Various modifications and variations can be made to this disclosure without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this disclosure and their equivalents, this disclosure is also intended to include such modifications and variations.

Claims

1. A memory management method for intelligent agents, comprising: In response to detecting that the occupancy rate of the memory database is greater than or equal to a first preset threshold, the comprehensive value score of at least one memory data stored in the memory database is obtained; wherein, the comprehensive value score is used to indicate the total value of a memory data in multiple dimensions; Based on the comprehensive value score of the at least one memory data, target memory data to be deleted is determined from the at least one memory data; Delete the target memory data from the memory database.

2. The method according to claim 1, wherein, The process of obtaining the comprehensive value score of at least one memory data point stored in the memory database includes: Obtain the retrieval hit rate score, rarity score, and recentity score for each memory data in the at least one memory data; wherein, the retrieval hit rate score is used to indicate the frequency with which a memory data is successfully utilized, the rarity score is used to indicate the criticality of a memory data, and the recentity score is used to indicate the timeliness of a memory data. Based on the retrieval hit rate score, the rarity score, and the recentity score of each memory data, a comprehensive value score is determined for each memory data in the at least one memory data.

3. The method according to claim 1, further comprising: Get the current user behavior sequence; Determine the similarity between the current user behavior sequence and all historical behavior sequences; The current user behavior sequence is stored in the memory database based on the similarity between the current user behavior sequence and all historical behavior sequences.

4. The method according to claim 3, wherein, Determining the similarity between the current user behavior sequence and all historical behavior sequences included in the memory database includes: Feature extraction is performed on the current user behavior sequence and all historical behavior sequences respectively to obtain the feature sequence corresponding to each behavior sequence; Based on the feature sequences corresponding to each behavior sequence, calculate the feature signature of the feature sequences corresponding to each behavior sequence. The feature signatures of the current user behavior sequence are compared with the feature signatures of all historical behavior sequences to determine the similarity between the current user behavior sequence and all historical behavior sequences.

5. The method according to claim 4, wherein, The intelligent agent is an image interface intelligent agent; the step of extracting features from the current user behavior sequence and all historical behavior sequences to obtain the feature sequence corresponding to each behavior sequence includes: In response to various action sequences, including user interface screenshots and user coordinate operations, the user interface screenshots are processed using a first preset algorithm to generate a visual fingerprint; The user coordinate operation is converted into a semantic operation representation using a second preset algorithm; The feature sequences corresponding to each behavior sequence include the visual fingerprint and the semantic operation representation.

6. The method according to claim 4, wherein, The step of comparing the feature signatures of the current user behavior sequence with the feature signatures of all historical behavior sequences to determine the similarity between the current user behavior sequence and all historical behavior sequences includes: In response to the fact that the feature signature of the current user behavior sequence is the same as the feature signature of the target historical behavior sequence among all historical behavior sequences, it is determined that the current user behavior sequence and the target historical behavior sequence are completely identical, or... In response to the fact that the feature signature of the current user behavior sequence is different from the feature signatures of all historical behavior sequences, and all historical behavior sequences are clustered to obtain at least one behavior sequence cluster, the similarity between the current user behavior sequence and the at least one behavior sequence cluster is determined.

7. The method according to claim 6, wherein, The step of storing the current user behavior sequence in the memory database based on the similarity between the first user behavior sequence and all historical behavior sequences includes: In response to determining that the current user behavior sequence is exactly the same as the target historical behavior sequence, update the hit count and latest access time of the target historical behavior sequence; or, In response to determining that the similarity between the current user behavior sequence and a target behavior sequence cluster in the at least one behavior sequence cluster is greater than or equal to a similarity threshold, the current user behavior sequence is divided into the target behavior sequence cluster, and the metadata of the target behavior sequence cluster is updated based on the description data of the current user behavior sequence.

8. The method according to claim 6, wherein, The step of storing the current user behavior sequence in the memory database based on the similarity between the first user behavior sequence and all historical behavior sequences includes: In response to determining that the similarity between the current user behavior sequence and the at least one behavior sequence cluster is less than the similarity threshold, the current user behavior sequence is stored in the memory database.

9. The method according to claim 1, further comprising: In response to receiving a user-input description of a retrieval task, a list of candidate memories is retrieved from the memory database based on the keywords in the retrieval task description; In the candidate memory list, at least one candidate memory whose semantic similarity to the description of the retrieval task is greater than or equal to a second similarity threshold is identified; Obtain the current context information and sort the at least one candidate memory based on the current context information.

10. A memory management device for an intelligent agent, comprising: The first acquisition module is used to acquire the comprehensive value score of at least one piece of memory data stored in the memory database in response to detecting that the occupancy rate of the memory database is greater than or equal to a first preset threshold; wherein, the comprehensive value score is used to indicate the total value of a piece of memory data in multiple dimensions; The first determining module is used to determine the target memory data to be deleted from the at least one memory data based on the comprehensive value score of the at least one memory data. The first processing module is used to delete the target memory data from the memory database.

11. A computer-readable storage medium storing a computer program for performing the memory management method for an intelligent agent according to any one of claims 1-9.

12. An electronic device, the electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the memory management method for an intelligent agent as described in any one of claims 1-9.