A two-layer dynamic index business memory management method, apparatus, equipment and medium

By employing a two-layer dynamic index management method, a business knowledge tree and a semantic memory graph index are constructed. The retrieval boundaries are updated in conjunction with task feedback, which solves the problem of inconsistent index structures, improves the accuracy and efficiency of business memory retrieval, and enhances dynamic adaptability.

CN123115145APending Publication Date: 2026-11-17BEIJING LINGCHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611413869.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing business memory management methods, there is a lack of linkage updates between index structures, resulting in inconsistencies between index information and business memory data. This leads to low retrieval efficiency as the retrieval scope and data processing volume increase, and makes it difficult to adjust subsequent retrieval processes based on changes in business memory data and task feedback.

Method used

A two-layer dynamic index management method is adopted. By constructing a business knowledge tree index and a semantic memory graph index, an index mapping relationship is established. The memory subgraph and retrieval boundary are updated in combination with task feedback data to realize the targeted association and adaptive adjustment between business requests and the memory subgraph.

Benefits of technology

It improves the accuracy and processing efficiency of business memory retrieval, reduces irrelevant memory traversal, enhances dynamic adaptability, and optimizes resource utilization and retrieval boundary control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115145A_ABST
    Figure CN123115145A_ABST
Patent Text Reader

Abstract

This application relates to a two-layer dynamic index business memory management method, apparatus, device, and medium. The method includes determining the retrieval boundary of a business node based on index mapping relationships and state data of a memory subgraph; obtaining a business request, traversing the business knowledge tree index according to the business request, and determining a target business node from the business nodes; determining a target memory subgraph corresponding to the target business node from the memory subgraph according to the index mapping relationships; retrieving the target memory subgraph within the retrieval boundary of the target business node to obtain the target business memory and retrieval path; processing the business request according to the target business memory to obtain task feedback data; updating the target memory subgraph according to the task feedback data and retrieval path; determining the retrieval boundary adjustment amount according to the state data before and after the target memory subgraph update, and updating the retrieval boundary of the target business node according to the retrieval boundary adjustment amount.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a two-layer dynamic index business memory management method, apparatus, device and medium. Background Technology

[0002] With the development of artificial intelligence technology, business processing systems generate business memory data such as session information, business information, task processing results, and feedback information during operation. In order to retrieve historical information in subsequent business processing, it is necessary to store, retrieve, and update the business memory data.

[0003] Existing business memory management methods typically store business memory data in databases or knowledge bases and retrieve it based on keywords or semantic similarity. As the amount of business memory data increases, the retrieval scope and data processing volume increase accordingly, making it difficult to recall data with low relevance to business requests.

[0004] Furthermore, business memory data changes continuously as business processes unfold. Current technologies lack coordinated updates between different index structures, potentially leading to inconsistencies between index information and business memory data after changes occur. Additionally, existing technologies struggle to adjust subsequent retrieval processes based on changes in business memory data and task feedback. Summary of the Invention

[0005] In order to effectively retrieve and dynamically update business memory data, this application provides a two-layer dynamic index business memory management method, apparatus, device and medium.

[0006] The above-mentioned objective of this application is achieved through the following technical solution:

[0007] A two-layer dynamic index business memory management method, the method comprising:

[0008] Retrieve business memory data;

[0009] Based on the business memory data, a business knowledge tree index containing business nodes and a semantic memory graph index containing memory subgraphs are constructed. An index mapping relationship between the business nodes and the memory subgraphs is established, and the retrieval boundary of the business nodes is determined according to the index mapping relationship and the state data of the memory subgraphs.

[0010] Obtain the business request, traverse the business knowledge tree index according to the business request, and determine the target business node from the business nodes;

[0011] Based on the index mapping relationship, the target memory subgraph corresponding to the target service node is determined from the memory subgraph;

[0012] The target memory subgraph is retrieved within the retrieval boundary of the target service node to obtain the target service memory and retrieval path;

[0013] The business request is processed according to the target business memory to obtain task feedback data;

[0014] Update the target memory subgraph based on the task feedback data and the retrieval path;

[0015] The retrieval boundary adjustment amount is determined based on the state data before and after the target memory subgraph is updated, and the retrieval boundary of the target business node is updated according to the retrieval boundary adjustment amount.

[0016] By adopting the above technical solution, the mapping between the business knowledge tree index and the semantic memory graph index is used to realize the directional association between business requests and memory subgraphs. Combined with task feedback and retrieval path, the memory content and retrieval boundaries are continuously corrected, so that the retrieval scope can be adaptively adjusted according to changes in business status and memory status, reducing irrelevant memory traversal and effective memory omission, and improving the accuracy, processing efficiency and dynamic adaptability of business memory retrieval.

[0017] In a preferred embodiment, this application can be further configured such that: determining the retrieval boundary of the business node based on the index mapping relationship and the state data of the memory subgraph includes:

[0018] Based on the index mapping relationship, determine the memory subgraph corresponding to the business node, and determine the node level of the business node in the business knowledge tree index;

[0019] The subgraph state feature value is determined based on the number of memory nodes, node relationship density, and update frequency in the memory subgraph.

[0020] The retrieval resource allocation value is determined based on the node level and the subgraph state feature value;

[0021] According to the retrieval resource allocation value, allocate graph retrieval resource quotas to the business nodes from the preset total retrieval resources;

[0022] The threshold for the number of accesses to memory nodes and the threshold for the number of extension layers of node relationships are determined based on the resource quota for graph retrieval, and the threshold for the number of accesses to memory nodes and the threshold for the number of extension layers of node relationships are determined as the retrieval boundaries of the business nodes.

[0023] By adopting the above technical solutions, and combining the node hierarchy of business nodes with the size, connection density, and update activity of the memory subgraph to allocate graph retrieval resource quotas, the number of accesses to memory nodes and the number of node relationship expansion layers are matched with the actual retrieval needs. This reduces insufficient retrieval or excessive resource consumption caused by uneven resource allocation, and improves the utilization rate of graph retrieval resources and the efficiency of business memory retrieval.

[0024] In a preferred embodiment, this application can be further configured as follows: retrieving the target memory subgraph within the retrieval boundary of the target service node to obtain the target service memory and retrieval path includes:

[0025] The business request is subjected to feature extraction to obtain request semantic features;

[0026] Based on the requested semantic features, the starting memory node is determined from the memory nodes of the target memory subgraph;

[0027] Starting from the initial memory node, the process expands layer by layer along the node relationships in the target memory subgraph;

[0028] During each layer of expansion, the path expansion value of the candidate memory node is determined based on the degree of matching between the candidate memory node and the semantic features of the request, the degree of association of the node relationship corresponding to the candidate memory node, and the current retrieval boundary occupancy.

[0029] Candidate memory nodes whose path expansion values ​​meet the preset expansion conditions are added to the retrieval path, and the expansion continues layer by layer based on the candidate memory nodes added to the retrieval path until the current retrieval boundary occupancy meets the stopping condition corresponding to the retrieval boundary of the target service node, and the target service memory is determined according to the retrieval path.

[0030] By adopting the above technical solution, the starting memory node is located by request semantic features, and the layer-by-layer expansion process is controlled by combining the degree of semantic matching, the degree of node relationship association and the retrieval boundary occupancy. This makes the retrieval path take into account both content relevance and relationship continuity, reduces the expansion of irrelevant nodes and excessive occupancy of boundary resources, and improves the retrieval accuracy and efficiency of target business memory.

[0031] In a preferred embodiment, this application can be further configured such that updating the target memory subgraph based on the task feedback data and the retrieval path includes:

[0032] Feature extraction is performed on the task feedback data to obtain feedback features, feedback type, and feedback intensity;

[0033] The feedback features are matched with memory nodes in the retrieval path, and memory nodes whose matching degree meets the preset feedback association conditions are determined as feedback associated memory nodes.

[0034] Based on the path position of the memory node and node relationship in the retrieval path relative to the feedback associated memory node and the feedback intensity, the feedback contribution value of the memory node and the node relationship is determined respectively.

[0035] Based on the feedback type and the feedback contribution value, determine the memory weight adjustment amount of the memory node and the relationship weight adjustment amount of the node relationship, respectively.

[0036] Update the target memory subgraph according to the memory weight adjustment amount and the relationship weight adjustment amount.

[0037] By adopting the above technical solution, task feedback is located to relevant memory nodes along the retrieval path, and memory weights and relationship weights are adjusted differently based on path location, feedback intensity, and feedback type. This reduces interference from irrelevant memories, allows the memory subgraph to be continuously corrected based on business processing results, and improves the credibility of memory content and node relationships as well as the accuracy of subsequent business memory retrieval.

[0038] In a preferred embodiment, this application can be further configured as follows: determining the retrieval boundary adjustment amount based on the state data before and after the target memory subgraph update, and updating the retrieval boundary of the target service node according to the retrieval boundary adjustment amount, includes:

