A hierarchical city operation intelligent agent memory management method and system

By employing a hierarchical management approach, combined with task intensity, time decay, and industry factors, a unified index and retrieval of multimodal data is achieved. This addresses the issues of insufficient timeliness and cross-modal capabilities in the memory management of smart city operation agents, thereby improving the accuracy and efficiency of emergency response and operation and maintenance decisions.

CN120910313BActive Publication Date: 2026-02-10BEIJING LOIT TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511444067.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2026-02-10
Estimated Expiration
2045-10-10

AI Technical Summary

Technical Problem

Existing technologies for memory management of intelligent agents in smart city operations suffer from problems such as insufficient timeliness, single-factor driving, insufficient cross-modal capabilities, and unreasonable retrieval priorities. They fail to effectively handle memory management across multiple time scales, industry task intensity modeling, and multi-factor joint ranking.

Method used

A hierarchical urban operation intelligent agent memory management method is adopted. By collecting multimodal task data, calculating task intensity factor, time decay factor and industry key factor, a unified embedding and indexing mechanism is established. The method combines semantic similarity and knowledge graph centrality for scoring and ranking, thereby realizing hierarchical management of short-term, medium-term and long-term memory.

Benefits of technology

It improves the hit rate, timeliness and accuracy of emergency response and operation and maintenance decisions, enhances the integrity of multimodal data retrieval and the rationality of decisions, and adapts to intelligent agent memory management in complex task scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910313B_ABST
    Figure CN120910313B_ABST
Patent Text Reader

Abstract

The application discloses a hierarchical city operation intelligent agent memory management method and system, and relates to the technical field of artificial intelligence and smart city. The method comprises the following steps: collecting multi-modal task data of smart city operation; estimating the occurrence intensity of the multi-modal task data in the time dimension to obtain a task intensity factor; combining the task intensity factor, a time decay factor and an industry key factor to calculate the dynamic weight of a memory entry; realizing the hierarchical evolution of short-term memory, medium-term memory and long-term memory according to the dynamic weight of the memory entry; establishing a unified embedding and indexing mechanism for the multi-modal task data and storing the multi-modal task data in the same memory knowledge graph; and scoring by comprehensively considering the semantic similarity, the dynamic weight and the knowledge graph centrality, and performing memory retrieval and sorting according to the scoring result. The application can improve the hit rate, timeliness and accuracy of the emergency disposal and operation and maintenance decision of the intelligent agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and smart city technology, and in particular to a hierarchical urban operation intelligent agent memory management method and system. Background Technology

[0002] As intelligent agents for urban operations are increasingly used in smart property management, urban management, emergency command and other scenarios, these agents need to process multimodal data streams (work orders, sensors, videos, text logs, etc.) and have effective long-term memory accumulation, dynamic forgetting and rapid retrieval capabilities in complex environments.

[0003] However, traditional memory management mechanisms generally suffer from the following problems: insufficient timeliness: failing to dynamically reflect the intensity and urgency of tasks; single-factor driven: relying solely on time or frequency, ignoring key industry factors such as emergency level, risk, and SLA (Service Level Agreement); insufficient cross-modal capabilities: storing different types of data in isolation, lacking a unified index; and unreasonable retrieval priorities: ranking relies too heavily on semantic similarity, lacking task weight and knowledge network factors.

[0004] Existing research and applications can be broadly classified into the following categories: (1) Hot and cold stratification method: data is assigned to "hot / cold layers" based on access frequency or time, but this method focuses on storage media and lacks semantic memory evolution capabilities; (2) Time decay method: an exponential decay function is used to make recent events more weighted, but this method ignores task intensity and key industry factors; (3) Semantic similarity retrieval: achieved through vector retrieval or large model matching, but this method is insufficient for multi-task and emergency decision support.

[0005] Therefore, existing technologies have not yet developed effective solutions for memory management across multiple time scales, industry task intensity modeling, and multi-factor joint ranking. Summary of the Invention

