The invention relates to a generative
artificial intelligence context management technology, and discloses a knowledge tree-based structured memory
system and method, a computer readable storage medium and
electronic equipment. According to the
system, structured memory with a father-son relationship is stored through a knowledge tree, a retrieval strategy is determined according to current input, related nodes or branches are recalled, and a memory context is generated for a model to call after deduplication, truncation,
pruning, hierarchical summarization and priority retention
processing are carried out under context budget constraint; and meanwhile, node addition, deletion, modification and combination, conflict marking,
version management and
cutting control are supported, so that the accuracy, consistency and long-term task stability of generated contents are improved. The knowledge tree construction module is used for acquiring external information and executing node generation, updating, deletion and
branch maintenance, and can write back a knowledge tree after output; when conflicts exist,
version management is executed, and
cutting is carried out according to correlation, credibility, redundancy and the like.