[0039] The state data before and after the target memory subgraph is updated are differentially processed to obtain state change data, which includes the state change direction and the state change magnitude.

[0040] The mapping weight between the target business node and the target memory subgraph is determined based on the index mapping relationship;

[0041] The magnitude of the state change is weighted according to the mapping weight to obtain the retrieval boundary adjustment magnitude, and the retrieval boundary adjustment direction is determined according to the direction of the state change.

[0042] The search boundary adjustment amount is determined based on the search boundary adjustment range and the search boundary adjustment direction;

[0043] Update the retrieval boundary of the target business node according to the retrieval boundary adjustment amount.

[0044] By adopting the above technical solution, the state changes of the memory subgraph are converted into directional adjustments of the retrieval boundary according to the mapping weight. This makes the boundary adjustment range match the degree of correlation between the business node and the memory subgraph, reduces the over-adjustment caused by local memory changes, and enables the retrieval range to change dynamically with the memory state, thereby improving the accuracy of retrieval boundary control and the adaptability of business memory retrieval.

[0045] In a preferred embodiment, this application can be further configured such that updating the retrieval boundary of the target service node according to the retrieval boundary adjustment amount includes:

[0046] From the business nodes, determine the superior business node that has a superior relationship with the target business node;

[0047] Based on the index mapping relationship, determine the parent memory subgraph corresponding to the parent business node from the memory subgraph;

[0048] The subgraph correlation degree is determined based on the degree of overlap of business memory data between the superior memory subgraph and the target memory subgraph.

[0049] The boundary propagation adjustment amount is determined based on the retrieval boundary adjustment amount and the subgraph correlation degree;

[0050] When the boundary propagation adjustment amount meets the preset propagation conditions, the retrieval boundary of the superior business node is updated according to the boundary propagation adjustment amount.

[0051] By adopting the above technical solution, the adjustment amount of the retrieval boundary is propagated hierarchically according to the relationship between superior and subordinate business and the degree of association of the memory subgraph. This allows the memory changes of the target business node to be appropriately reflected to the superior business node, while reducing invalid boundary adjustments caused by insufficient association. This improves the synergy of retrieval boundaries between different business levels and the rationality of graph retrieval resource allocation.

[0052] In a preferred embodiment, this application can be further configured such that the method also includes:

[0053] From the business memory data, determine the short-term business memory data that is not written to the semantic memory graph index and corresponds to the business request;

[0054] The short-term business memory data is matched with the retrieval path to obtain the path support.

[0055] The short-term business memory data is matched with the task feedback data to obtain the feedback consistency.

[0056] The strength of memory evidence is determined based on the path support and the feedback consistency.

[0057] When the strength of the memory evidence meets the preset migration conditions, the short-term business memory data is identified as long-term business memory data, and the long-term business memory data is written into the target memory subgraph.

[0058] By adopting the above technical solution, and combining the retrieval path support and task feedback consistency to evaluate the evidence strength of short-term business memory, only short-term business memory that meets the migration conditions is written into the target memory subgraph, reducing the formation of long-term memory from occasional and invalid data, enabling the memory subgraph to continuously absorb new memory with business basis, and improving the reliability of long-term business memory and subsequent retrieval quality.

[0059] The second objective of this invention is achieved through the following technical solution:

[0060] A two-layer dynamic index service memory management device, the two-layer dynamic index service memory management device comprising:

[0061] The data acquisition module is used to acquire business memory data;

[0062] The index building module is used to build a business knowledge tree index containing business nodes and a semantic memory graph index containing memory subgraphs based on the business memory data, establish an index mapping relationship between the business nodes and the memory subgraphs, and determine the retrieval boundary of the business nodes according to the index mapping relationship and the state data of the memory subgraphs.

[0063] The node determination module is used to obtain a business request, traverse the business knowledge tree index according to the business request, and determine the target business node from the business nodes;

[0064] The subgraph determination module is used to determine the target memory subgraph corresponding to the target service node from the memory subgraph according to the index mapping relationship;

[0065] The memory retrieval module is used to retrieve the target memory subgraph within the retrieval boundary of the target business node to obtain the target business memory and retrieval path;

[0066] The request processing module is used to process the business request according to the target business memory and obtain task feedback data;

[0067] The subgraph update module is used to update the target memory subgraph based on the task feedback data and the retrieval path;

[0068] The boundary update module is used to determine the retrieval boundary adjustment amount based on the state data before and after the target memory subgraph is updated, and update the retrieval boundary of the target business node according to the retrieval boundary adjustment amount.

[0069] By adopting the above technical solutions, hierarchical indexing, targeted retrieval, feedback updates, and boundary adjustments of business memory data are achieved. This enables business requests to quickly associate with the corresponding memory subgraphs and continuously correct memory content and retrieval scope using task feedback. It reduces resource waste caused by irrelevant memory traversal and static boundaries, and improves the accuracy, processing efficiency, and dynamic adaptability of business memory retrieval.

[0070] The above-mentioned objective three of this application is achieved through the following technical solution:

[0071] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described two-layer dynamic indexing business memory management method.

[0072] The fourth objective of this application is achieved through the following technical solution:

[0073] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described two-layer dynamic indexing business memory management method.

[0074] In summary, this application includes at least one of the following beneficial technical effects:

[0075] 1. By leveraging the mapping between the business knowledge tree index and the semantic memory graph index, the targeted association between business requests and memory subgraphs is realized. Combined with task feedback and retrieval path, the memory content and retrieval boundaries are continuously corrected, so that the retrieval scope can be adaptively adjusted according to changes in business status and memory status, reducing irrelevant memory traversal and effective memory omission, and improving the accuracy, processing efficiency and dynamic adaptability of business memory retrieval.

[0076] 2. Implement hierarchical indexing, targeted retrieval, feedback updates, and boundary adjustment of business memory data, enabling business requests to quickly associate with the corresponding memory subgraphs and continuously correct memory content and retrieval scope using task feedback, reducing resource waste caused by irrelevant memory traversal and static boundaries, and improving the accuracy, processing efficiency, and dynamic adaptability of business memory retrieval. Attached Figure Description

[0077] Figure 1 This is a flowchart of a two-layer dynamic index service memory management method in one embodiment of this application;

[0078] Figure 2 This is a flowchart illustrating the implementation of step S20 in a two-layer dynamic index service memory management method according to an embodiment of this application.

[0079] Figure 3This is a flowchart illustrating the implementation of step S50 in a two-layer dynamic index service memory management method according to an embodiment of this application.

[0080] Figure 4 This is a flowchart illustrating the implementation of step S70 in a two-layer dynamic index service memory management method according to an embodiment of this application.

[0081] Figure 5 This is a flowchart illustrating the implementation of step S80 in a two-layer dynamic index service memory management method according to an embodiment of this application.

[0082] Figure 6 This is a flowchart illustrating the implementation of step S805 in a two-layer dynamic index service memory management method according to an embodiment of this application.

[0083] Figure 7 This is a flowchart illustrating the implementation of step S80 and beyond in a two-layer dynamic index service memory management method according to an embodiment of this application.

[0084] Figure 8 This is a schematic diagram of a two-layer dynamic index service memory management device in one embodiment of this application. Detailed Implementation

[0085] The present application will be further described in detail below with reference to the accompanying drawings.

[0086] In one embodiment, such as Figure 1 As shown, this application discloses a two-layer dynamic index business memory management method, which specifically includes the following steps:

[0087] S10: Obtain business memory data.

[0088] In this embodiment, business memory data refers to data generated, received, or modified during business processing, including business object identifier, business event content, event occurrence time, data source identifier, data version identifier, processing result, and feedback content.

[0089] Specifically, the system receives raw business data from different data sources through a pre-configured data interface and reads the data source identifier and data version identifier corresponding to each piece of raw business data. The data version identifier is compared with the most recently acquired data version identifier from the corresponding data source, and the raw business data whose data version identifier has changed is identified as the business data to be processed.

[0090] The business data to be processed is parsed to extract the business object identifier, business event content, event occurrence time, data source identifier, data version identifier, processing result, and feedback content. For business event content recorded in unstructured form, the content is segmented according to the event occurrence time and business object identifier, and content with the same business object identifier and consecutive event occurrence times is grouped into the same business event content.

[0091] The business object identifier, business event content, event occurrence time, and data source identifier are concatenated according to a preset field order, and the concatenation result is hashed to obtain a data fingerprint. This data fingerprint is compared with the data fingerprints corresponding to the already acquired business memory data. If the data fingerprints are the same, the newer version of the pending business data corresponding to the data version identifier is retained. If the data fingerprints are different, the corresponding pending business data is identified as newly added business memory data.

[0092] The newly added business memory data and the newer pending business data are sorted according to the time of the event to obtain the business memory data.