[0006] To address the aforementioned problems, the present invention aims to provide a hierarchical urban operation intelligent agent memory management method and system, which can hierarchically manage urban operation memory at multiple time scales (STM / MTM / LTM). In memory updating and retrieval, the system comprehensively considers task intensity, time decay, and key industry factors, realizes multimodal unified indexing and cross-modal retrieval, and improves the hit rate, timeliness, and accuracy of emergency response and operation and maintenance decisions.

[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0008] On the one hand, a hierarchical urban operation intelligent agent memory management method is provided, the method comprising the following steps:

[0009] S1. Collect multimodal task data for smart city operation;

[0010] S2. Estimate the occurrence intensity of multimodal task data in the time dimension to obtain the task intensity factor;

[0011] S3. Combine task intensity factor, time decay factor and industry key factor to calculate the dynamic weight of memory entries;

[0012] S4. Based on the dynamic weight of memory items, realize the hierarchical evolution of short-term memory, medium-term memory and long-term memory;

[0013] S5. For multimodal task data, establish a unified embedding and indexing mechanism and store it in the same memory knowledge graph;

[0014] S6. The system scores based on a combination of semantic similarity, dynamic weights, and knowledge graph centrality, and then performs memory retrieval and ranking based on the scoring results.

[0015] Optionally, in step S1, the multimodal task data includes work orders, sensor values, monitoring videos, text logs, voice dialogues, and alarm information.

[0016] Optionally, in step S2, the task intensity factor I(t) is calculated using a sliding window statistical method and a statistical method based on the Hawkes self-excitation process.

[0017] The sliding window statistical method is calculated as follows:

[0018]

[0019] Among them, I win (t) is the task intensity factor calculated by the sliding window statistical method, N(tW, t) represents the number of task triggers within the time interval [tW, t], and W is the length of the sliding time window;

[0020] The statistical calculation based on the Hawkes self-excitation process is as follows:

[0021]

[0022] Among them, I hawkes (t) is the task intensity factor calculated statistically based on the Hawkes self-excitation process, μ is the basic trigger intensity, and t represents the background trigger frequency when there are no historical events. j This represents the time point when the j-th past task was triggered, α represents the trigger intensity of each task trigger, and β is the short-term decay coefficient, which controls the rate at which the trigger intensity decreases over time.

[0023] Optionally, in step S3, the dynamic weights are calculated as follows:

[0024]

[0025] Among them, W i (t) represents the dynamic weight of the i-th memory entry at time t, I i (t) represents the task intensity of the i-th memory entry. Let β represent the time decay factor of the i-th memory entry, where β i S is the long-term decay coefficient of the i-th memory entry, where Δt represents the time interval since the last trigger of the i-th memory entry. i R represents the emergency level factor. i Indicates risk factor, A i The SLA urgency factor is represented by γ, δ, and η, which are the adjustment coefficients of the emergency level factor, risk factor, and SLA urgency factor, respectively.

[0026] Among them, the emergency response level factor, risk factor, and SLA urgency factor together constitute the key factors of the industry.

[0027] Optionally, in step S4, the rules for hierarchical evolution include promotion rules and elimination rules;

[0028] Promotion rules include:

[0029] If the dynamic weight W of the memory entry i If the value is greater than the first threshold T1, the corresponding memory item is promoted from short-term memory to medium-term memory; if the dynamic weight W of the memory item is... i If the value is greater than the second threshold T2, the corresponding memory item is promoted from intermediate memory to long-term memory; where T2>T1;

[0030] The elimination rules include:

[0031] If the dynamic weight W of the memory entry i Less than the minimum threshold T min If no update is made within a preset time, the corresponding memory entry will be deleted.

[0032] Optionally, in step S5, for multimodal task data, a unified graph-vector hybrid index is established by combining vectorization with a graph database and stored in a memory knowledge graph, so that the agent can call relevant memories across modalities when retrieving data.

[0033] Optionally, in step S6, the score is calculated by combining semantic similarity, dynamic weight, and knowledge graph centrality as follows:

[0034]

[0035] Among them, Score i It is the i-th memory entry m i The rating, Sim semantic (q,m i ) represents the query task q and the i-th memory entry m i semantic similarity, W i Represents memory entry m i Dynamic weights, Centrality(m i ) represents the memory entry m i The centrality in a knowledge graph is called knowledge graph centrality; a, b, and c are the weight parameters of semantic similarity, dynamic weight, and knowledge graph centrality, respectively.

