Adaptive method and device of memory unit
By generating offspring memory units through gene crossover and mutation, and updating the memory bank based on adaptability, the problem of memory units being difficult to optimize in diverse application scenarios is solved. This enables online adaptation and continuous optimization of memory units, thereby improving the intelligent decision-making and interaction quality of AI Agents.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LENOVO (BEIJING) LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies lack the ability to continuously improve memory units online, making it difficult to dynamically improve memory quality, especially when facing diverse application scenarios, and are unable to effectively optimize internal structure and performance.
Offspring memory units are generated through gene crossover and mutation, and their adaptability is evaluated. The preset memory bank is updated in response to offspring memory units with high adaptability. The memory units are optimized by combining user feedback and customized information, so as to achieve online adaptation and continuous optimization of the memory bank.
It enables online iteration and continuous optimization of memory units, improving their flexibility and adaptability, enhancing the AI Agent's intelligent decision-making and interactive capabilities in complex scenarios, and reducing manual maintenance costs.
Smart Images

Figure CN121936591A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of adaptive technology for memory cells, and to, but is not limited to, an adaptive method and apparatus for memory cells. Background Technology
[0002] Memory units are virtual modules in artificial intelligence systems used to store and manage character-based content, interaction logs, and behavioral strategies. Their performance directly impacts the system's continuous learning and personalized service capabilities. With the diversification of application scenarios, higher demands are placed on the adaptive capabilities of memory units, requiring continuous optimization of their internal structure and performance based on user feedback.
[0003] Related technologies have explored the use of evolutionary methods, such as genetic algorithms, for parameter optimization or model training. For example, selection-crossover-mutation mechanisms can be used to improve model performance or optimize system resource allocation. Furthermore, some studies have applied evolutionary algorithms to hyperparameter tuning of Long Short-Term Memory (LSTM) networks and dynamic memory management in embedded systems to improve operational efficiency and reduce energy consumption.
[0004] However, existing solutions mostly focus on global model optimization or offline training, lacking the ability to continuously improve memory units online, making it difficult to achieve dynamic improvement in memory quality. Summary of the Invention
[0005] This application provides an adaptive method and device for memory cells.
[0006] The technical solution of this application embodiment is implemented as follows: This application provides an adaptive method for memory cells, comprising: In response to the preset memory bank meeting preset conditions, at least two parent memory units are determined from the preset memory bank; Genetic crossover and mutation are performed on the knowledge genomes contained in at least two parent memory units to generate at least one child memory unit, and the adaptability of at least one child memory unit is evaluated. In response to the existence of a target child memory unit with an adaptability greater than a first preset threshold in at least one child memory unit, the preset memory bank is updated based on the target child memory unit.
[0007] In the above-mentioned adaptive method for memory units, at least two parent memory units include a first parent memory unit and a second parent memory unit; the knowledge genomes included in the at least two parent memory units are subjected to gene crossover and mutation to generate at least one offspring memory unit, including: crossovering the knowledge genomes of the first parent memory unit and the second parent memory unit in segments according to a preset strategy to generate at least one crossover offspring memory unit; modifying and mutating a portion of the genes in the knowledge genome corresponding to the at least one crossover offspring memory unit to obtain at least one mutated offspring memory unit, and identifying it as an offspring memory unit.
[0008] In the aforementioned adaptive method for memory units, the method further includes: in response to a first question, determining at least one first memory unit matching the first question from a preset memory bank; loading at least one first memory unit, and determining corresponding first keyword information from the first memory unit based on the first question to obtain at least one first keyword information; determining a first response result corresponding to the first question based on at least one first keyword information; in response to the first response result not meeting the target conditions, triggering a second question, and determining a final response result corresponding to the first question based on a second memory unit matching the second question in the preset memory bank.
[0009] In the aforementioned adaptive method for memory units, determining the final response result corresponding to the first question based on the second memory unit in the preset memory bank that matches the second question includes: determining at least one second memory unit in the preset memory bank that matches the second question; loading at least one second memory unit and determining corresponding second keyword information based on the second question from the second memory unit to obtain at least one second keyword information; determining the second response result corresponding to the second question based on the at least one second keyword information; and determining the final response result based on the first response result and the second response result in response to the second response result satisfying the target condition.
[0010] In the above-mentioned adaptive method for memory units, the method further includes: for each memory unit in the preset memory bank, deleting the stored memory or conflicting memory items with lower weights and updating the retrieval vector to obtain the corresponding updated memory unit; and updating the preset memory bank based on the updated memory units corresponding to different memory units in the preset memory bank.
[0011] In the above-mentioned adaptive method for memory units, the method further includes: receiving customized information corresponding to the memory unit input by the user; the customized information is the ability to adjust the question answering capability of the memory unit; generating a corresponding customized memory unit based on the customized information, and storing the customized memory unit in a preset memory bank.
[0012] In the above-described adaptive method for memory units, after determining the first response result corresponding to the first question based on at least one first keyword information, the method further includes: for each first memory unit, obtaining the full process record information corresponding to the determination of the first response result based on the first question; for each first memory unit, updating the context vector of the corresponding first memory unit based on the corresponding full process record information to obtain the corresponding updated first memory unit.
[0013] In the above-described adaptive method for memory units, in response to the existence of a target child memory unit with an adaptive degree greater than a preset threshold among multiple child memory units, the preset memory bank is updated based on the target child memory unit, including: identifying the child memory unit with an adaptive degree greater than a first preset threshold among multiple child memory units as the target child memory unit; determining the current adaptive degree of each child memory unit in the preset memory bank, and replacing the child memory unit with a lower current adaptive degree in the preset memory bank using the target child memory unit.
[0014] In the above-mentioned adaptive method for memory units, after determining the current adaptive degree of each child memory unit in the preset memory bank, the method further includes: determining the child memory unit whose current adaptive degree is greater than the second preset threshold as the parent memory unit, and updating the parent memory unit to the preset memory bank; the second preset threshold is higher than the first preset threshold.
[0015] This application provides an adaptive device for memory units, including a processor and an intelligent agent capable of running on the processor. The intelligent agent can invoke at least one processing model deployed in the memory card adaptive device to perform the following operations: in response to a preset memory bank satisfying preset conditions, determining at least two parent memory units from the preset memory bank; performing gene crossover and mutation on the knowledge genomes included in the at least two parent memory units to generate at least one child memory unit, and evaluating the adaptability of the at least one child memory unit; in response to the existence of a target child memory unit with an adaptability greater than a first preset threshold among the at least one child memory unit, updating the preset memory bank based on the target child memory unit.
[0016] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the adaptive method of the memory unit provided in this application when executed by a processor.
[0017] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the adaptive method for the memory unit provided in this application. Attached Figure Description
[0018] Figure 1This is a flowchart illustrating an adaptive method for a memory unit provided in an embodiment of this application; Figure 2 This is a flowchart illustrating an exemplary adaptive method for a memory unit provided in an embodiment of this application. Figure 1 ; Figure 3 This is a schematic diagram of an apparatus for performing an exemplary adaptive method for a memory unit, provided in an embodiment of this application. Figure 4 This is a schematic diagram illustrating an exemplary information interaction provided in an embodiment of this application; Figure 5 This is a flowchart illustrating an exemplary adaptive method for a memory unit provided in an embodiment of this application. Figure 2 ; Figure 6 This is a schematic diagram of the structure of an exemplary adaptive device for a memory unit provided in an embodiment of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely for explaining the relevant application and not for limiting the application. All other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.
[0020] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit the application. It should also be noted that, for ease of description, only the parts relevant to the application are shown in the accompanying drawings.
[0021] This application provides an adaptive method for memory units, such as... Figure 1 As shown, the process includes the following steps S101 to S103: Step S101: In response to the preset memory bank meeting the preset conditions, at least two parent memory units are determined from the preset memory bank.
[0022] In the embodiments of this application, the preset memory bank refers to the collection of currently available memory units. The preset memory bank includes multiple memory units, each of which is encapsulated in JSON or binary structure, including: memory genome, role system prompt, historical interaction record, vector memory, action policy, instruction policy, periodic cleanup rule, version, fingerprint, etc.
[0023] In the embodiments of this application, the preset conditions can be update conditions set for a preset memory bank. For example, the preset conditions can be that a pre-set periodic update time has been reached, or that the currently included memory units cannot meet the user's needs. The preset conditions can be set based on actual needs and application scenarios, and this application does not limit this.
[0024] In the embodiments of this application, a preset memory bank stores child memory units and parent memory units, and the child memory units can be memory units obtained by adaptive evolution of the parent units.
[0025] In the embodiments of this application, if the preset memory bank meets the preset conditions, the adaptive device of the memory unit will trigger a selection mechanism to select at least the parent memory unit from the preset memory bank for subsequent gene crossover and mutation operations.
[0026] In the embodiments of this application, the preset memory bank provides personalized and adaptive memory modules for the AI Agent (artificial intelligence agent). For example, if the current preset memory bank cannot meet the user's needs, such as the user's recent questions all being about selling medicine, but the preset memory bank does not contain any memory units corresponding to selling medicine, then at least two memory units determined from the preset memory bank can be memory units corresponding to selling medicine and memory units corresponding to medicine.
[0027] In the embodiments of this application, if a preset memory bank is set to be updated periodically, at least two parent memory units can be randomly selected from the preset memory bank, or the memory units can be selected based on the usage frequency of the memory units in the preset memory bank. For example, at least two memory units with high usage frequency can be selected.
[0028] Step S102: Perform gene crossover and mutation on the knowledge genomes included in at least two parent memory units to generate at least one offspring memory unit, and evaluate the adaptability of at least one offspring memory unit.
[0029] In the embodiments of this application, the knowledge genome refers to the set of core fields in a memory unit used to represent knowledge structure and behavioral strategies. The knowledge genome includes skill tags, behavioral rules, interaction strategies, etc., and is the basic unit of the memory unit in genetic operations.
[0030] In embodiments of this application, the knowledge genomes of at least two parent memory units are subjected to gene crossover and mutation through structured fields (such as skill tags and behavioral rules) to obtain at least one child memory unit. Exemplarily, gene crossover refers to performing gene crossover on the knowledge genomes of two parent memory units, simulating biological genetic mechanisms to generate new child memory units. Gene mutation involves randomly modifying certain gene segments of the child memory unit after crossover to introduce diversity and avoid getting trapped in local optima.
[0031] For example, two parent memory units may be good at math teaching and language expression respectively. Offspring memory units generated through cross generation may combine the advantages of both math teaching and language expression. Genetic mutations may allow offspring memory units to incorporate new teaching methods or personalized feedback.
[0032] For example, if at least two parent memory units include a sales memory unit and a medical memory unit, a sales-medical corresponding memory unit is generated through crossover and mutation, or multiple sales-medical corresponding memory units are generated.
[0033] In the embodiments of this application, at least two parent memory units can be combined in pairs to generate any number of child memory units, or a fixed number of child memory units. For example, the at least two parent memory units can be parent memory unit 1, parent memory unit 2, and parent memory unit 3. Parent memory unit 1 and parent memory unit 2 can generate 3 child memory units, parent memory unit 1 and parent memory unit 3 can generate 2 child memory units, and parent memory unit 2 and parent memory unit 3 can generate 6 child memory units.
[0034] In the embodiments of this application, adaptability is a quantitative evaluation index of the performance of a memory unit in a real-world usage scenario, typically calculated based on factors such as user feedback, response quality, and instruction execution success rate. For example, adaptability can be a weighted average of indicators such as user satisfaction rating, problem resolution rate, and response accuracy. Evaluating the adaptability of the child memory unit helps determine whether it has a higher survival probability and provides a basis for subsequent update operations.
[0035] In the embodiments of this application, after generating several child memory units, usage data of these children in a real environment is collected, and the adaptability of each child memory unit is calculated by combining an automatic evaluation model and a user feedback mechanism.
[0036] Step S103: In response to the existence of a target child memory unit with an adaptability greater than a first preset threshold in at least one child memory unit, update the preset memory bank based on the target child memory unit.
[0037] In the embodiments of this application, the first preset threshold is a benchmark value set according to requirements, used to judge the quality of the child memory unit. If the adaptability of a certain child memory unit exceeds the first preset threshold, the child memory unit is considered to have high practical value, and the memory unit's adaptive device will take the child memory unit as the target child memory unit and update the preset memory bank based on the target child memory unit.
[0038] For example, if the number of at least 6 child memory units generated is 6, two of them are selected as target memory units. The probability of selecting them as target memory units is determined by formula (1): (1); in, The degree of adaptability of the child memory unit, where N is the number of at least one child memory unit. The probability of selecting a child memory unit as the target memory unit. Knowing the probability of each child memory unit being selected as the target memory unit from at least one child memory unit, if two child memory units are selected, then the first preset threshold can be a value greater than the probability corresponding to the third child memory unit. If the adaptability of a certain child memory unit is higher than the set first preset threshold, then the adaptability of that child is marked as the target child memory unit.
[0039] In the embodiments of this application, the update method may be to replace the child memory unit in the preset memory bank or to add the target child memory unit as a child memory unit to the preset memory bank. The update method can be set based on actual needs and application scenarios, and this application does not limit it.
[0040] In the embodiments of this application, the adaptive method of the memory unit ensures that the preset memory bank always contains individuals with better performance, enabling online iteration and continuous optimization of the memory unit. By introducing an adaptive evaluation mechanism, the adaptive method of the memory unit uses real user feedback to dynamically adjust the content and strategy of the memory unit, thereby improving the overall service quality and user experience.
[0041] Thus, the adaptive method of memory units enables the automatic evolution of memory units. This method optimizes and updates memory content without human intervention. Through gene crossover and mutation operations, the adaptive method can explore new possibilities while preserving superior characteristics, enhancing the flexibility and adaptability of memory units. Ultimately, the continuous emergence and updating of high-quality offspring memory units significantly improves overall memory capacity, allowing the adaptive method to better support AI agents in intelligent decision-making and interactive behaviors in complex scenarios.
[0042] In some embodiments, at least two parent memory units include a first parent memory unit and a second parent memory unit. When the adaptive device of the memory unit performs the above step S102 of "performing gene crossover and mutation on the knowledge genomes included in at least two parent memory units to generate at least one offspring memory unit", it may also perform the following steps S201 and S202: Step S201: The knowledge genomes of the first parent memory unit and the second parent memory unit are segmented and cross-crossed according to a preset strategy to generate at least one cross-crossed offspring memory unit.
[0043] In the embodiments of this application, the preset strategy refers to the crossover rules set according to the field type, importance, and optimization goal of the memory unit. For example, for string-type gene fragments, crossover can be performed by splicing or random segment selection; for numerical parameters, methods such as intermediate recombination or arithmetic averaging can be used. The design of the preset strategy ensures the controllability and effectiveness of the crossover process.
[0044] In embodiments of this application, a crossover offspring memory unit is a new unit composed of the knowledge genomes of two parent memory units, and the crossover offspring memory unit inherits some characteristics of the two parent memory units. Exemplarily, real-valued knowledge genome vector attributes are crossed, and the crossover offspring memory unit includes offspring genes. The expression is shown in formula (2): (2); in, It is the knowledge genome of the first parental memory unit. It is the knowledge genome of the second parental memory unit. It is a random number (see percentage below).
[0045] For example, a crossover offspring memory unit can be generated by selecting the first 20% of the knowledge genome in the first parent memory unit and the last 80% of the knowledge genome in the second parent memory unit; or, a crossover offspring memory unit can be generated by selecting the first 50% of the knowledge genome in the first parent memory unit and the last 50% of the knowledge genome in the second parent memory unit; or, a crossover offspring memory unit can be generated by selecting the middle 50% of the knowledge genome in the first parent memory unit and the first 25% and last 25% of the knowledge genome in the second parent memory unit. In this way, at least one crossover offspring memory unit can be obtained.
[0046] In this way, the advantageous attributes of different memory units can be automatically combined without relying on human intervention, providing diverse candidate individuals for subsequent mutation and evaluation, thereby improving the overall optimization efficiency and result quality.
[0047] Step S202: Modify and mutate a portion of the genes in the knowledge genome corresponding to at least one crossover progeny memory unit to obtain at least one mutant progeny memory unit, and identify it as a progeny memory unit.
[0048] In the embodiments of this application, mutation is a process of further adjusting the memory units of offspring after crossover. The algorithm usually randomly modifies gene segments in certain knowledge genomes with a certain probability, thereby introducing new characteristics and diversity. The purpose of this is to prevent the population from getting stuck in local optima and to enhance the algorithm's ability to explore new solutions.
[0049] In the embodiments of this application, "partial genes" refers to specific fields in the knowledge genome that are randomly selected for mutation. For example, these could be the weight value of a behavioral strategy, the keyword matching pattern of a dialogue response, etc. The selection of specific fields for mutation in the knowledge genome can be based on the importance score of the knowledge genome or a random mechanism. Modification methods for specific fields include, but are not limited to, numerical perturbation, field replacement, and structural rearrangement.
[0050] For example, Gaussian perturbation mutations are often used for real-valued genes; for example, mutations in the knowledge genome of offspring memory units are used. This can be expressed as formula (3): (3); in, The knowledge genome in the memory units of mutant offspring. The knowledge genome included in the crossover offspring memory unit. As variables, It is a random number.
[0051] In the embodiments of this application, the mutated offspring memory unit is the product of mutation operation based on the crossover offspring memory unit, possessing higher uncertainty and innovativeness. In practical applications, mutation operation helps to discover potentially excellent configurations that were not previously considered, and it can drive the continuous evolution of memory units. Ultimately, all offspring memory units generated through crossover and mutation will be used as the objects of the next round of fitness evaluation. Through a comprehensive evaluation of these offspring memory units, the optimal memory module can be selected and used to update the original version, achieving the goal of online self-evolution.
[0052] For example, if at least two parent memory units include a sales memory unit and a medical memory unit, 50 percent of the knowledge genome from the sales memory unit and 50 percent of the knowledge genome from the medical memory unit can be cross-crossed, and a portion of the knowledge genome can be randomly altered to obtain a mutant offspring memory unit from the sales and medical memory units.
[0053] In this way, through the above-mentioned crossover and mutation operations, it can be ensured that the offspring memory units retain the advantages of the parent generation while introducing new change factors, thereby improving the diversity and adaptability of memory units and enabling continuous self-evolution optimization.
[0054] In some embodiments, when performing step S103 above, the adaptive device of the memory cell may also perform the following steps: determine the current adaptability of each child memory cell in the preset memory bank, and replace the child memory cell with a lower current adaptability in the preset memory bank using the target child memory cell.
[0055] In the embodiments of this application, the current adaptability refers to the current adaptability score of the child memory units in the preset memory bank, reflecting their performance level at the current stage. By comparing the adaptability of the target child memory unit with the current adaptability of each child memory unit in the preset memory bank, it is possible to identify which child memory units are no longer suitable for the current use case, and replace the target child memory unit with these low-adaptability child memory units.
[0056] In the embodiments of this application, the fitness of a memory unit is comprehensively evaluated across all child memory units in a preset memory bank. The current fitness of each child memory unit is recorded and sorted according to its fitness. Subsequently, the target child memory unit is compared with lower-ranked, less fit child memory units. If the fitness of the target child memory unit is higher than that of the lower-ranked units, a replacement operation is performed. This replacement process enables online iterative updates of child memory units, thereby continuously optimizing performance without service interruption.
[0057] Furthermore, to prevent the accidental deletion of highly adaptive child memory units, an elite strategy can be introduced. The elite strategy aims to retain a certain number of highly adaptive child memory units that are not replaced, thereby preventing the loss of these units. For example, the elite strategy is illustrated in formula (4): (4); in, The number of at least one child memory unit generated. The number of elites retained for each generation.
[0058] In the embodiments of this application, the expected number of individuals remaining in the tth generation of a certain excellent memory gene H can also be predicted, as exemplarily seen in formula (5): (5); in, These are preset parameters. Let be the expected number of individuals remaining in generation t+1. To preset the average adaptability of the child memory units in the memory bank, It is the current degree of adaptability. The crossover probability involved in formula (2) above, The mutation probability in formula (3) above, Let be the expected number of individuals remaining in generation t. It is the factorial of H.
[0059] In this way, by identifying individuals with adaptability higher than the first preset threshold in the offspring memory units as target offspring memory units, and replacing offspring memory units with lower adaptability in the preset memory bank with individuals with adaptability higher than the first preset threshold, it is possible to effectively realize the online self-evolution and continuous optimization of offspring memory units, further improve the personalization capabilities and interaction quality of the AI dialogue system, better meet user needs, and reduce manual maintenance costs.
[0060] In some embodiments, after performing the above step "determining the current adaptability of each child memory unit in the preset memory bank", the adaptive device of the memory unit may also perform the following steps: determining the child memory unit with the current adaptability greater than the second preset threshold as the parent memory unit, and updating the parent memory unit to the preset memory bank; the second preset threshold is higher than the first preset threshold.
[0061] In an embodiment of this application, when the current adaptability of a child memory unit exceeds a set second preset threshold, the evaluation results indicate that the child memory unit has a performance superior to the general level and is qualified to be selected as the basis for the next generation of optimization. Therefore, the child memory unit is determined as the parent memory unit and updated into the preset memory bank for use by subsequent genetic operations such as crossover and mutation.
[0062] In the embodiments of this application, the second preset threshold is a threshold used to screen high-quality offspring memory units, and is usually set higher than the first preset threshold. This is because the first preset threshold may only be used to determine whether to retain a certain offspring memory unit in the next iteration, while the second preset threshold is used to more rigorously screen out outstanding offspring memory units to participate in subsequent gene combination and evolution as true parent memory units.
[0063] Thus, by introducing a screening mechanism based on two different preset thresholds, it is possible to more accurately identify offspring memory units with high adaptability, thereby improving the overall quality of the memory bank and enabling continuous online optimization and personalized improvement of memory units.
[0064] like Figure 2 As shown, the implementation of the adaptive method for the memory cell can include the following steps S21 to S210: Step S21: Initialize the memory cell population.
[0065] Here, several memory units that are frequently used and have received positive user feedback in the current environment are collected as the initial population (parent pool) (corresponding to the preset memory bank mentioned above).
[0066] Step S22: Parent selection.
[0067] Here, two memory units can be randomly selected from the initial population.
[0068] Step S23: Gene crossover generates offspring.
[0069] Here, the knowledge genome fields of the two selected memory units are segmented and cross-generated into offspring units according to a certain strategy.
[0070] Step S24, gene mutation.
[0071] Here, some genes (such as skill tags and strategy parameters) in the offspring units generated by crossover are randomly modified with a small probability to introduce diversity and new features.
[0072] Step S25: Deploy test offspring and collect fitness.
[0073] Here, child units are deployed to simulate dialogues or real user interactions, and indicators such as user satisfaction and command accuracy are collected to calculate the overall fitness.
[0074] Step S26: Is the fitness level high enough?
[0075] Here, if the fitness (corresponding to the adaptive fitness mentioned above) is high enough (corresponding to being greater than the first preset threshold mentioned above), step S27 is executed; if the fitness is not high enough, step S28 is executed.
[0076] Step S27: Replace the memory cell library.
[0077] Here, the high-fitness memory units are replaced with the value memory unit library (corresponding to the preset memory library mentioned above).
[0078] Step S28: Discard offspring.
[0079] If the adaptability is not high enough, it will be discarded directly.
[0080] Step S29: Has the iteration termination condition been met?
[0081] Here, if the iteration termination condition is met, step S210 is executed; if the iteration termination condition is not met, step S22 is executed. The iteration termination condition is to determine whether it is an elite offspring, that is, whether the final intermediate state has reached the expected value (which can be determined using the above formula (5)), or whether the current adaptability is greater than the second preset threshold, in which case it can be determined as a parent memory unit, and will not be covered by the memory unit of the intermediate state in the future.
[0082] Step S210: Output the optimal memory unit.
[0083] Here, if the iteration termination condition is met, the optimal memory unit is output.
[0084] This mechanism uses a real-time feedback loop to enable memory cells to adapt to the environment and user needs, continuously improving performance without human intervention.
[0085] like Figure 3As shown, the above steps can be executed by the optimization device 3 (corresponding to the adaptive device of the memory unit mentioned above) MemoryUnit Registry 31, Genetic Engine 32, Evaluator / Feedback Collection 33, and Update Module 34. The data flow is exemplarily indicated by the arrows in the figure. The memory unit registry stores the memory unit and its memory_genome, and may also include version, fingerprint, instruction policy, etc.; the Genetic Engine performs selection, crossover, and mutation operations (supporting reading the population and executing Genetic Algorithm (GA) operations); the Evaluator collects feedback data through online interaction or simulated dialogue (or uses an automatic scoring mechanism); the Update Module selects high-scoring offspring and updates the unit library (writing excellent offspring back to the unit library and managing versioning). This enables automatic online optimization and continuous evolution of Memory units, providing AI Agents with personalized and adaptive memory modules, significantly improving dialogue quality and user experience. In other words, by defining a "knowledge genome" (memory_genome) for each Memory unit, and using the process of "selection-crossover-mutation-fitness evaluation-replacement / update", the memory modules can be automatically optimized and evolved based on user interaction feedback in real-world usage scenarios.
[0086] Exemplary advantages include: 1. Adaptive optimization for memory structure: Compared to traditional biological concepts used for model parameters or hardware design, the adaptive method of memory units in this application is specifically designed for the "knowledge genome" of virtual memory units. Through structured fields (such as skill tags and behavioral rules), gene crossover and mutation are performed to more accurately improve the memory module; 2. Online self-evolution and real feedback-driven: Instead of relying on offline training or manual updates, a fitness function is constructed through online user interaction evaluation (such as dialogue quality and satisfaction rating) to achieve continuous optimization, and the memory module can truly adapt to user needs; 3. Modular replacement and iterative update mechanism: High-quality offspring can automatically replace the original memory unit version, supporting version management and rollback, forming a continuous evolutionary ecosystem; while existing GA (Genetic Algorithm) applications do not involve the memory module update process; Improved dialogue quality and personalized effects: After genetic optimization, the memory unit has significant improvements in key interaction performance, content relevance, and response efficiency, improving user experience and reducing manual maintenance costs.
[0087] In some embodiments, the adaptive device for the memory cell may further perform the following steps S301 to S304: Step S301: In response to the first question, determine at least one first memory cell that matches the first question from the preset memory bank.
[0088] In the embodiments of this application, the preset memory bank is a database that stores multiple memory units. The multiple memory units can be divided into multiple independent modules, and each module corresponds to a specific role, that is, memory isolation between roles is achieved in the preset memory bank.
[0089] In embodiments of this application, when a user raises a first question, the adaptive device of the memory unit determines at least one first memory unit corresponding to the first question in a preset memory bank. For example, if the first question relates to the role of sales, the memory unit determined by the adaptive device of the memory unit may include the memory unit corresponding to sales; if the first question relates to the role of medical sales, the memory unit determined by the adaptive device of the memory unit may be both the memory unit corresponding to sales and the memory unit corresponding to medical sales, or it may be a single memory unit corresponding to medical sales.
[0090] Step S302: Load at least one first memory unit, and determine the corresponding first keyword information from the first memory unit based on the first question to obtain at least one first keyword information.
[0091] In the embodiments of this application, loading the first memory unit refers to reading the matched first memory unit from the database into memory for further processing. For example, if the first memory unit is a sales memory unit, the process of loading the memory unit corresponding to the sales unit is as follows: calling MemoryManager.load(unit_sales); the download module, after fingerprint verification, loads the memory_store memory unit, initializes the context_vector, and sets role prompts and behavior policies. Here, MemoryManager is the memory manager, serving as the core scheduling module, providing runtime loading, unloading, switching, and parallel collaboration interfaces to implement the lifecycle management of memory units, including local storage, downloading, verification, initialization, and state maintenance.
[0092] For example, if a user asks how to set up a network connection, keywords such as network configuration, router settings, and IP address allocation might be extracted from the matching first memory unit. These keywords not only reflect the core content of the first memory unit but also provide the basic material for generating the next step of the response.
[0093] In the embodiments of this application, there is a direct association between the first keyword information and the first memory unit. Each first keyword information is extracted from the corresponding first memory unit. The first keyword information is used to reflect the core content of the first memory unit and its applicable scenarios, thereby providing key support for generating a response.
[0094] In the embodiments of this application, if at least one first memory unit is two first memory units, such as sales and law, in the process of determining the corresponding first keyword information based on the first question from the first memory units respectively, and obtaining at least one first keyword information, role switching will be involved. An exemplary switching method is as follows: after the above process of loading the memory unit corresponding to sales, MemoryManager calls unload() to save the current state; then calls load() to load the other unit (the memory unit corresponding to law), so as to achieve memory isolation and not interrupt the Large Language Model (LLM) service.
[0095] Step S303: Based on at least one first keyword information, determine the first answer result corresponding to the first question.
[0096] In the embodiments of this application, after obtaining multiple first keyword information, the multiple first keyword information and context information are combined to generate a first response result.
[0097] For example, a user can attach multiple units simultaneously (such as sales + legal). MemoryManager manages multiple context_vectors and prompts. LLM generates coordinated output by calling compound prompts in a unified scheduling order. The context_vector is a context vector managed by the Embedding embedding vector module, which performs context embedding and querying based on a vector database (such as Faiss, Chroma, etc.). The context_vector is updated with each interaction to maintain memory retrieval. The prompt is dynamically injected by the PromptManager with the role_prompt and action_policy of the current unit, driving the model's behavior.
[0098] Step S304: In response to the first answer result not meeting the target conditions, a second question is triggered, and the final answer result corresponding to the first question is determined based on the second memory unit in the preset memory bank that matches the second question.
[0099] In the embodiments of this application, if the generated first response fails to meet certain target conditions (such as user dissatisfaction, incomplete answer, or failure to meet the needs of the current scenario), the adaptive device of the memory unit will trigger a second question, which is a further refinement or expansion of the first question. For example, if the user is dissatisfied with the answer regarding how to set up a network connection, a sub-question may be triggered, such as whether a static IP address needs to be set. Then, a second memory unit matching the currently input second question will be searched again from the preset memory bank, and relevant information will be extracted from that memory unit to generate a more accurate final response. By adopting this method, the system's response capability in complex or variable scenarios can be effectively improved, avoiding user dissatisfaction due to an inaccurate initial answer.
[0100] In the embodiments of this application, the second question is a refinement or supplement to the first question. This approach ensures that the final response better reflects the user's actual needs, and the entire process embodies a progressive response mechanism in the face of uncertainty or complexity.
[0101] In some embodiments, the adaptive device for the memory cell may further perform the following steps S401 to S404 when performing the above-described step S304, "determining the final answer result corresponding to the first question based on the second memory cell in the preset memory bank that matches the second question": Step S401: Determine at least one second memory unit from the preset memory bank that matches the second problem.
[0102] In embodiments of this application, determining at least one second memory unit matching the second question from a preset memory bank can be achieved by first determining the role set corresponding to the second question, and then determining the matching second memory unit based on the corresponding role set. The exemplary method of determining the memory unit is consistent with the method of determining the matching first memory unit based on the first question in step S301 described above, and will not be repeated here.
[0103] Step S402: Load at least one second memory unit, and determine the corresponding second keyword information from the second memory unit based on the second question to obtain at least one second keyword information.
[0104] In the embodiments of this application, the second keyword information is a key information fragment extracted from the matched second memory unit, such as core words of the question, entities, intent tags, etc. The aforementioned second keyword information is used to further determine the relevance of the second memory unit to the current question and to assist in generating a more accurate response. For example, in the case where the second question is "How to install Windows 11?", the second keywords may include "installation", "Windows 11", "steps", "drivers", etc.
[0105] In the embodiments of this application, the process of loading at least one second memory unit and determining the corresponding second keyword information based on the second question from these second memory units is consistent with the implementation of step S302 above, and will not be described again here.
[0106] Step S403: Based on at least one second keyword, determine the second response result corresponding to the second question.
[0107] In the embodiments of this application, after obtaining multiple second keyword information, the multiple second keyword information and context information are combined to generate a second response result.
[0108] For example, based on the keywords "installation" and "Windows 11", a standard installation process can be extracted from the second memory unit as a second response result. This process can be combined with a rule engine, machine learning model, or large language model to achieve automated content generation.
[0109] Step S404: In response to the second response result satisfying the target condition, determine the final response result based on the first response result and the second response result.
[0110] In embodiments of this application, target conditions typically include, but are not limited to, the completeness and relevance of the response, a user satisfaction score exceeding a threshold, and compliance with contextual logic. When the second response meets the target conditions, it is incorporated into the comprehensive calculation of the final response. The adaptive device of the memory unit determines the final response based on the first and second response results to improve the overall quality of the response.
[0111] In the embodiments of this application, the final response result determined by analyzing the first response result and the second response result can ensure that the final output response not only has the advantages of intelligent generation, but also inherits the experience of historical high-quality responses, thereby significantly improving user satisfaction and reliability.
[0112] In this way, by introducing a second memory unit in the preset memory bank that matches the second question and the key information of the second memory unit, and combining it with the target conditions for multi-dimensional screening and fusion, the ability to respond to complex questions can be effectively improved, thereby achieving a more intelligent interactive experience, and thus enhancing the level of personalized service and user stickiness.
[0113] In some embodiments, after performing step S303 above, "determining the first answer result corresponding to the first question based on at least one first keyword information," the adaptive device of the memory unit may further perform the following steps S501 to S502: Step S501: For each first memory unit, obtain the full process record information corresponding to the first answer result determined based on the first question.
[0114] In the embodiments of this application, the full-process record information refers to the collection of all interactive data and operation traces involved in generating a certain first response result. The full-process record information includes, but is not limited to: the user-inputted question content, the parsed key elements, the content of the matched first memory unit, the reasoning path, the decision basis, and the final output response text. The full-process record information can be used to trace the generation process and can serve as an important basis for subsequent optimization of the first memory unit.
[0115] In the embodiments of this application, there is a close data association between the recorded information and the first memory unit. Each first memory unit generates a set of recorded information that matches the structure of the first memory unit itself when participating in the generation of a response.
[0116] Step S502: For each first memory unit, based on the corresponding full-process recorded information, update the context vector of the corresponding first memory unit to obtain the corresponding updated first memory unit.
[0117] In the embodiments of this application, a context vector is a mathematical representation of key semantic information in a first memory unit, typically generated by an embedding model. The context vector can capture the semantic features of the content of the first memory unit and reflect the relevance of the content in different contexts.
[0118] In the embodiments of this application, the full-process record information provides a data foundation for updating the context vector. By analyzing the full-process record information, indicators such as the matching degree between the current question and the first memory unit, the response quality, and user feedback can be extracted. These indicators are then converted into adjustment parameters for the context vector, thereby optimizing the expressive power and retrieval efficiency of the first memory unit.
[0119] For example, the process of updating the first memory unit can be: user input → after prompting and context injection, it is uploaded to LLM → LLM outputs the answer; MemoryManager receives and records the question and answer, calls the Embedding module to synchronously update the context vector, and continuously replenishes the memory.
[0120] Thus, by updating the context vector, the semantic expression capability and matching accuracy of the first memory unit can be improved, thereby better meeting the user's personalized needs and further realizing the continuous optimization of the memory module and personalized service functions.
[0121] In some embodiments, the adaptive device for the memory cell may further perform the following steps S601 and S602: Step S601: For each memory unit in the preset memory bank, delete the stored memory or conflicting memory items with lower weights, and update the retrieval vector to obtain the corresponding updated memory unit.
[0122] In the embodiments of this application, memory with lower weight refers to information fragments stored in memory units. These information fragments have low usage frequency, poor user feedback, or weak relevance to the current task scenario. For example, an initial weight value can be set for the stored information fragments. Then, during subsequent use, if the information fragments are verified and receive good user feedback, the corresponding weight value can be increased. If the information fragments are used infrequently, are not verified, or receive poor user feedback, the corresponding weight value can be decreased.
[0123] In the embodiments of this application, conflicting memory items refer to contradictory or inconsistent content existing within the same memory unit. For example, when processing similar questions, if two different answer strategies contradict each other, one of them should be identified as a conflicting item and eliminated (it could be the one with the lower weight). The presence of conflicting memory items reduces the stability and consistency of the memory unit, affecting the final output quality.
[0124] In the embodiments of this application, the retrieval vector refers to the feature vector used by the memory unit when performing a query. After deleting the stored memory items with lower weights, the retrieval vector is updated accordingly to obtain the updated memory unit.
[0125] For example, memory cells can be optimized periodically. The optimization process can be as follows: the OPT module scans all loaded memory cells, cleans up low-weight items according to the update_policy, updates the context_vector, and saves the optimized version. The OPT module is the memory optimization module, which periodically executes the cleaning and optimization rules defined in the update_policy to remove low-value or conflicting memory items.
[0126] Step S602: Update the preset memory bank based on the update memory units corresponding to different memory units in the preset memory bank.
[0127] In the embodiments of this application, after updating each memory unit in the preset memory bank to obtain the updated memory unit, the updated memory units corresponding to different memory units in the preset memory bank can be determined as the preset memory bank to achieve periodic updates.
[0128] In this way, by regularly maintaining the preset memory bank, it can be ensured that the memory units are always kept in the best condition, thereby improving the overall intelligence level and interactive experience of the AI system, and thus promoting the widespread application and continuous evolution of AI Agents in complex scenarios.
[0129] In some embodiments, the adaptive device for the memory cell may further perform the following steps S701 and S702: Step S701: Receive customized information corresponding to the memory unit input by the user; the customized information is the ability to adjust the question answering capability of the memory unit.
[0130] In the embodiments of this application, the adaptive device for the memory unit is equipped with a memory unit customization platform. This platform receives customized information corresponding to the memory unit input by the user. The customized information refers to data input by the user for personalized configuration of the memory unit's behavior and response capabilities. The customized information may include the user's preferred answering style, interaction strategies for specific scenarios, question handling methods, etc.
[0131] In the embodiments of this application, the customized information directly acts on the memory_genome field within the memory unit's internal structure, altering the AI system's response pattern by influencing gene segments (such as skill tags and behavioral strategies) within the memory_genome field. This personalized configuration mechanism, formed by the customized information acting on the memory_genome field, allows each user to highly customize the AI system according to their own needs, rather than relying solely on global optimization or fixed templates.
[0132] In the embodiments of this application, users can provide customized information through graphical interfaces, voice commands, natural language input, and other means.
[0133] Step S702: Based on the customized information, generate the corresponding customized memory unit and store the customized memory unit in the preset memory bank.
[0134] In the embodiments of this application, after receiving the customized information input by the user, the memory cell self-made platform will convert the customized information into operable parameters and use the converted parameters as the basic input for generating new memory cells, so as to finally generate the corresponding customized memory cells.
[0135] In the embodiments of this application, the generated custom memory units undergo simulation testing or real user interaction verification to evaluate their performance. Only custom memory units that meet certain quality standards are formally stored and put into use, thereby ensuring the stability and reliability of the entire system.
[0136] In this way, by introducing customized information, artificial intelligence systems can better meet users' personalized needs.
[0137] like Figure 4 and Figure 5 As shown, an exemplary implementation of an adaptive method for memory units is provided, mainly involving an Agent system 41 and a user terminal 42. The Agent system 41 includes an ecosystem platform interface 411, a Memory Manager 412, an Embedding module 413, a Prompt Manager 414, a Memory Optimization and Cleanup Module (OPT) 415 (including a memory module 4151 and an optimization module 4152), a memory unit library 416 (including at least memory unit 1 and memory unit 2, and may also include memory unit 3, memory unit 4, ..., memory unit N, not shown in the figure), and a model layer 417 (generation module). The user terminal 42 includes a user interface 421.
[0138] like Figure 5 As shown, the implementation process of the adaptive method for executing the memory unit based on the above-mentioned Agent system 41 and user terminal 42 includes the following steps S51 to S515: Step S51: Request to load the sales memory unit.
[0139] Here, before requesting to load the sales memory unit, a Memory unit submission and review process can be performed: users / developers upload unit files to the ecosystem platform, and the review module performs format and security checks before publishing them for loading. Users can select a role (such as "Sales") and call MemoryManager.load(unit_sales).
[0140] Step S52: Download and verify the sales memory unit.
[0141] Here, the download module (included in MemoryManager) sells memory units via fingerprint verification.
[0142] Step S53: Return the cell data.
[0143] Here, the ecosystem platform interface returns the unit data of the sales memory unit.
[0144] Step S54: Inject the context vector.
[0145] Here, MemoryManager injects the context vector into the sales memory unit through the memory module.
[0146] Step S55: Load character prompts.
[0147] Here, MemoryManager loads role-specific prompts and behavior strategies through the prompt module.
[0148] Step S56: Load the memory.
[0149] Here, the memory_store is loaded.
[0150] Step S57: Send input.
[0151] Here, users can enter the question "How to recommend products", and after prompting and context injection, it is uploaded to the LLM (corresponding to the above generation module or model layer).
[0152] Step S58: Generate a response.
[0153] Here, the user inputs a question into the LLM, and the LLM outputs the answer.
[0154] Step S59: Generate intelligent response.
[0155] Here, the generation module generates an agent response and sends it to the MemoryManager.
[0156] Step S510: Output intelligent response.
[0157] Here, MemoryManager outputs the agent response to the user.
[0158] Step S511: Memory embedding update.
[0159] Here, MemoryManager receives and records the questions and answers, calls the Embedding module to synchronously update the context vector, and continuously replenishes the memory.
[0160] Step S512: Scheduled cleanup and optimization.
[0161] Here, the OPT module scans all loaded Memory units, cleans up low-weight items according to the update_policy, updates the context_vector and saves the optimized version; if a new version of the unit is found to be available, it recommends upgrading through the ecosystem platform module.
[0162] Step S513: Switch to the legal memory unit.
[0163] Here, the user triggers a role switch.
[0164] Step S514: Unload the sales memory unit and save the status.
[0165] Here, MemoryManager calls unload() to save the current state.
[0166] Step S515: Load the legal memory unit.
[0167] Here, MemoryManager calls load() to load another unit (the legal memory unit), achieving memory isolation without interrupting the LLM service. Users can attach multiple units simultaneously (such as sales + legal), and MemoryManager manages multiple context_vectors and prompts; LLM generates coordinated output by calling compound prompts in a unified scheduling order.
[0168] In the above embodiments, users can evaluate the download unit and upload self-made unit platform, write descriptions of what specific events are performed, and ECO receives feedback. Based on usage behavior and evaluation, it constructs a recommendation ranking to improve the quality of the ecosystem modules.
[0169] In the above embodiments, memory isolation and dynamic management are implemented: each unit is stored independently in a vector space to ensure that the context does not cross-contaminate after role switching; dynamic loading and smooth service are maintained: unit hot switching is performed through memory operations without restarting or resetting the model state; optimization strategies enhance long-term availability: a periodic cleanup mechanism prevents memory bloat and maintains smoothness and accuracy; ecosystem platform and module sharing: in addition to pre-defined roles, users participate in module production and scoring, forming a closed loop in the module market.
[0170] In the above embodiments, the "pluggable multi-role memory unit" architecture encapsulates the memory module of each role at the software level, thereby achieving strict isolation and dynamic switching of memories between roles, and supporting multi-personality parallel collaboration and ecosystem sharing. Exemplary advantages include: 1. Flexible and efficient role switching: The original static hybrid memory environment is transformed into a modular memory that can be used "plug and play" at runtime, greatly improving the responsiveness of the agent in multi-role scenarios; 2. Clear memory isolation and context management: Different roles have their own independent memory areas, avoiding cross-role memory contamination and improving dialogue consistency and accuracy; 3. Collaborative intelligent output capability: Supports the simultaneous mounting of multiple Memory units, enabling cross-role collaboration, and allowing the agent to solve complex tasks by combining roles; 4. Controllable and continuous optimization of memory quality: Built-in cleaning and optimization mechanisms solve the problems of memory expansion and interference from old information, and combined with feedback data, improve the long-term interaction quality; 5. Ecosystem-wide expansion capability: Users can independently build and share Memory units, forming a modular agent expansion market, promoting ecological innovation and rapid application diffusion; Compared with MemoryOS, which only provides multi-layer memory management and supports memory optimization but does not achieve role isolation and hot switching, this solution has made significant breakthroughs in pluggability, multi-role collaboration, and ecosystem openness.
[0171] This application provides an adaptive method for memory units. The method includes: in response to a preset memory bank meeting preset conditions, determining at least two parent memory units from the preset memory bank; performing gene crossover and mutation on the knowledge genomes included in the at least two parent memory units to generate at least one child memory unit, and evaluating the adaptability of the at least one child memory unit; in response to the existence of a target child memory unit with an adaptability greater than a first preset threshold among the at least one child memory unit, updating the preset memory bank based on the target child memory unit. The adaptive method for memory units provided in this application realizes an automatic evolutionary process for memory units, completing the optimization and updating of memory content. This process does not require human intervention. Through gene crossover and mutation operations, it can explore new possibilities while retaining excellent characteristics, and enhance the flexibility and adaptability of memory units. Ultimately, the continuous emergence and updating of high-quality child memory units significantly improves the overall memory capacity, thereby enabling the adaptive method for memory units to better support the intelligent decision-making and interactive behavior of AI agents in complex scenarios.
[0172] like Figure 6As shown, this application embodiment provides an adaptive device 6 for memory units, including a processor 61 and an intelligent agent capable of running on the processor. The intelligent agent can invoke at least one processing model deployed in the memory card adaptive device 6 to perform the following operations: in response to a preset memory bank satisfying preset conditions, determining at least two parent memory units from the preset memory bank; performing gene crossover and mutation on the knowledge genomes included in the at least two parent memory units to generate at least one child memory unit, and evaluating the adaptability of the at least one child memory unit; in response to the existence of a target child memory unit with an adaptability greater than a first preset threshold among the at least one child memory unit, updating the preset memory bank based on the target child memory unit.
[0173] This application provides a computer-readable storage medium storing one or more computer programs, which can be executed by one or more processors to implement the adaptive method of the memory unit described above. The computer-readable storage medium can be transient or non-transient.
[0174] This application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, it implements some or all of the steps in the adaptive method of the memory unit described above. This computer program product can be implemented specifically through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied as a computer storage medium; in another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.
[0175] In some embodiments, the storage medium may be a computer-readable storage medium, which may be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), solid-state drive (SSD), ferromagnetic random access memory (FRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic surface memory, optical disk, or compact disk-read-only memory (CD-ROM); or it may be various devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0176] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0177] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxesFigure 1 A device that provides the functions specified in one or more boxes.
[0178] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0179] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0180] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0181] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file containing other programs or data, for example, in one or more scripts within a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files storing one or more modules, subroutines, or code sections). As an example, executable instructions may be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0182] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
[0183] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential 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 this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0184] 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, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components may be combined, or integrated into another system, or some features may be ignored or not performed.
[0185] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection discussed above.
Claims
1. An adaptive method for a memory unit, the method comprising: In response to the preset memory bank meeting preset conditions, at least two parent memory units are determined from the preset memory bank; Gene crossover and mutation are performed on the knowledge genomes included in the at least two parent memory units to generate at least one child memory unit, and the adaptability of the at least one child memory unit is evaluated. In response to the existence of a target child memory unit with an adaptability greater than a first preset threshold in at least one child memory unit, the preset memory bank is updated based on the target child memory unit.
2. The adaptive method for memory units according to claim 1, wherein the at least two parent memory units include a first parent memory unit and a second parent memory unit; The step of performing gene crossover and mutation on the knowledge genomes included in the at least two parent memory units to generate at least one child memory unit includes: The knowledge genomes of the first parent memory unit and the second parent memory unit are segmented and cross-crossed according to a preset strategy to generate at least one cross-crossed offspring memory unit; Modify and mutate a portion of the genes in the knowledge genome corresponding to the at least one crossover progeny memory unit to obtain at least one mutant progeny memory unit, and identify it as the progeny memory unit.
3. The adaptive method for memory cells according to claim 1 or 2, the method further comprising: In response to the first question, at least one first memory unit matching the first question is determined from the preset memory bank; Load the at least one first memory unit, and determine the corresponding first keyword information from the first memory unit based on the first question to obtain at least one first keyword information; Based on the at least one first keyword information, determine the first answer result corresponding to the first question; In response to the first answer not meeting the target conditions, a second question is triggered, and the final answer corresponding to the first question is determined based on the second memory unit in the preset memory bank that matches the second question.
4. The adaptive method for memory units according to claim 3, wherein determining the final answer result corresponding to the first question based on the second memory unit in the preset memory bank that matches the second question includes: From the preset memory bank, determine at least one second memory unit that matches the second problem; Load the at least one second memory unit, and determine the corresponding second keyword information from the second memory unit based on the second question to obtain at least one second keyword information; Based on the at least one second keyword information, determine the second answer result corresponding to the second question; In response to the second response result satisfying the target condition, the final response result is determined based on the first response result and the second response result.
5. The adaptive method for a memory cell according to claim 1 or 2, the method further comprising: For each memory unit in the preset memory bank, delete the stored memory or conflicting memory items with lower weights, and update the retrieval vector to obtain the corresponding updated memory unit; The preset memory bank is updated based on the update memory units corresponding to different memory units in the preset memory bank.
6. The adaptive method for a memory cell according to claim 1 or 2, the method further comprising: Receive customized information corresponding to the memory unit input by the user; The customized information refers to the ability to adjust the question-answering capability of the memory unit; Based on the customized information, a corresponding customized memory unit is generated and stored in the preset memory bank.
7. The adaptive method for a memory unit according to claim 3, after determining the first answer result corresponding to the first question based on the at least one first keyword information, the method further includes: For each of the first memory units, obtain the full process record information corresponding to the determination of the first answer result based on the first question; For each of the first memory units, the context vector of the corresponding first memory unit is updated based on the corresponding full-process recording information to obtain the corresponding updated first memory unit.
8. The adaptive method for memory units according to any one of claims 1 to 2 and 7, wherein updating the preset memory bank based on the target child memory unit comprises: Determine the current adaptability of each child memory unit in the preset memory bank, and use the target child memory unit to replace the child memory unit in the preset memory bank with a lower current adaptability.
9. The adaptive method for memory units according to claim 8, wherein after determining the current adaptive degree of each child memory unit in the preset memory bank, the method further includes: The child memory unit whose current adaptability is greater than the second preset threshold is determined as the parent memory unit, and the parent memory unit is updated to the preset memory bank; The second preset threshold is higher than the first preset threshold.
10. An adaptive device for a memory cell, comprising a processor and an intelligent agent capable of running on the processor, the intelligent agent being able to invoke at least one processing model deployed in the memory cell adaptive device to perform the following operations: In response to the preset memory bank meeting preset conditions, at least two parent memory units are determined from the preset memory bank; Gene crossover and mutation are performed on the knowledge genomes included in the at least two parent memory units to generate at least one child memory unit, and the adaptability of the at least one child memory unit is evaluated. In response to the existence of a target child memory unit with an adaptability greater than a first preset threshold in at least one child memory unit, the preset memory bank is updated based on the target child memory unit.