[0093] S20: Construct a business knowledge tree index containing business nodes and a semantic memory graph index containing memory subgraphs based on business memory data, establish an index mapping relationship between business nodes and memory subgraphs, and determine the retrieval boundary of business nodes based on the index mapping relationship and the state data of memory subgraphs.

[0094] In this embodiment, a business node refers to an index unit divided according to business hierarchy; a business knowledge tree index refers to a tree-shaped index composed of business nodes and hierarchical relationships between business nodes; a memory subgraph refers to a graph structure composed of memory nodes with business associations and node relationships; a semantic memory graph index refers to a graph index composed of memory subgraphs; an index mapping relationship refers to the correspondence between business nodes and memory subgraphs; state data includes the number of memory nodes, node relationship density, and update frequency; and retrieval boundaries include a threshold for the number of memory node accesses and a threshold for the number of node relationship extension layers.

[0095] Specifically, business levels and business object identifiers are extracted from business memory data. Business nodes are created level by level according to the business level, and business nodes at adjacent levels are connected to obtain a business knowledge tree index. Memory nodes are generated based on business object identifiers, node relationships are generated based on business associations between business memory data, and memory nodes with node relationships are divided into memory subgraphs to obtain a semantic memory graph index.

[0096] The business object identifier corresponding to the business node is matched with the business object identifier contained in the memory subgraph, and an index mapping relationship is established between the successfully matched business node and the memory subgraph. The number of memory nodes in the memory subgraph is counted, and the ratio between the number of node relationships and the number of memory node combinations that can establish node relationships is determined as the node relationship density. The update frequency is determined based on the number of times the memory subgraph is updated within a preset time period, and the state data is obtained.

[0097] Based on the index mapping relationship, the status data is combined with the level of the corresponding business node in the business knowledge tree index to obtain the retrieval resource allocation result. Based on the retrieval resource allocation result, the threshold for the number of memory node accesses and the threshold for the number of node relationship extension layers are determined to obtain the retrieval boundary of the business node.

[0098] S30: Obtain the business request, traverse the business knowledge tree index according to the business request, and determine the target business node from the business nodes.

[0099] In this embodiment, a business request refers to input data containing request content, and a target business node refers to a business node determined after traversing the business knowledge tree index.

[0100] Specifically, the request content in the business request is segmented and semantically encoded to obtain the request semantic features, and the business object identifier is identified from the request content.

[0101] The process begins by traversing the business knowledge tree index layer by layer, starting from the root business node. For each business node in each layer, the semantic matching degree between the request semantic features and the corresponding content of the business node is calculated. The business object identifier is then compared with the business object identifier corresponding to the business node to obtain the identifier matching result.

[0102] The semantic matching degree, the identifier matching result, and the node matching value corresponding to the parent business node of the business node are weighted to obtain the node matching value of the business node. The child business nodes corresponding to the business nodes whose node matching values ​​meet the preset traversal conditions are added to the next level of traversal, until there are no more child business nodes that meet the preset traversal conditions.

[0103] The business node that meets the preset target conditions and has no subordinate business nodes that meet the preset traversal conditions is identified as the target business node.

[0104] S40: Based on the index mapping relationship, determine the target memory subgraph corresponding to the target business node from the memory subgraph.

[0105] In this embodiment, the target memory subgraph refers to the memory subgraph corresponding to the target service node, which is determined according to the index mapping relationship.

[0106] Specifically, the index mapping relationships containing the target business node are filtered from the index mapping relationships, and the memory subgraphs corresponding to the filtered index mapping relationships are determined as candidate memory subgraphs.

[0107] Based on the business knowledge tree index, determine the business nodes traversed from the root business node to the target business node, forming a business node path. Number the business nodes in the business node path according to the order from the root business node to the target business node.

[0108] The path mapping coverage of the (j)th candidate memory subgraph is calculated using the following formula:

[0109] .

[0110] In the formula, Let represent the path mapping coverage of the j-th candidate memory subgraph, n represent the total number of business nodes included in the business node path, and i represent the index of the business node in the business node path, with the root business node indexed as 1 and the target business node indexed as n. This represents the hierarchical attenuation coefficient, and , This represents the mapping indicator value between the i-th business node and the j-th candidate memory subgraph, when an index mapping relationship exists. When there is no index mapping relationship .

[0111] S50: Retrieve the target memory subgraph within the retrieval boundary of the target business node to obtain the target business memory and retrieval path.

[0112] In this embodiment, the target business memory refers to the business memory determined from the target memory subgraph, and the retrieval path refers to the path composed of memory nodes and node relationships traversed during the retrieval process.

[0113] Specifically, the business request is semantically encoded to obtain the request semantic features. The request semantic features are then matched with the memory nodes in the target memory subgraph using vector matching. The memory nodes whose matching degree meets the preset starting conditions are determined as the starting memory nodes.

[0114] Starting from the initial memory node, candidate memory nodes are determined layer by layer along the node relationships. During the expansion process at layer (t), the current retrieval boundary occupancy is determined according to the following formula:

[0115] .

[0116] In the formula, This represents the current retrieval boundary occupancy during the (t)th layer expansion process. This indicates the number of memory nodes that have been accessed, and A represents the threshold for the number of memory nodes accessed for the target business node. This indicates the number of node relationship extension layers that have been completed, and L represents the threshold number of node relationship extension layers for the target business node.

[0117] The path extension value of the candidate memory node v is determined according to the following formula:

[0118] .

[0119] In the formula, This represents the path expansion value of candidate memory node v during the expansion process of layer t. This indicates the degree of matching between the candidate memory node v and the requested semantic features. This indicates the degree of association between the nodes corresponding to the candidate memory node v. Indicates a non-zero adjustment parameter. Denotes the boundary constraint parameters, and .

[0120] Candidate memory nodes whose path expansion values ​​meet the preset expansion conditions are added to the retrieval path, and the retrieval path is expanded layer by layer based on the candidate memory nodes added to the retrieval path until the current retrieval boundary occupancy meets the preset stopping condition.

[0121] The memory nodes in the retrieval path are arranged according to the node relationships in the retrieval path, and the target business memory is determined based on the arranged memory nodes.

[0122] S60: Process business requests based on the target business memory and obtain task feedback data.

[0123] In this embodiment, task feedback data refers to data formed based on the processing process and results of business requests, including task processing results, constraint verification results, and memory reference records.

[0124] Specifically, the business request and the target business memory are combined according to the preset field order to obtain task input data, and the task input data is input into the preset business processing model to obtain the task processing result.

[0125] Extract the request object, request content, and request conditions from the business request, and break down the request conditions into request constraints. Compare the task processing result with each request constraint, record the satisfaction status of each request constraint, and obtain the constraint verification result.

[0126] Extract content that matches the target business memory from the task processing results, record the position of the matching content in the task processing results and the target business memory corresponding to the matching content, and obtain the memory reference record.

[0127] The task processing results, constraint verification results, and memory reference records are combined according to a preset data format to obtain task feedback data.

[0128] S70: Update the target memory subgraph based on task feedback data and retrieval path.

[0129] Specifically, feature extraction is performed on the task feedback data to obtain feedback features, feedback type, and feedback intensity. The feedback features are then matched with memory nodes in the retrieval path, and memory nodes whose matching degree meets the preset feedback association conditions are identified as feedback-associated memory nodes.

[0130] The feedback direction coefficient is determined based on the feedback type: a positive feedback direction coefficient is 1, a negative feedback direction coefficient is -1, and no feedback direction coefficient is 0. The feedback contribution value of memory node v in the retrieval path is determined using the following formula:

[0131] .

[0132] In the formula, This represents the feedback contribution value of memory node v. F represents the feedback direction coefficient, and F represents the feedback strength. This indicates the degree of matching between the memory node v and the memory reference record. This represents the path interval between memory node v and the feedback-associated memory node. This represents the citation adjustment coefficient, and , This represents the path attenuation coefficient, and .

[0133] For the node relationship connecting memory node u and memory node v, the node relationship feedback contribution value is determined according to the following formula:

[0134] .

[0135] In the formula, This represents the contribution value of the node relationship between memory node u and memory node v. Indicates the degree of association between nodes. This represents the feedback contribution value of memory node u. This represents the feedback contribution value of memory node v.

[0136] Update the memory node weights and node relationship weights in the target memory subgraph according to the following formula:

[0137] .

[0138] .

[0139] In the formula, This represents the updated weight of memory node v. This represents the weight of memory node v before the update. Indicates the update coefficient of the memory node. This represents the node relationship weight after the node relationship is updated. This indicates the node relationship weights before the node relationship update. This represents the node relationship update coefficient.

[0140] S80: Determine the retrieval boundary adjustment amount based on the state data before and after the target memory subgraph update, and update the retrieval boundary of the target business node according to the retrieval boundary adjustment amount.