[0036] Optionally, the method further includes:

[0037] Design a standardized interface that automatically parses task semantics and calls the most relevant memory entries based on task type and hierarchical mechanism.

[0038] On the other hand, a hierarchical urban operation intelligent agent memory management system is provided for implementing the method described in any of the above embodiments, the system comprising:

[0039] The task flow acquisition module is used to collect multimodal task data for smart city operation;

[0040] The task intensity estimation module is used to estimate the occurrence intensity of multimodal task data in the time dimension to obtain the task intensity factor;

[0041] The weight calculation module is used to calculate the dynamic weight of memory entries by combining task intensity factor, time decay factor and industry key factor.

[0042] The hierarchical memory management module is used to realize the hierarchical evolution of short-term memory, medium-term memory and long-term memory based on the dynamic weight of memory items;

[0043] The multimodal indexing module is used to establish a unified embedding and indexing mechanism for multimodal task data and store it in the same memory knowledge graph;

[0044] The retrieval and ranking module is used to score based on semantic similarity, dynamic weights, and knowledge graph centrality, and then perform memory retrieval and ranking based on the scoring results.

[0045] On the other hand, an electronic device is provided, the electronic device comprising:

[0046] processor;

[0047] The memory stores computer-readable instructions, which, when loaded and executed by the processor, implement the steps of the hierarchical city operation intelligent agent memory management method described above.

[0048] On the other hand, a computer-readable storage medium is provided, wherein program code is stored in the computer-readable storage medium, and the program code can be called by a processor to execute the steps of the hierarchical city operation intelligent agent memory management method described above.

[0049] The beneficial effects of the technical solution provided by this invention include at least the following:

[0050] In this embodiment of the invention, a dynamic weighting mechanism combining task intensity factors, time decay factors, and industry key factors is used to achieve hierarchical evolution and layered management of short-term, medium-term, and long-term memory. This makes the intelligent agent more in line with human forgetting and memory habits, ensuring the rationality and efficiency of the agent's memory retrieval. Through multimodal data fusion, the integrity of memory retrieval and the accuracy of decision-making in complex task scenarios are improved. Through a joint ranking mechanism of semantic similarity, dynamic weights, and knowledge graph centrality, the hit rate, timeliness, and accuracy of emergency response and operation and maintenance decisions are improved. Through industry interface adaptation, the feasibility and promotional value of the solution in smart cities and operation and maintenance management are enhanced. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a flowchart illustrating the overall process of a hierarchical urban operation intelligent agent memory management method provided in this embodiment of the invention.

[0053] Figure 2 This is a hierarchical evolution state machine diagram provided in an embodiment of the present invention;

[0054] Figure 3 This is a schematic diagram of the joint sorting provided in an embodiment of the present invention;

[0055] Figure 4 This is a schematic diagram of the structure of a hierarchical urban operation intelligent agent memory management system provided in an embodiment of the present invention;

[0056] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0058] In embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the term "exemplary" is used to present concepts in a specific manner.

[0059] This invention provides a hierarchical urban operation intelligent agent memory management method, which can be implemented by an electronic device, such as a terminal or a server. Figure 1 As shown, the processing flow of this method may include the following steps:

[0060] S1. Collect multimodal task data for smart city operation;

[0061] In this embodiment of the invention, the multimodal task data includes work orders, sensor values, surveillance videos, text logs, voice dialogues, alarm information, etc., which are common in smart city and smart building scenarios.

[0062] S2. Estimate the occurrence intensity of multimodal task data in the time dimension to obtain the task intensity factor.

[0063] To accurately reflect the recent triggering activity of different tasks, this invention introduces a task intensity factor I(t) during memory retrieval ranking. This task intensity factor quantifies the activity level of a memory entry over time, reflecting its importance to the current task. The task intensity factor I(t) is calculated in the following two ways:

[0064] (1) Sliding window statistical method (basic implementation);

[0065] Within a given time window W, count the number of task triggers and calculate the average trigger rate:

[0066]

[0067] Among them, I win(t) is the task intensity factor calculated by the sliding window statistical method, N(tW, t) represents the number of task triggers within the time interval [tW, t], and W is the length of the sliding time window (e.g., 1 hour, 1 day).

[0068] This method can quickly estimate the recent activity level of a task, is easy to calculate, and is suitable for scenarios with high real-time requirements.

[0069] (2) Statistical method based on Hawkes self-excitation process (improved implementation);

[0070] To capture the "self-excitation effect" of task triggering, i.e., the probability of triggering a task again in the short term increases after one trigger, the Hawkes self-excitation process model is introduced:

[0071]

[0072] Among them, I hawkes (t) is the task intensity factor calculated statistically based on the Hawkes self-excitation process, μ is the basic trigger intensity, and t represents the background trigger frequency when there are no historical events. j This represents the time point when the j-th past task was triggered, α represents the trigger intensity of each task trigger, and β is the short-term decay coefficient, which controls the rate at which the trigger intensity decreases over time.

[0073] The short-term decay coefficient β in the Hawkes process is used to characterize the short-term decay effect of a single task trigger, corresponding to the decay within the task trigger intensity, and is a dynamic decay at the event level. Its function is to control the gradual reduction of the impact of a task trigger in the short term (for example, the relevance of a fire alarm trigger weakens after an hour).

[0074] This method can dynamically capture the evolution of tasks over time, making it particularly suitable for handling high-frequency task scenarios and exhibiting stronger fitting capabilities.

[0075] In practical applications, the basic implementation and the improved implementation can be selected according to the needs of the scenario: for scenarios with high requirements for real-time performance and lightweight computing, the sliding window statistical method can be used; for scenarios with high requirements for modeling accuracy and dynamism, the statistical method based on the Hawkes self-excitation process can be used.

[0076] The calculated task intensity factor I(t) will serve as a key factor in the joint ranking formula, working together with the time decay factor and the industry key factor to determine the priority of memory retrieval results.

[0077] S3. Combine the task intensity factor, time decay factor, and industry key factor to calculate the dynamic weight of the memory item.

[0078] In this embodiment of the invention, the dynamic weights are calculated as follows:

[0079]

[0080] Among them, W i (t) represents the dynamic weight of the i-th memory entry at time t, I i (t) represents the task intensity of the i-th memory entry. Let β represent the time decay factor of the i-th memory entry, where β i S is the long-term decay coefficient of the i-th memory entry, where Δt represents the time interval since the last triggering of the i-th memory entry, i.e., the time difference between the current time t and the most recent occurrence time of memory entry i (task i); i R represents the emergency level factor. i Indicates risk factor, A i The SLA urgency factor is represented by γ, δ, and η, which are the adjustment coefficients for the emergency level factor, risk factor, and SLA urgency factor, respectively. The emergency level factor, risk factor, and SLA urgency factor together constitute the key industry factors.

[0081] The long-term decay coefficient β in the dynamic weighting formula i This is used to model the long-term decay mechanism of memory item i in the overall hierarchical memory system. Its function is to show that, regardless of the task intensity, the priority of the entire memory item will gradually decrease over time, corresponding to the "natural forgetting mechanism of memory items in the STM / MTM / LTM hierarchy".

[0082] Therefore, the long-term attenuation coefficient β i The short-term decay coefficient β and the long-term decay coefficient β act on different time scales. The short-term decay coefficient β addresses the decay of task activity over time, while the long-term decay coefficient β... i This addresses the decay of memory entries in global memory. The advantage of this design is that it ensures both the sensitivity to recent, high-frequency events (short-term decay coefficient β) and prevents memory entries from being occupied by outdated tasks for extended periods (long-term decay coefficient β). i ).

[0083] The time decay factor dynamically reflects the "current value" of a memory. For example, if similar tasks occur frequently recently, their weight can remain high even after a certain time interval, prompting the memory to be prioritized or elevated to a higher level. Conversely, memories that have not been called for a long time and occur infrequently will gradually decrease in weight until they are eliminated. This mechanism addresses the shortcomings of existing technologies that either treat all historical memories equally or sort them only by time.

[0084] This invention combines task intensity factor, time decay factor and industry key factor to obtain the dynamic weight of memory entries, which comprehensively reflects the importance, timeliness and industry key attributes of the event.

[0085] S4. Based on the dynamic weights of memory items, realize the hierarchical evolution of short-term memory (STM), medium-term memory (MTM), and long-term memory (LTM).

[0086] In this embodiment of the invention, the agent's memory is divided into three levels: short-term memory, medium-term memory, and long-term memory. Short-term memory mainly stores immediate contextual information, such as real-time data and temporary dialogue content for emergency tasks; medium-term memory records the execution process of phased tasks, such as multiple equipment maintenance records or multiple security incident handling logs within a week; long-term memory, after summarization and semantic compression, is stored as reusable knowledge patterns and strategic experiences across scenarios. This hierarchical storage structure ensures that knowledge at different time scales can be reasonably preserved and retrieved, avoiding the problems of "either being forgotten too quickly or having redundant storage" in existing technologies.

[0087] refer to Figure 2 As shown, the rules of hierarchical evolution mainly include promotion rules and elimination rules.

[0088] Promotion rules include:

[0089] If the dynamic weight W of the memory entry i If the value is greater than the first threshold T1, the corresponding memory item is promoted from short-term memory to medium-term memory; if the dynamic weight W of the memory item is... i If the value is greater than the second threshold T2, the corresponding memory item is promoted from intermediate memory to long-term memory; where T2>T1.

[0090] Specifically, it is expressed as follows:

[0091] If W i T1: STM → MTM;

[0092] If W i T2: MTM → LTM.

[0093] The elimination rules include:

[0094] If the dynamic weight W of the memory entry i Less than the minimum threshold T min If no update is made within a preset time, the corresponding memory entry will be deleted.

[0095] Specifically, it is expressed as follows:

[0096] If W i <T min Or if there has been no update for a long time → delete.

[0097] Wherein, the first threshold T1, the second threshold T2, and the minimum threshold T min It can be adjusted according to the application scenario.

[0098] When a certain type of task occurs frequently within a short period, its related memory entries will gradually upgrade from short-term memory to medium-term memory. If they continue to occur and undergo semantic abstraction, they will be deposited into long-term memory, forming a reusable knowledge pattern. Simultaneously, for long-term memory entries that have not been accessed for a long time and have low weight, this invention cleans them up through compression or elimination mechanisms, thereby maintaining the efficiency and compactness of the memory system. This hierarchical evolution mechanism enables the agent to possess a human-like ability of "forgetting and retention," simulating the process of "short-term memory" evolving into "long-term memory" in the human brain, ensuring that the system does not affect retrieval efficiency due to redundant memory.

[0099] S5. For multimodal task data, establish a unified embedding and indexing mechanism and store it in the same memory knowledge graph.

[0100] To address the multimodal task data of smart city operations, this invention designs a unified embedding and indexing mechanism. By combining vectorization with graph databases, a unified graph-vector hybrid index is established and stored in a memory knowledge graph, enabling agents to access relevant memories across modalities during retrieval. For example, in a fire scenario, the agent can not only retrieve historical fire text reports but also simultaneously access current sensor alarm data and surveillance video clips. Compared to existing technologies that "store different modal data in a scattered manner and cannot be accessed uniformly," this mechanism significantly improves the completeness of memory retrieval and the accuracy of decision-making in task scenarios.

[0101] S6. The system scores based on a combination of semantic similarity, dynamic weights, and knowledge graph centrality, and then performs memory retrieval and ranking based on the scoring results.

[0102] like Figure 3 As shown in the embodiment of the present invention, a comprehensive score is calculated based on semantic similarity, dynamic weight, and knowledge graph centrality, as follows:

[0103]

[0104] Among them, Score i It is the i-th memory entry m i The rating, Sim semantic (q,m i ) represents the query task q and the i-th memory entry m i semantic similarity, W i Represents memory entry m i Dynamic weights, Centrality(m i ) represents the memory entry m iThe centrality in a knowledge graph is called knowledge graph centrality; a, b, and c are the weight parameters of semantic similarity, dynamic weight, and knowledge graph centrality, respectively.