[0141] In this embodiment, the retrieval boundary adjustment amount includes the memory node access quantity adjustment amount and the node relationship expansion layer number adjustment amount.

[0142] Specifically, the rate of change of the number of memory nodes, the rate of change of node relationship density, and the rate of change of update frequency of the target memory subgraph are determined according to the following formulas:

[0143] .

[0144] .

[0145] .

[0146] In the formula, This represents the rate of change in the number of memory nodes. and These represent the number of memory nodes before and after the update, respectively. This represents the rate of change in node relationship density. and These represent the node relationship density before and after the update, respectively. Represents the rate of change of update frequency and These represent the update frequencies before and after the update, respectively. , and These represent the non-zero adjustment parameters corresponding to the state data.

[0147] The mapping weights between the target business node and the target memory subgraph are determined according to the following formula:

[0148] .

[0149] In the formula, Indicates the mapping weights. This indicates the number of business memory data corresponding to the target business node in the target memory subgraph. K) represents the number of business memory data in the y-th memory subgraph that has an index mapping relationship with the target business node, and K) represents the number of memory subgraphs that have an index mapping relationship with the target business node.

[0150] The retrieval boundary adjustment amount is determined according to the following formula:

[0151] .

[0152] .

[0153] In the formula, This indicates the adjustment amount for the number of memory node accesses. This indicates the amount of adjustment to the number of layers in the node relationship expansion. , and These represent the conversion coefficients for the number of memory node accesses corresponding to the three states of data. and These represent the conversion coefficients for the node relationship extension layer corresponding to the three types of data states.

[0154] Update the retrieval boundaries of the target business node according to the following formula:

[0155] .

[0156] .

[0157] In the formula, This represents the updated threshold for the number of accesses to memory nodes. This represents the threshold number of accesses to memory nodes before the update. This represents the threshold for the updated node relationship expansion layer. This represents the threshold for the number of node relationship expansion layers before the update.

[0158] In one embodiment, such as Figure 2 As shown, in step S20, which involves determining the retrieval boundaries of the business nodes based on the index mapping relationship and the state data of the memory subgraph, the following steps are included:

[0159] S201: Based on the index mapping relationship, determine the memory subgraph corresponding to the business node, and determine the node level of the business node in the business knowledge tree index.

[0160] In this embodiment, node level refers to the level at which a business node is located relative to the root business node of the business knowledge tree index.

[0161] Specifically, the business object identifier of the business node is read, the index mapping relationship containing the business object identifier is filtered from the index mapping relationship, and the memory subgraph recorded in the filtered index mapping relationship is determined as the memory subgraph corresponding to the business node.

[0162] The business node that does not have a parent level relationship in the business knowledge tree index is identified as the root business node. Starting from the root business node, business nodes are located level by level according to the hierarchical relationship in the business knowledge tree index, and the number of hierarchical relationships traversed from the root business node to the business node is recorded.

[0163] The node level of the root business node is determined as level zero, and the node level of the business node is determined by adding one node level for each level relationship.

[0164] S202: Determine the state characteristic value of the subgraph based on the number of memory nodes, node relationship density, and update frequency in the memory subgraph.

[0165] In this embodiment, the subgraph state feature value refers to a value determined based on the number of memory nodes, node relationship density, and update frequency.

[0166] Specifically, the number of memory nodes, node relationship density, and update frequency are read from the state data of the memory subgraph, and the subgraph state feature values ​​are determined according to the following formula:

[0167] .

[0168] In the formula, Z represents the subgraph state feature value, N represents the number of memory nodes, D represents the node relationship density, and F represents the update frequency. This represents the node relationship density adjustment coefficient, and , This indicates the frequency adjustment coefficient being updated, and .

[0169] S203: Determine the retrieval resource allocation value based on the node level and subgraph state feature value.

[0170] In this embodiment, the retrieved resource allocation value refers to the numerical value determined based on the node level and subgraph state feature value.

[0171] Specifically, the node hierarchy of the business node and the subgraph state feature values ​​of the memory subgraph corresponding to the business node are read, and the retrieval resource allocation value is determined according to the following formula:

[0172] .

[0173] In the formula, This represents the retrieval resource allocation value for business node b. This indicates the node level of business node b. This represents the subgraph state feature value of the memory subgraph corresponding to business node b. This represents the node-level adjustment coefficient, and , This represents the cross-level constraint coefficient between the node level and the subgraph state feature values, and .

[0174] S204: Allocate graph retrieval resource quotas to business nodes from the preset total retrieval resources according to the retrieval resource allocation value.

[0175] In this embodiment, the preset total retrieval resource volume refers to the pre-set total number of graph retrieval resource units, and the graph retrieval resource quota refers to the number of graph retrieval resource units allocated to business nodes.

[0176] Specifically, the retrieval resource allocation value of each business node is read, and the graph retrieval resource quota of business node (b) is determined according to the following formula:

[0177] .

[0178] In the formula, This represents the graph retrieval resource quota for business node (b). B represents the preset total amount of retrieval resources, and B represents the number of business nodes participating in the allocation of graph retrieval resources. This represents the retrieval resource allocation value for business node (b). This represents the retrieval resource allocation value for the j-th business node. Represents the basic resource allocation coefficient, and , This represents the resource concentration adjustment coefficient, and .

[0179] The number of graph retrieval resource units obtained according to the formula is determined as the graph retrieval resource quota for the business node.

[0180] S205: Determine the threshold for the number of accesses to memory nodes and the threshold for the number of extension layers of node relationships based on the graph retrieval resource quota, and determine the threshold for the number of accesses to memory nodes and the threshold for the number of extension layers of node relationships as the retrieval boundaries of business nodes.

[0181] Specifically, the resource partitioning coefficient of business nodes is determined based on the node relationship density:

[0182] .

[0183] In the formula, This represents the resource splitting coefficient of business node b.

[0184] Based on the resource splitting coefficient and graph retrieval resource quota, the thresholds for the number of accesses to memory nodes and the number of node relationship extension layers are determined respectively:

[0185] .

[0186] .

[0187] In the formula, A represents the calculated number of memory node visits, and L represents the calculated number of node relationship extension layers. This represents the number of graph retrieval resource units accessed for a memory node. This represents the number of graph retrieval resource units corresponding to the extended layer of node relationships.

[0188] Round down A and L respectively. The rounded A is determined as the threshold for the number of memory node accesses, and the rounded L is determined as the threshold for the number of node relationship expansion layers.

[0189] In one embodiment, such as Figure 3 As shown, in step S50, the target memory subgraph is retrieved within the retrieval boundary of the target service node to obtain the target service memory and retrieval path, including:

[0190] S501: Extract features from the business request to obtain the request semantic features.

[0191] In this embodiment, request semantic features refer to feature data obtained by semantically encoding the business object content, business action content, and business constraint content in the business request.

[0192] Specifically, the business request is segmented into words, and the business object content, business action content, and business constraint content in the business request are marked according to the preset business object vocabulary, business action vocabulary, and business constraint recognition model.

[0193] Based on the order of business object content, business action content, and business constraint content in the business request, add object type tags to business object content, add action type tags to business action content, and add constraint type tags to business constraint content to obtain a sequence of request content with type tags.

[0194] Input the request content sequence into a preset semantic encoding model, extract the aggregated features output by the preset semantic encoding model for object type markers, action type markers and constraint type markers, and obtain the request semantic features.

[0195] S502: Determine the starting memory node from the memory nodes of the target memory subgraph based on the request semantic features.

[0196] In this embodiment, the starting memory node refers to the memory node determined from the target memory subgraph based on the request semantic features.

[0197] Specifically, a pre-defined semantic encoding model is used to semantically encode the memory content of each memory node in the target memory subgraph, resulting in node semantic features. The request semantic features are then matched with the node semantic features to obtain the semantic matching degree of each memory node.

[0198] For a memory node (v), read the adjacent memory nodes that have a node relationship with memory node v and the corresponding degree of node relationship association, and determine the starting matching value of memory node v according to the following formula:

[0199] .

[0200] In the formula, This represents the starting matching value of the memory node v. This indicates the degree of semantic matching of memory node v. This represents the set of adjacent memory nodes of memory node v. This indicates the degree of node association between memory node v and its neighboring memory node u. This indicates the degree of semantic matching between adjacent memory nodes u. This indicates a direct matching adjustment coefficient, and , This indicates a non-zero adjustment parameter.

[0201] The memory node whose initial matching value meets the preset starting condition is determined as the starting memory node.

[0202] S503: Starting from the initial memory node, expand layer by layer along the node relationships in the target memory subgraph.

[0203] In this embodiment, layer-by-layer expansion refers to determining the nodes of each layer sequentially according to the number of layers of the relationship between the node and the starting memory node, taking the adjacent nodes connected by the node relationship as the unit.