[0105] The above scoring results achieved a comprehensive ranking based on "relevance, importance, and representativeness," which improved the hit rate, timeliness, and accuracy of emergency response and operation and maintenance decisions.

[0106] Furthermore, the method also includes:

[0107] Design a standardized interface (API) for automatically parsing task semantics and calling the most relevant memory entries based on semantic similarity, dynamic weights, and knowledge graph centrality.

[0108] To ensure the feasibility of the technical solution, this invention designs standardized interfaces (APIs) for typical applications such as smart city operation management platforms, emergency command systems, and building equipment operation and maintenance platforms. These interfaces can automatically parse task semantics and call the most relevant memory entries according to task type and hierarchical mechanism. Taking fire emergency as an example, when the system detects a "high-rise building fire alarm" event, the interface will prioritize retrieving long-term memories related to "fire handling" (such as best practice procedures), while combining medium-term memories of recent fires in the same area with real-time short-term data to form a comprehensive handling plan. This mechanism ensures that the agent can not only react quickly but also draw on past experience, improving the scientific nature of emergency decision-making.

[0109] A specific implementation scheme provided by this invention is as follows:

[0110] 1. System Environment Configuration

[0111] The method of this invention can be implemented in common software environments, such as using the Python language, combined with deep learning frameworks (such as TensorFlow or PyTorch), and storing and retrieving memory entries through graph databases (such as Neo4j) or vector databases (such as FAISS, Milvus). In a server environment, it can be deployed via Docker containers, supporting distributed scaling.

[0112] 2. Data Structure Design

[0113] Memory entries can use the following JSON data structure:

[0114] {

[0115] 'memory_id': UUID,

[0116] 'task_type': string,

[0117] 'content': string or multimodal data path,

[0118] 'timestamp': datetime,

[0119] 'frequency': int,

[0120] 'weight': float,

[0121] 'layer': STM / MTM / LTM

[0122] }

[0123] Where frequency represents the task trigger frequency, weight represents the calculated dynamic weight, and layer represents the layer to which the memory entry belongs.

[0124] 3. Algorithm Pseudocode

[0125] def update_memory(task):

[0126] lam = estimate_lambda(task.type)

[0127] dt = now() - task.timestamp

[0128] weight = lam exp(-beta[task.type) dt) (1+gamma task.S) (1+delta task.R) (1+eta task.A)

[0129] update_layer(task, weight)

[0130] save(task, weight)

[0131] def retrieve(query):

[0132] cands = index.search(query)

[0133] scores = {m: alpha semantic_sim(query,m)

[0134] + beta m.weight

[0135] + zeta graph_centrality(m) for m in cands}

[0136] return topk(scores, k=20)

[0137] Compared with existing technologies, this invention achieves hierarchical evolution and layered management of short-term, medium-term, and long-term memory through a dynamic weighting mechanism that combines task intensity factors, time decay factors, and industry key factors. This makes the intelligent agent more in line with human forgetting and memory habits, ensuring the rationality and efficiency of the agent's memory retrieval. Through multimodal data fusion, it improves the integrity of memory retrieval and the accuracy of decision-making in complex task scenarios. Through a joint ranking mechanism of semantic similarity, dynamic weights, and knowledge graph centrality, it enhances the hit rate, timeliness, and accuracy of emergency response and operation and maintenance decisions. Through industry interface adaptation, it enhances the feasibility and promotional value of the solution in smart cities and operation and maintenance management.

[0138] Accordingly, embodiments of the present invention also provide a hierarchical urban operation intelligent agent memory management system. Figure 4 This is a structural block diagram illustrating a hierarchical urban operation intelligent agent memory management system according to an exemplary embodiment. For example... Figure 4 As shown, the system includes:

[0139] The task flow acquisition module is used to collect multimodal task data for smart city operation;

[0140] The task intensity estimation module is used to estimate the occurrence intensity of multimodal task data in the time dimension to obtain the task intensity factor;

[0141] The weight calculation module is used to calculate the dynamic weight of memory entries by combining task intensity factor, time decay factor and industry key factor.

[0142] The hierarchical memory management module is used to realize the hierarchical evolution of short-term memory, medium-term memory and long-term memory based on the dynamic weight of memory items;

[0143] The multimodal indexing module is used to establish a unified embedding and indexing mechanism for multimodal task data and store it in the same memory knowledge graph;

[0144] The retrieval and ranking module is used to score based on semantic similarity, dynamic weights, and knowledge graph centrality, and then perform memory retrieval and ranking based on the scoring results.

[0145] For ease of explanation, Figure 4 Only the main components of the system are shown. The system of this embodiment can be used to perform... Figure 1 The technical solutions of the method embodiments shown are similar in principle and in effect, and will not be described again here.

[0146] In an exemplary embodiment, the present invention also provides an electronic device, the electronic device comprising:

[0147] processor;

[0148] The memory stores computer-readable instructions, which, when loaded and executed by the processor, implement the steps of the hierarchical city operation intelligent agent memory management method described above.

[0149] like Figure 5 As shown, the electronic device may include a processor and a memory. Optionally, it may also include a transceiver. The processor, memory, and transceiver may be connected via a communication bus. The memory stores computer-readable instructions, which, when executed by the processor, implement the steps of the hierarchical city operation intelligent agent memory management method described above.

[0150] In a specific implementation, as one example, a processor may include one or more CPUs. An electronic device may also include multiple processors, each of which may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). Here, a processor may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0151] The memory is used to store the software program that executes the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can be referred to the above method embodiment, which will not be repeated here.

[0152] A transceiver is used to communicate with network devices or with terminal devices. Optionally, a transceiver may include a receiver and a transmitter. The receiver is used to implement the receiving function, and the transmitter is used to implement the sending function.

[0153] Optionally, the transceiver can be integrated with the processor or exist independently and coupled to the processor through the interface circuit of the electronic device. This embodiment of the invention does not specifically limit this.

[0154] It should be noted that, Figure 5The structure of the electronic device shown is not intended to limit the electronic device. Actual electronic devices may include more or fewer components than shown, or combine certain components, or have different component arrangements. Furthermore, the technical effects of the electronic device can be referred to the technical effects of the above-described method embodiments, and will not be repeated here.

[0155] In an exemplary embodiment, the present invention also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the steps of the hierarchical city operation intelligent agent memory management method described above. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.

[0156] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0157] The use of terms such as "an embodiment," "an embodiment," "an exemplary embodiment," and "some embodiments" in the specification indicates that the described embodiment may include a specific feature, structure, or characteristic, but not every embodiment necessarily includes that specific feature, structure, or characteristic. Furthermore, when a specific feature, structure, or characteristic is described in connection with an embodiment, implementing such a feature, structure, or characteristic in conjunction with other embodiments (whether explicitly described or not) should be within the knowledge of those skilled in the art.

[0158] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.

[0159] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.

[0160] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0161] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0162] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0163] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0164] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0165] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.