[0204] Specifically, the starting memory node is determined as the current layer node. The node relationships of the current layer node in the target memory subgraph are read. The corresponding adjacent nodes are determined according to the connection direction recorded in each node relationship. The adjacent nodes that have not yet been expanded are assigned to the next layer node. The relationship layer number of the adjacent node and the current layer node connected to it are recorded. After all the node relationships of the current layer node have been read, the next layer node is updated to the current layer node and the above process is continued until there are no adjacent nodes that have not yet been expanded.

[0205] S504: During each layer of expansion, the path expansion value of the candidate memory node is determined based on the degree of matching between the candidate memory node and the requested semantic features, the degree of association between the nodes corresponding to the candidate memory node, and the current retrieval boundary occupancy.

[0206] In this embodiment, a candidate memory node refers to an adjacent node of the current layer node that is connected by node relationships and has not yet been expanded. The matching degree refers to the normalized similarity value between the semantic features carried by the candidate memory node and the requested semantic features. The association degree refers to the normalized relationship strength of the node relationship connecting the current layer node and the candidate memory node. The current retrieval boundary occupancy refers to the ratio of the number of candidate memory nodes that have entered the current layer expansion range to the preset boundary capacity. The path expansion value refers to the value generated for a single candidate memory node.

[0207] Specifically, the semantic features carried by the candidate memory nodes and the requested semantic features are subjected to normalized inner product operations to obtain the matching degree. The relationship strength recorded in the node relationship corresponding to the candidate memory node is read and normalized with the maximum relationship strength in the current layer to obtain the association degree. The current retrieval boundary occupancy is counted, and the path expansion value is calculated according to the following formula:

[0208] .

[0209] in, Let be the path extension value of the i-th candidate memory node. Let represent the matching degree of the i-th candidate memory node. Let represent the degree of association between the nodes corresponding to the i-th candidate memory node. This represents the current retrieval boundary occupancy. This is the preset matching adjustment coefficient.

[0210] S505: Add candidate memory nodes whose path extension values ​​meet the preset extension conditions to the retrieval path, and continue to extend layer by layer based on the candidate memory nodes added to the retrieval path until the current retrieval boundary occupancy meets the stopping condition corresponding to the retrieval boundary of the target business node, and determine the target business memory according to the retrieval path.

[0211] In this embodiment, the preset expansion condition means that the path expansion value is not less than the expansion threshold corresponding to the current retrieval boundary occupancy interval, the retrieval path means that the starting memory node, the candidate memory node that meets the preset expansion condition, and the corresponding node relationship are recorded in the order of expansion, and the stopping condition means that the current retrieval boundary occupancy reaches the upper limit of the occupancy corresponding to the target business node.

[0212] Specifically, based on the current retrieval boundary occupancy, a corresponding expansion threshold is determined. The path expansion value of each candidate memory node is compared with the expansion threshold, and candidate memory nodes that meet the preset expansion conditions are added to the retrieval path in descending order of their path expansion values. Simultaneously, the node relationship between each candidate memory node and its current layer node is recorded. Each time a candidate memory node is added, the current retrieval boundary occupancy is updated. If the stopping condition is not met, the newly added candidate memory node in the retrieval path is used as the current layer node for the next layer, and expansion continues layer by layer. When the stopping condition is met, expansion stops, and the memory content carried by each candidate memory node in the retrieval path is read sequentially and arranged according to the corresponding level and path expansion value to obtain the target business memory.

[0213] In one embodiment, such as Figure 4 As shown, in step S70, which involves updating the target memory subgraph based on task feedback data and the retrieval path, the following steps are included:

[0214] S701: Extract features from the task feedback data to obtain feedback features, feedback type, and feedback intensity.

[0215] In this embodiment, feedback features refer to the combined features consisting of the semantics of feedback content, the magnitude of changes in task status, and the frequency of feedback; feedback type refers to the category identifier corresponding to the feedback features; and feedback intensity refers to the normalized value determined by the magnitude of changes in task status, the frequency of feedback, and the clarity of the type.

[0216] Specifically, the feedback content in the task feedback data is semantically encoded, the absolute value of the difference between the task state values ​​before and after feedback is calculated to obtain the task state change amplitude, the number of feedbacks within a preset time period is counted, and the ratio of the number of feedbacks to the duration of the preset time period is determined as the feedback frequency. The semantic encoding results, task state change amplitude, and feedback frequency are normalized and concatenated sequentially to obtain the feedback features. The similarity between the feedback features and the preset feature templates corresponding to each feedback type is calculated to form similarity combinations. The category identifier corresponding to the preset type determination interval to which the similarity combination belongs is determined as the feedback type, and the feedback intensity is calculated according to the following formula:

[0217] .

[0218] in, For feedback strength, This represents the normalized range of changes in the task state. The normalized feedback frequency, The similarity of the preset feature templates corresponding to the feedback type. This is the average similarity of the remaining preset feature templates. For state change weights, For feedback frequency weight, and .

[0219] S702: Match the feedback features with the memory nodes in the retrieval path, and determine the memory nodes whose matching degree meets the preset feedback association conditions as feedback association memory nodes.

[0220] In this embodiment, the feedback matching degree refers to the degree of consistency between the feedback feature and the memory content carried by the memory node in the corresponding feature dimension. The preset feedback association condition means that the feedback matching degree is not less than the feedback association threshold corresponding to the path level where the memory node is located. The feedback associated memory node refers to the memory node that meets the preset feedback association condition.

[0221] Specifically, according to the dimensional order of the feedback features, the memory content carried by each memory node in the retrieval path is encoded and normalized to obtain the feature value of each memory node in the corresponding feature dimension. The difference between the feedback feature and the feature value of each memory node in the same feature dimension is calculated one by one, and the weights of the feedback dimensions corresponding to the feature dimensions with valid feature values ​​are proportionally adjusted so that the sum of the adjusted feedback dimension weights is 1.

[0222] The weighted difference value is obtained by multiplying the differences of each feature value by their corresponding feedback dimension weights and summing the results. The difference between 1 and the weighted difference value is then determined as the feedback matching degree. The feedback matching degree is compared with the feedback association threshold corresponding to the path level of the memory node. Memory nodes that meet the preset feedback association conditions are determined as feedback-associated memory nodes.

[0223] S703: Determine the feedback contribution value of memory nodes and node relationships based on their path positions relative to the feedback-related memory nodes and the feedback strength in the retrieval path.

[0224] In this embodiment, node path position refers to the number of node relationships in the arrangement direction and interval of memory nodes relative to feedback associated memory nodes, relationship path position refers to the average position of the two endpoint nodes of a node relationship relative to the feedback associated memory node, node feedback contribution value refers to the feedback value determined for memory nodes, and relationship feedback contribution value refers to the feedback value determined for node relationships.

[0225] Specifically, based on the position of the feedback associated memory node in the retrieval path, the number of node relationships between each memory node and the feedback associated memory node is counted, and the position of each memory node before or after the feedback associated memory node is recorded to obtain the node path position.

[0226] Read the node path positions corresponding to the two endpoint nodes of each node relationship, and determine the relationship path position by the average number of node relationships between the two endpoint nodes. Query the corresponding node position attenuation coefficient based on the node path position, and multiply the feedback strength by the node position attenuation coefficient to obtain the node feedback contribution value.

[0227] The corresponding relationship position attenuation coefficient is queried based on the relationship path position. The feedback strength is multiplied by the relationship position attenuation coefficient to obtain the relationship feedback contribution value.

[0228] When there are multiple feedback-associated memory nodes, the above calculations are performed separately, and the sum of the calculation results obtained for the same memory node or the same node relationship is divided by the number of feedback-associated memory nodes involved in the calculation.

[0229] S704: Based on the feedback type and feedback contribution value, determine the memory weight adjustment amount for memory nodes and the relationship weight adjustment amount for node relationships, respectively.

[0230] In this embodiment, the memory weight adjustment amount refers to the weight change value with adjustment direction determined for the memory node, and the relationship weight adjustment amount refers to the weight change value with adjustment direction determined for the node relationship.

[0231] Specifically, read the node adjustment direction, relationship adjustment direction, node segmentation adjustment coefficient, and relationship segmentation adjustment coefficient corresponding to the feedback type.

[0232] According to the preset contribution value range, the node feedback contribution value is divided into the node interval contribution amount falling into each contribution value range. The node interval contribution amount is multiplied by the corresponding node segment adjustment coefficient and summed. Then, a positive or negative sign is added according to the node adjustment direction to obtain the memory weight adjustment amount.

[0233] The relationship feedback contribution value is processed in the same way as the contribution value interval splitting method. The contribution amount of each relationship interval is multiplied by the corresponding relationship segment adjustment coefficient and summed. Then, a positive or negative sign is added according to the relationship adjustment direction to obtain the relationship weight adjustment amount.

[0234] S705: Update the target memory subgraph according to the memory weight adjustment amount and the relation weight adjustment amount.