[0166] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A hierarchical urban operation intelligent agent memory management method, characterized in that, Includes the following steps: S1. Collect multimodal task data for smart city operation; S2. Estimate the occurrence intensity of multimodal task data in the time dimension to obtain the task intensity factor; The task intensity factor I(t) can be calculated using two methods: the sliding window statistical method and the statistical method based on the Hawkes self-excitation process. The sliding window statistical method is calculated as follows: ; in, I win ( t ) is the task intensity factor calculated using the sliding window statistical method. N ( tW , t ) indicates within the time interval [ t- W , t The number of times the task is triggered within the specified range. W The length of the sliding time window; The statistical calculation based on the Hawkes self-excitation process is as follows: ; in, I hawkes ( t The task intensity factor is calculated using a statistical method based on the Hawkes self-excitation process. μ Base trigger strength indicates the background trigger frequency when there are no historical events. t j Indicates the first j The time point when a past task was triggered. α This indicates the trigger strength of each task. β This is the short-term decay coefficient, which controls the rate at which the trigger intensity decreases over time; S3. Combine task intensity factor, time decay factor and industry key factor to calculate the dynamic weight of memory entries; The dynamic weights are calculated as follows: ; in, W i ( t ) indicates the first i A memory entry in t Dynamic weights at time points, I i ( t ) indicates the first i The task intensity of each memory entry Indicates the first i The time decay factor of each memory entry, where... β i It is the first i The long-term decay coefficient of a memory entry. Δt Indicates the first i The time interval since the last trigger of each memory entry. S i Indicates the emergency level factor. R i Indicates risk factors, A i Indicates the SLA urgency factor. γ, δ, η These are the adjustment coefficients for the emergency level factor, risk factor, and SLA urgency factor, respectively. Among them, the emergency response level factor, risk factor, and SLA urgency factor together constitute the key factors of the industry; S4. Based on the dynamic weight of memory items, realize the hierarchical evolution of short-term memory, medium-term memory and long-term memory; The rules of hierarchical evolution include promotion rules and elimination rules; Promotion rules include: If the dynamic weight W of the memory entry i If the value is greater than the first threshold T1, the corresponding memory item is promoted from short-term memory to medium-term memory; if the dynamic weight W of the memory item is... i If the value is greater than the second threshold T2, the corresponding memory item is promoted from intermediate memory to long-term memory; where T2>T1; The elimination rules include: If the dynamic weight W of the memory entry i Less than the minimum threshold T min If no update is made within a preset time, the corresponding memory entry will be deleted. S5. For multimodal task data, establish a unified embedding and indexing mechanism and store it in the same memory knowledge graph; S6. The system scores based on a combination of semantic similarity, dynamic weights, and knowledge graph centrality, and then performs memory retrieval and ranking based on the scoring results.

2. The hierarchical urban operation intelligent agent memory management method according to claim 1, characterized in that, In step S1, the multimodal task data includes work orders, sensor values, monitoring videos, text logs, voice dialogues, and alarm information.

3. The hierarchical urban operation intelligent agent memory management method according to claim 1, characterized in that, In step S5, for multimodal task data, a unified graph-vector hybrid index is established by combining vectorization with a graph database and stored in a memory knowledge graph, so that the agent can call relevant memories across modalities when retrieving data.

4. The hierarchical urban operation intelligent agent memory management method according to claim 1, characterized in that, In step S6, the scoring is calculated by combining semantic similarity, dynamic weight, and knowledge graph centrality as follows: ; in, Score i It is the first i Memory entries m i The rating, Sim semantic ( q,m i ) indicates a query task q With the i Memory entries m i semantic similarity, W i Representing memory entries m i Dynamic weights, Centrality ( m i ) indicates a memory entry m i Centrality in a knowledge graph, i.e., knowledge graph centrality; a , b , c These are the weight parameters for semantic similarity, dynamic weight, and knowledge graph centrality, respectively.

5. The hierarchical urban operation intelligent agent memory management method according to claim 1, characterized in that, The method further includes: Design a standardized interface that automatically parses task semantics and calls the most relevant memory entries based on task type and hierarchical mechanism.

6. A hierarchical urban operation intelligent agent memory management system, the system being used to implement the method as described in any one of claims 1 to 5, characterized in that, The system includes: The task flow acquisition module is used to collect multimodal task data for smart city operation; The task intensity estimation module is used to estimate the occurrence intensity of multimodal task data in the time dimension to obtain the task intensity factor; The weight calculation module is used to calculate the dynamic weight of memory entries by combining task intensity factor, time decay factor and industry key factor. The hierarchical memory management module is used to realize the hierarchical evolution of short-term memory, medium-term memory and long-term memory based on the dynamic weight of memory items; The multimodal indexing module is used to establish a unified embedding and indexing mechanism for multimodal task data and store it in the same memory knowledge graph; The retrieval and ranking module is used to score based on semantic similarity, dynamic weights, and knowledge graph centrality, and then perform memory retrieval and ranking based on the scoring results.

7. An electronic device, characterized in that, The electronic device includes: processor; A memory storing computer-readable instructions that, when loaded and executed by the processor, implement the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Automatic optimization method and system based on intelligent data memory bank

    CN118503390A

  • Large language model long-term memory method based on human cognitive inspiration

    CN120493992A