[0235] In this embodiment, updating the target memory subgraph means keeping the memory nodes, node relationships, and node connection structure unchanged, while changing the memory weights of the memory nodes and the relationship weights of the node relationships.

[0236] Specifically, the process involves locating the memory nodes corresponding to the memory weight adjustment amounts one by one, reading the current memory weight of each node, and adding the memory weight to the corresponding memory weight adjustment amount. Similarly, it involves locating the node relationships corresponding to the relationship weight adjustment amounts one by one, reading the current relationship weight of each relationship, and adding the relationship weight to the corresponding relationship weight adjustment amount. The process then checks whether the added memory weights and relationship weights are within their respective preset weight ranges. If they exceed the preset weight range, the boundary value of the range that exceeds the limit is used. The processed memory weights and relationship weights are temporarily stored. After all memory nodes and node relationships have been processed, the temporarily stored memory weights and relationship weights are written to the target memory subgraph in one go.

[0237] In one embodiment, such as Figure 5 As shown, in step S80, the retrieval boundary adjustment amount is determined based on the state data before and after the target memory subgraph update, and the retrieval boundary of the target business node is updated according to the retrieval boundary adjustment amount, including:

[0238] S801: Perform differential processing on the state data before and after the target memory subgraph is updated to obtain state change data, which includes the state change direction and the state change magnitude.

[0239] In this embodiment, subgraph state data refers to the memory weights and relationship weights arranged in the corresponding order of memory nodes and node relationships. Subgraph state change data refers to the difference data between the subgraph state data before and after the update. The direction of subgraph state change includes weight increase, weight decrease, and weight unchanged. The magnitude of subgraph state change refers to the value obtained after normalizing the weight difference before and after the update.

[0240] Specifically, according to the memory node identifier and node relationship identifier, the memory nodes and node relationships before and after the update are aligned item by item. The updated memory weight is subtracted from the corresponding memory weight before the update to obtain the node weight difference of each memory node. The updated relationship weight is subtracted from the corresponding relationship weight before the update to obtain the relationship weight difference of each node relationship.

[0241] The node weight difference and relationship weight difference are normalized according to the corresponding preset weight intervals. The average of the normalized node weight difference and relationship weight difference is calculated separately. Then, they are merged according to the preset node difference ratio and relationship difference ratio. The direction of subgraph state change is determined according to the sign of the merged result. The absolute values ​​of the normalized node weight difference and relationship weight difference are taken and averaged separately. Then, they are merged according to the node difference ratio and relationship difference ratio to obtain the subgraph state change amplitude.

[0242] S802: Determine the mapping weight between the target business node and the target memory subgraph based on the index mapping relationship.

[0243] In this embodiment, the mapping weight refers to the normalized value of the degree of correspondence between the target service node and the target memory subgraph.

[0244] Specifically, the mapping records that point to both the target business node and the target memory subgraph are read from the index mapping relationship, and the direct mapping coefficients representing the degree of correspondence of each item in each mapping record are extracted.

[0245] When only one mapping record exists, the corresponding direct mapping coefficient is determined as the mapping weight. When multiple mapping records exist, the first direct mapping coefficient is used as the cumulative mapping value. The remaining direct mapping coefficients are read one by one. The cumulative mapping value is added to the currently read direct mapping coefficient, and the product of the two is subtracted. The cumulative mapping value is then updated with the resulting value. After processing all direct mapping coefficients, the cumulative mapping value is determined as the mapping weight. When no corresponding mapping record is read, the mapping weight is set to 0.

[0246] S803: Weight the magnitude of state changes according to the mapping weights to obtain the magnitude of the retrieval boundary adjustment, and determine the direction of the retrieval boundary adjustment according to the direction of the state change.

[0247] In this embodiment, the retrieval boundary adjustment range refers to the percentage change in the boundary capacity corresponding to the retrieval boundary of the target service node. The retrieval boundary adjustment direction includes boundary expansion, boundary contraction, and boundary maintenance.

[0248] Specifically, the mapping weight is multiplied by the subgraph state change magnitude to obtain the weighted change ratio. It is then determined whether the weighted change ratio reaches the preset boundary response value. If it does, the weighted change ratio is determined as the retrieval boundary adjustment magnitude; otherwise, the retrieval boundary adjustment magnitude is determined to be 0.

[0249] When the subgraph state change direction is weight increase, the retrieval boundary adjustment direction is determined as boundary expansion; when the subgraph state change direction is weight decrease, the retrieval boundary adjustment direction is determined as boundary contraction; and when the subgraph state change direction is weight unchanged, the retrieval boundary adjustment direction is determined as boundary preservation.

[0250] S804: Determine the amount of search boundary adjustment based on the range and direction of search boundary adjustment.

[0251] In this embodiment, the retrieval boundary adjustment amount refers to the boundary capacity change value with positive and negative directions.

[0252] Specifically, the current boundary capacity corresponding to the retrieval boundary of the target business node is read, and the current boundary capacity is multiplied by the retrieval boundary adjustment range to obtain the capacity change value.

[0253] Extract the integer and decimal parts of the capacity change value. When the decimal part reaches a preset conversion ratio, add 1 to the integer part; otherwise, retain the integer part to obtain the capacity change quantity. When the search boundary adjustment direction is boundary expansion, add a positive sign to the capacity change quantity; when the search boundary adjustment direction is boundary contraction, add a negative sign; when the search boundary adjustment direction is boundary preservation, set the capacity change quantity to 0 to obtain the search boundary adjustment amount.

[0254] If the boundary capacity calculated according to the retrieval boundary adjustment amount exceeds the preset boundary capacity range, then the difference between the corresponding range boundary value and the current boundary capacity is determined as the retrieval boundary adjustment amount.

[0255] S805: Update the search boundary of the target business node according to the search boundary adjustment amount.

[0256] In this embodiment, updating the search boundary includes synchronously updating the boundary capacity and the current search boundary occupancy.

[0257] Specifically, based on the target business node, the corresponding retrieval boundary is located, the current boundary capacity of the retrieval boundary is read, and the current boundary capacity is added to the retrieval boundary adjustment amount to obtain the updated boundary capacity.

[0258] When the retrieval boundary adjustment amount is 0, the current boundary capacity is retained. When the retrieval boundary adjustment amount is not 0, the current boundary capacity is replaced with the updated boundary capacity, and the current retrieval boundary occupancy is re-determined based on the ratio of the number of candidate memory nodes that have entered the retrieval boundary to the updated boundary capacity.

[0259] The updated boundary capacity and the redefined current retrieval boundary occupancy are synchronously written to the retrieval boundary of the target business node.

[0260] In one embodiment, such as Figure 6 As shown, in step S805, which involves updating the retrieval boundary of the target service node according to the retrieval boundary adjustment amount, the following is included:

[0261] S8051: Identify the parent business node that has a parent-child relationship with the target business node from the business nodes.

[0262] In this embodiment, the superior relationship refers to the direct hierarchical relationship between two business nodes, from the lower end to the upper end. The superior business node refers to the business node located at the upper end in the superior relationship.

[0263] Specifically, read the relationships between each business node that is directly connected to the target business node, identify the relationship type and connection direction of each business node relationship, and retain the business node relationships that are hierarchical, with the target business node as the lower level and the other business node as the upper level.

[0264] Read the corresponding node identifier of the upper-level end according to the retained business node relationship, match the node identifier with the business node one by one, and verify the connection direction between the corresponding business node and the target business node. The business node that matches the verification is determined as the upper-level business node, and duplicate upper-level business nodes are removed according to the node identifier.

[0265] S8052: Based on the index mapping relationship, determine the parent memory subgraph corresponding to the parent business node from the memory subgraph.

[0266] In this embodiment, the upper-level memory subgraph refers to a memory subgraph that forms a corresponding relationship with the upper-level business node through an index mapping relationship.

[0267] Specifically, the node identifier of the parent business node is read, and the index mapping relationship is queried using the node identifier as an index. Mapping records where the business node end and the node identifier are consistent and the memory end points to the memory subgraph are retained. The memory subgraph identifier is extracted from the retained mapping records, and the corresponding memory subgraph is located from the memory subgraph based on the memory subgraph identifier. The business node end in the mapping record is verified to point to the parent business node, and the memory end in the mapping record is verified to point to the located memory subgraph. The memory subgraph that is consistent at both ends is determined as the parent memory subgraph.

[0268] When there are multiple parent business nodes, perform the above processing separately, and remove duplicate results according to the corresponding combination of the node identifier of the parent business node and the memory subgraph identifier.

[0269] S8053: Determine the subgraph correlation degree based on the degree of overlap of business memory data between the superior memory subgraph and the target memory subgraph.

[0270] In this embodiment, the degree of overlap of business memory data refers to the normalized overlap ratio of business memory data contained in two memory subgraphs in terms of data identification and data content, and the subgraph correlation degree refers to the correlation value obtained after interval transformation based on the degree of overlap of business memory data.

[0271] Specifically, the business memory data carried by each memory node in the upper-level memory subgraph and the target memory subgraph are extracted respectively. The format of the business memory data is unified, and a content fingerprint is generated based on the unified data content. First, business memory data with the same data identifier are paired. Then, unpaired business memory data with the same content fingerprint are paired. Pairing results with the same data identifier are counted according to the unit overlap. Pairing results with only the same content fingerprint are counted according to a preset content overlap coefficient. The cumulative count is divided by the total amount of paired business memory data to obtain the degree of overlap of business memory data.

[0272] Determine the preset overlap interval to which the business memory data overlaps, read the subgraph association transformation coefficient corresponding to the preset overlap interval, and multiply the business memory data overlap degree by the subgraph association transformation coefficient to obtain the subgraph association degree.

[0273] S8054: Determine the boundary propagation adjustment amount based on the retrieval boundary adjustment amount and the subgraph relevance.

[0274] In this embodiment, the boundary propagation adjustment amount refers to the boundary capacity change value with adjustment direction determined for the upper-level memory subgraph.

[0275] Specifically, the positive and negative directions of the retrieval boundary adjustment amount are identified, and the absolute value of the retrieval boundary adjustment amount is extracted. The absolute value is multiplied by the subgraph correlation degree to obtain the propagation capacity value. The integer and decimal parts of the propagation capacity value are extracted. When the decimal part reaches the preset propagation rounding ratio, the integer part is incremented by 1; otherwise, the integer part is retained to obtain the propagation capacity quantity.

[0276] When the retrieval boundary adjustment is positive, a positive sign is added to the propagation capacity quantity; when the retrieval boundary adjustment is negative, a negative sign is added to the propagation capacity quantity; when the retrieval boundary adjustment is 0, the propagation capacity quantity is set to 0, thus obtaining the boundary propagation adjustment.

[0277] S8055: When the boundary propagation adjustment amount meets the preset propagation conditions, update the retrieval boundary of the superior business node according to the boundary propagation adjustment amount.

[0278] In this embodiment, the preset propagation condition means that the absolute value of the boundary propagation adjustment amount is not less than the propagation threshold corresponding to the boundary capacity range where the upper-level business node is currently located.

[0279] Specifically, the current boundary capacity of the parent service node is read, the preset boundary capacity range to which the current boundary capacity belongs is determined, and the propagation threshold corresponding to the preset boundary capacity range is read. The absolute value of the boundary propagation adjustment is compared with the propagation threshold. When the preset propagation conditions are met, the current boundary capacity and the boundary propagation adjustment are added together. If the sum exceeds the preset boundary capacity range corresponding to the parent service node, the boundary value of the range that exceeds the limit is used to obtain the updated boundary capacity.

[0280] The updated boundary capacity replaces the current boundary capacity, and the current retrieval boundary occupancy of the parent business node is redefined based on the number of candidate memory nodes that have entered the retrieval boundary of the parent business node. If the preset propagation conditions are not met, the current boundary capacity of the parent business node is retained.

[0281] In one embodiment, such as Figure 7 As shown, after step S80, the method further includes:

[0282] S91: Determine short-term business memory data that is not written to the semantic memory graph index and corresponds to the business request from the business memory data.

[0283] In this embodiment, short-term business memory data refers to business memory data generated within a preset short period of time, which corresponds to business requests and has not yet been written into the semantic memory graph index.

[0284] Specifically, the request identifier and request time of the business request are read, the corresponding preset short period of time is determined according to the request time, the request association identifier and generation time of the business memory data are read item by item, and the business memory data whose request association identifier is consistent with the request identifier and whose generation time is within the preset short period of time are retained.

[0285] Extract the data identifiers from the retained business memory data, and generate content fingerprints after standardizing the format of the data content. Use the data identifiers and content fingerprints to query the semantic memory graph index. Business memory data for which no corresponding data identifier or content fingerprint is found is identified as short-term business memory data.

[0286] S92: Match short-term business memory data with the retrieval path to obtain path support.

[0287] In this embodiment, path support refers to the normalized value of the support formed by short-term business memory data for memory nodes and node relationships in the retrieval path.

[0288] Specifically, following the same feature dimension order, the short-term business memory data and the memory content carried by each memory node in the retrieval path are encoded and normalized. The feature value difference between the two is calculated dimension by dimension. The feature value differences are weighted and summed, and the difference between 1 and the summation result is determined as the short-term content consistency value.

[0289] Short-term business memory data with short-term content consistency values ​​reaching a preset path matching threshold are marked as supporting pairs with memory nodes. The ratio of the number of memory nodes forming supporting pairs to the total number of memory nodes in the retrieval path is calculated to obtain the node coverage ratio. For each node relationship in the retrieval path, it is determined whether both endpoint nodes form supporting pairs and whether the generation order of the corresponding short-term business memory data is consistent with the connection direction of the node relationship. The ratio of the number of node relationships with consistent values ​​to the total number of node relationships in the retrieval path is calculated to obtain the relationship continuity ratio.

[0290] The path support is obtained by multiplying the node coverage ratio and the relationship continuity ratio by their respective preset support coefficients and summing them.

[0291] S93: Match short-term business memory data with task feedback data to obtain feedback consistency.

[0292] In this embodiment, feedback consistency refers to the normalized consistency value between short-term business memory data and task feedback data in terms of feedback content and generation time.

[0293] Specifically, the feedback content in short-term business memory data and task feedback data is semantically encoded and normalized in the same dimension. The difference in feature values ​​between the two is calculated dimension by dimension. The differences in feature values ​​are weighted and summed, and the difference between 1 and the summation result is determined as the memory feedback content matching value. Data combinations whose memory feedback content matching value reaches a preset content matching threshold and whose interval between the generation time of short-term business memory data and the feedback time of task feedback data is within a preset feedback period are marked as consistent pairs.

[0294] The memory coverage ratio is obtained by calculating the ratio of the number of consistent short-term business memory data pairs to the total amount of short-term business memory data. Similarly, the feedback coverage ratio is obtained by calculating the ratio of the number of consistent task feedback data pairs to the total amount of task feedback data. The feedback consistency degree is obtained by multiplying the memory coverage ratio and the feedback coverage ratio, and then taking the square root. When the total amount of any data pair is 0, the feedback consistency degree is set to 0.

[0295] S94: Determine the strength of memory evidence based on path support and feedback consistency.

[0296] In this embodiment, the strength of memory evidence refers to the normalized evidence value determined by both path support and feedback consistency.

[0297] Specifically, the path support and feedback consistency are multiplied by 2, and then divided by the sum of the path support and feedback consistency to obtain the collaborative evidence value. When the sum of the path support and feedback consistency is 0, the collaborative evidence value is set to 0.

[0298] Calculate the absolute value of the difference between path support and feedback consistency, and determine the difference between 1 and the absolute value as the evidence balance coefficient. Multiply the collaborative evidence value by the evidence balance coefficient to obtain the strength of memory evidence.

[0299] S95: When the strength of memory evidence meets the preset migration conditions, short-term business memory data is identified as long-term business memory data, and the long-term business memory data is written into the target memory subgraph.

[0300] In this embodiment, the preset migration condition means that the strength of memory evidence is not less than the preset memory migration threshold, and long-term business memory data refers to business memory data whose storage state changes from a short-term state to a long-term state.

[0301] Specifically, the strength of memory evidence is compared with a preset memory migration threshold. When the preset migration conditions are met, the short-term state marker of each short-term business memory data is changed to a long-term state marker, resulting in long-term business memory data. The target memory subgraph is queried using the data identifier and content fingerprint of the long-term business memory data as duplicate verification conditions. If no corresponding memory node is found, a memory node carrying the long-term business memory data is created, and the data identifier, data content, generation time, and long-term state marker are written into the memory node. When a memory node with both the data identifier and content fingerprint are found, the long-term state marker is written into the corresponding memory node.

[0302] After processing all long-term business memory data, newly added or modified memory nodes are written to the target memory subgraph all at once. If the preset migration conditions are not met, the short-term status markers of the short-term business memory data are retained.

[0303] It should be understood that the sequence number of each step in the above embodiments 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 this application.

[0304] In one embodiment, a two-layer dynamic index service memory management device is provided, which corresponds one-to-one with the two-layer dynamic index service memory management method described in the above embodiments. For example... Figure 8 As shown, the two-layer dynamic index business memory management device includes a data acquisition module, an index construction module, a node determination module, a subgraph determination module, a memory retrieval module, a request processing module, a subgraph update module, and a boundary update module.

[0305] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0306] Obtain business memory data.

[0307] Based on business memory data, a business knowledge tree index containing business nodes and a semantic memory graph index containing memory subgraphs are constructed. An index mapping relationship between business nodes and memory subgraphs is established, and the retrieval boundaries of business nodes are determined according to the index mapping relationship and the state data of the memory subgraphs.

[0308] Obtain the business request, traverse the business knowledge tree index based on the business request, and determine the target business node from the business nodes.

[0309] Based on the index mapping relationship, determine the target memory subgraph corresponding to the target business node from the memory subgraph.

[0310] Within the retrieval boundary of the target business node, the target memory subgraph is retrieved to obtain the target business memory and retrieval path.

[0311] Based on the target business memory, process the business request and obtain task feedback data.

[0312] Update the target memory subgraph based on task feedback data and retrieval path.

[0313] The retrieval boundary adjustment amount is determined based on the state data before and after the target memory subgraph is updated, and the retrieval boundary of the target business node is updated according to the retrieval boundary adjustment amount.

[0314] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0315] Obtain business memory data.

[0316] Based on business memory data, a business knowledge tree index containing business nodes and a semantic memory graph index containing memory subgraphs are constructed. An index mapping relationship between business nodes and memory subgraphs is established, and the retrieval boundaries of business nodes are determined according to the index mapping relationship and the state data of the memory subgraphs.

[0317] Obtain the business request, traverse the business knowledge tree index based on the business request, and determine the target business node from the business nodes.

[0318] Based on the index mapping relationship, determine the target memory subgraph corresponding to the target business node from the memory subgraph.

[0319] Within the retrieval boundary of the target business node, the target memory subgraph is retrieved to obtain the target business memory and retrieval path.

[0320] Based on the target business memory, process the business request and obtain task feedback data.

[0321] Update the target memory subgraph based on task feedback data and retrieval path.

[0322] The retrieval boundary adjustment amount is determined based on the state data before and after the target memory subgraph is updated, and the retrieval boundary of the target business node is updated according to the retrieval boundary adjustment amount.

[0323] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0324] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A two-layer dynamic index business memory management method, characterized in that, The method includes: Retrieve business memory data; Based on the business memory data, a business knowledge tree index containing business nodes and a semantic memory graph index containing memory subgraphs are constructed. An index mapping relationship between the business nodes and the memory subgraphs is established, and the retrieval boundary of the business nodes is determined according to the index mapping relationship and the state data of the memory subgraphs. Obtain the business request, traverse the business knowledge tree index according to the business request, and determine the target business node from the business nodes; Based on the index mapping relationship, the target memory subgraph corresponding to the target service node is determined from the memory subgraph; The target memory subgraph is retrieved within the retrieval boundary of the target service node to obtain the target service memory and retrieval path; The business request is processed according to the target business memory to obtain task feedback data; Update the target memory subgraph based on the task feedback data and the retrieval path; The retrieval boundary adjustment amount is determined based on the state data before and after the target memory subgraph is updated, and the retrieval boundary of the target business node is updated according to the retrieval boundary adjustment amount.

2. The two-layer dynamic indexing business memory management method according to claim 1, characterized in that, Determining the retrieval boundary of the business node based on the index mapping relationship and the state data of the memory subgraph includes: Based on the index mapping relationship, determine the memory subgraph corresponding to the business node, and determine the node level of the business node in the business knowledge tree index; The subgraph state feature value is determined based on the number of memory nodes, node relationship density, and update frequency in the memory subgraph. The retrieval resource allocation value is determined based on the node level and the subgraph state feature value; According to the retrieval resource allocation value, allocate graph retrieval resource quotas to the business nodes from the preset total retrieval resources; The threshold for the number of accesses to memory nodes and the threshold for the number of extension layers of node relationships are determined based on the resource quota for graph retrieval, and the threshold for the number of accesses to memory nodes and the threshold for the number of extension layers of node relationships are determined as the retrieval boundaries of the business nodes.

3. The dual-tier dynamic index business memory management method of claim 1, wherein, The step of retrieving the target memory subgraph within the retrieval boundary of the target service node to obtain the target service memory and retrieval path includes: The business request is subjected to feature extraction to obtain request semantic features; Based on the requested semantic features, the starting memory node is determined from the memory nodes of the target memory subgraph; Starting from the initial memory node, the process expands layer by layer along the node relationships in the target memory subgraph; During each layer of expansion, the path expansion value of the candidate memory node is determined based on the degree of matching between the candidate memory node and the semantic features of the request, the degree of association of the node relationship corresponding to the candidate memory node, and the current retrieval boundary occupancy. Candidate memory nodes whose path expansion values ​​meet the preset expansion conditions are added to the retrieval path, and the expansion continues layer by layer based on the candidate memory nodes added to the retrieval path until the current retrieval boundary occupancy meets the stopping condition corresponding to the retrieval boundary of the target service node, and the target service memory is determined according to the retrieval path.

4. The dual-tier dynamic index business memory management method of claim 1, wherein, Updating the target memory subgraph based on the task feedback data and the retrieval path includes: Feature extraction is performed on the task feedback data to obtain feedback features, feedback type, and feedback intensity; The feedback features are matched with memory nodes in the retrieval path, and memory nodes whose matching degree meets the preset feedback association conditions are determined as feedback associated memory nodes. Based on the path position of the memory node and node relationship in the retrieval path relative to the feedback associated memory node and the feedback intensity, the feedback contribution value of the memory node and the node relationship is determined respectively. Based on the feedback type and the feedback contribution value, determine the memory weight adjustment amount of the memory node and the relationship weight adjustment amount of the node relationship, respectively. Update the target memory subgraph according to the memory weight adjustment amount and the relationship weight adjustment amount.

5. The two-layer dynamic indexing business memory management method according to claim 1, characterized in that, The step of determining the retrieval boundary adjustment amount based on the state data before and after the target memory subgraph update, and updating the retrieval boundary of the target service node according to the retrieval boundary adjustment amount, includes: The state data before and after the target memory subgraph is updated are differentially processed to obtain state change data, which includes the state change direction and the state change magnitude. The mapping weight between the target business node and the target memory subgraph is determined based on the index mapping relationship; The magnitude of the state change is weighted according to the mapping weight to obtain the retrieval boundary adjustment magnitude, and the retrieval boundary adjustment direction is determined according to the direction of the state change. The search boundary adjustment amount is determined based on the search boundary adjustment range and the search boundary adjustment direction; Update the retrieval boundary of the target business node according to the retrieval boundary adjustment amount.

6. The two-layer dynamic indexing business memory management method according to claim 5, characterized in that, Updating the retrieval boundary of the target service node according to the retrieval boundary adjustment amount includes: From the business nodes, determine the superior business node that has a superior relationship with the target business node; Based on the index mapping relationship, determine the parent memory subgraph corresponding to the parent business node from the memory subgraph; The subgraph correlation degree is determined based on the degree of overlap of business memory data between the superior memory subgraph and the target memory subgraph. The boundary propagation adjustment amount is determined based on the retrieval boundary adjustment amount and the subgraph correlation degree; When the boundary propagation adjustment amount meets the preset propagation conditions, the retrieval boundary of the superior business node is updated according to the boundary propagation adjustment amount.

7. The dual-tier dynamic index business memory management method of claim 1, wherein, The method further includes: From the business memory data, determine the short-term business memory data that is not written to the semantic memory graph index and corresponds to the business request; The short-term business memory data is matched with the retrieval path to obtain the path support. The short-term business memory data is matched with the task feedback data to obtain the feedback consistency. The strength of memory evidence is determined based on the path support and the feedback consistency. When the strength of the memory evidence meets the preset migration conditions, the short-term business memory data is identified as long-term business memory data, and the long-term business memory data is written into the target memory subgraph.

8. A dual-tier dynamic index business memory management apparatus, characterized by, The dual-layer dynamic index service memory management device includes: The data acquisition module is used to acquire business memory data; The index building module is used to build a business knowledge tree index containing business nodes and a semantic memory graph index containing memory subgraphs based on the business memory data, establish an index mapping relationship between the business nodes and the memory subgraphs, and determine the retrieval boundary of the business nodes according to the index mapping relationship and the state data of the memory subgraphs. The node determination module is used to obtain a business request, traverse the business knowledge tree index according to the business request, and determine the target business node from the business nodes; The subgraph determination module is used to determine the target memory subgraph corresponding to the target service node from the memory subgraph according to the index mapping relationship; The memory retrieval module is used to retrieve the target memory subgraph within the retrieval boundary of the target business node to obtain the target business memory and retrieval path; The request processing module is used to process the business request according to the target business memory and obtain task feedback data; The subgraph update module is used to update the target memory subgraph based on the task feedback data and the retrieval path; The boundary update module is used to determine the retrieval boundary adjustment amount based on the state data before and after the target memory subgraph is updated, and update the retrieval boundary of the target business node according to the retrieval boundary adjustment amount.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the two-layer dynamic index business memory management method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the two-layer dynamic index business memory management method as described in any one of claims 1 to 7.