Diagnosis and reconstruction method and device for search structure mismatch and storage medium
Patent Information
- Application Number
- CN202611384620.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-10-09
AI Technical Summary
[0004]本申请实施例的目的是提供一种检索结构失配的诊断与重构方法、装置、存储介质及计算机产品,以解决现有技术在RAG系统响应基数不稳定时,无法在不依赖数值化评分函数的前提下精确定位检索结构相对于正常基线发生的失配变化的问题
[0015]本申请通过构建基线关系变换图并以双射映射存在性判定进行结构比较,无需依赖评分函数进行图搜索,从而避免了评分函数在基数不稳定场景下不可靠的问题,实现了对RAG系统检索结构失配的准确定位;通过将响应编码为变化方向符号,整个诊断过程仅依赖响应方向而非响应数值量级,因此在RAG系统因级联语义偏移导致响应基数不稳定的情况下仍能保持稳定的诊断性能;通过将结构失配边连接的节点构成的连通子图作为结构失配区域,能够输出具体地失配节点集合,为运维人员提供了可解释的故障定位结果;通过在模拟环境中评估候选替换子结构并选取失配边数量最少的方案进行部署,实现了从诊断到修复的闭环。
Smart Images

Figure CN122885032A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of artificial intelligence and computer software technology, and specifically to a method, apparatus, storage medium, and computer product for diagnosing and reconstructing retrieval structure mismatch. Background Technology
[0002] Retrieval-enhanced generation (RAG) systems provide external knowledge support to generative models through a retrieval module and have been widely used in scenarios such as intelligent question answering and enterprise knowledge base assistants. The retrieval process of a RAG system typically involves multiple retrieval nodes, such as query rewriting, dense retrieval, and reordering. There are data flow dependencies between nodes, and an anomaly in any node can cascade and cause a degrade in system performance.
[0003] Existing fault location methods mainly fall into two categories: one is Causal Root Cause Analysis (Causal RCA), which locates the root cause by calculating the numerical values of causal effects between nodes and sorting them by magnitude. However, it relies on numerical response magnitudes. When the response cardinality of the RAG system is unstable due to cascading semantic offsets, the response magnitude of the same intervention fluctuates unpredictably, and the sorting results become invalid. The other is Ordinal Causal Discovery (OrdCD), which searches for unknown causal structures in the candidate graph space through a scoring function. The scoring function itself is still a scalar calculation, which is also unreliable when the cardinality is unstable. It also faces the NP-hard (nondeterministic polynomial time) graph search problem. More importantly, it solves the problem of discovering structures from scratch, while the actual need in operation and maintenance scenarios is to detect whether known structures have changed. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, storage medium, and computer product for diagnosing and reconstructing retrieval structure mismatch, in order to solve the problem that the prior art cannot accurately locate the mismatch change of the retrieval structure relative to the normal baseline without relying on the numerical scoring function when the response base of the RAG system is unstable.
[0005] To achieve the above objectives, this application provides a method for diagnosing and reconstructing retrieval structure mismatch, the method comprising: A baseline relationship transformation graph is constructed, with retrieval nodes in the retrieval enhancement generation system as vertices and ordinal relationship transformations between nodes as directed edges. Ordinal relationship transformations are obtained by applying offset interventions to nodes and encoding responses. The encoding is as follows: the direction of change or no significant response of each retrieval node's response to each offset in each dimension of the preset prompt set is encoded as a symbol to obtain the response pattern of each retrieval node under each offset. For node pairs with data flow relationships, the set of ordinal relationship transformations of the response pattern pairs of upstream and downstream nodes under the same offset is used. If the system feedback score is less than a preset threshold, the current relationship transformation graph is constructed using the same intervention and coding methods as those used to construct the baseline relationship transformation graph. For each directed edge in the baseline relationship transformation graph and its corresponding directed edge in the current relationship transformation graph, a bijective mapping existence determination is performed. If there is no one-to-one mapping relationship between the two corresponding relationship transformation sets, the directed edge is marked as a structural mismatch edge. Extract the maximally connected subgraph formed by nodes connected by structural mismatch edges in the current relation transformation graph as the structural mismatch region; For structural mismatch regions, at least one candidate replacement substructure is generated. In the simulation environment, a candidate relationship transformation graph is constructed for each candidate replacement substructure. The matching degree between each candidate replacement substructure and the baseline relationship transformation graph is evaluated by the number of structural mismatch edges between the candidate relationship transformation graph and the baseline relationship transformation graph. The candidate replacement substructure with the fewest structural mismatch edges is selected as the optimal candidate replacement substructure and deployed to the retrieval enhancement generation system.
[0006] In this embodiment, the existence determination of bijective mapping is performed on each directed edge in the baseline relationship transformation graph and its corresponding directed edge in the current relationship transformation graph. This includes: for each node pair with a corresponding relationship, obtaining the current relationship transformation set of the node pair in the current relationship transformation graph and the baseline relationship transformation set of the node pair in the baseline relationship transformation graph; determining whether the number of elements in the current relationship transformation set and the baseline relationship transformation set are equal; if the number of elements is not equal, determining that the directed edge corresponding to the node pair is a structural mismatch edge; if the number of elements is equal, determining whether each response pattern sequence pair in the current relationship transformation set can find a response pattern sequence pair with completely identical element level in the baseline relationship transformation set; if any response pattern sequence pair cannot find a corresponding one, determining that the directed edge corresponding to the node pair is a structural mismatch edge; if all response pattern sequence pairs can find a corresponding one, determining that the directed edge corresponding to the node pair is bijectively equivalent.
[0007] In this embodiment of the application, for a structural mismatch region, generating at least one candidate replacement substructure includes: pruning the structural mismatch region by removing mismatched edges in the structural mismatch region and reconnecting nodes disconnected due to the removal of mismatched edges to nodes outside the structural mismatch region; or, inserting a new retrieval node into the structural mismatch region; or, replacing the structural mismatch region by rolling back the structural mismatch region to a historical version of the corresponding region in the baseline relationship transformation graph; the candidate replacement substructure is obtained by at least one of pruning, insertion, or replacement.
[0008] In this embodiment, constructing a baseline relationship transformation graph includes: applying each offset intervention from a preset offset set to each retrieval node, obtaining the response of each retrieval node to each dimension of the preset prompt set at each offset; determining responses where the absolute value of the change in response at each dimension exceeds the corresponding threshold as significant responses, and determining responses where the absolute value does not exceed the corresponding threshold as no significant responses; encoding the direction of change of significant responses as a first symbol and no significant responses as a second symbol to obtain the response pattern of each retrieval node at each offset; for upstream and downstream nodes with data flow relationships, forming response pattern pairs with the response patterns of the upstream node and the downstream node at the same offset, and using the set of response pattern pairs as the ordinal relationship transformation from the upstream node to the downstream node; constructing a baseline relationship transformation graph with retrieval nodes as vertices and ordinal relationship transformations as directed edges.
[0009] In this embodiment, the direction of change or lack of significant response of each retrieval node to each offset in each dimension of the preset prompt set is encoded as a symbol, including: obtaining the union of the effective dimensions determined by the threshold in all retrieval nodes under each offset, as the global effective dimension set; for the response of each retrieval node under each offset, in each dimension of the global effective dimension set, the direction of change of the dimension with the absolute value of the response change greater than the corresponding threshold is encoded as +1 or -1; the dimension with the absolute value of the response change less than or equal to the corresponding threshold is encoded as 0.
[0010] In this embodiment of the application, the diagnosis and reconstruction method further includes: in the deployed retrieval enhancement generation system, constructing a reconstructed relation transformation graph using the same intervention and encoding method as the construction of the baseline relation transformation graph; and confirming successful reconstruction when the ratio of the number of structural mismatch edges in the structural mismatch region to the number of structural mismatch edges in the structural mismatch region before reconstruction is less than or equal to a preset ratio, and the improvement of the system feedback score compared to before reconstruction is greater than or equal to a preset magnitude.
[0011] In this embodiment of the application, the degree of matching between each candidate replacement substructure and the baseline relationship transformation diagram is evaluated by the number of structural mismatch edges between the candidate relationship transformation diagram and the baseline relationship transformation diagram. This includes: calculating the number of structural mismatch edges between each candidate relationship transformation diagram and the baseline relationship transformation diagram in the structural mismatch region; using the number of structural mismatch edges as a measure of the degree of matching between each candidate replacement substructure and the baseline relationship transformation diagram, with fewer structural mismatch edges indicating a higher degree of matching.
[0012] A second aspect of this application provides a diagnostic and reconstruction apparatus for retrieval structure mismatch, the apparatus comprising: The memory is configured to store instructions; and The processor is configured to execute diagnostic and refactoring methods according to any of the above.
[0013] A third aspect of this application provides a machine-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform a diagnostic and reconfiguration method according to any one of the preceding claims.
[0014] A fourth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the diagnostic and refactoring method according to any one of the above.
[0015] This application constructs a baseline relationship transformation graph and performs structural comparison using bijective mapping existence determination, eliminating the need for graph search based on a scoring function. This avoids the unreliability of scoring functions in scenarios with unstable cardinality, enabling accurate localization of structural mismatches in the RAG system. By encoding responses as change direction symbols, the entire diagnostic process relies solely on the response direction rather than the response numerical magnitude, thus maintaining stable diagnostic performance even when the RAG system experiences unstable response cardinality due to cascaded semantic offsets. By using the connected subgraph formed by nodes connected by structural mismatch edges as the structural mismatch region, it can output a specific set of mismatched nodes, providing interpretable fault location results for maintenance personnel. By evaluating candidate replacement substructures in a simulation environment and selecting the scheme with the fewest mismatched edges for deployment, a closed loop from diagnosis to repair is achieved.
[0016] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0017] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings: Figure 1The illustration shows a flowchart of a retrieval structure mismatch diagnosis and reconstruction method according to an embodiment of this application; Figure 2 This illustration schematically shows a relationship transformation diagram and a schematic diagram of structural mismatch region identification according to an embodiment of this application; Figure 3 A schematic diagram illustrating the structural reconstruction and verification process according to an embodiment of this application is provided. Detailed Implementation
[0018] The specific implementation methods of the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific implementation methods described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application.
[0019] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0020] In one embodiment of this application, a flowchart illustrating a method for diagnosing and reconstructing retrieval structure mismatch is provided, as follows: Figure 1 As shown, it includes: Step 101: Construct a baseline relationship transformation graph. The baseline relationship transformation graph uses the retrieval nodes in the retrieval enhancement generation system as vertices and the ordinal relationship transformations between nodes as directed edges. The ordinal relationship transformation is obtained by applying offset intervention to the nodes and encoding the response to obtain symbols. The encoding is as follows: the direction of change or no significant response of each retrieval node's response to each offset in each dimension of the preset prompt set is encoded as a symbol to obtain the response pattern of each retrieval node under each offset. For node pairs with data flow relationships, the set of ordinal relationship transformations of the response pattern pairs of upstream and downstream nodes under the same offset is taken as the ordinal relationship transformation.
[0021] In this embodiment, constructing a baseline relationship transformation graph includes: applying each offset intervention from a preset offset set to each retrieval node, obtaining the response of each retrieval node to each dimension of the preset prompt set at each offset; determining responses where the absolute value of the change in response at each dimension exceeds the corresponding threshold as significant responses, and determining responses where the absolute value does not exceed the corresponding threshold as no significant responses; encoding the direction of change of significant responses as a first symbol and no significant responses as a second symbol to obtain the response pattern of each retrieval node at each offset; for upstream and downstream nodes with data flow relationships, forming response pattern pairs with the response patterns of the upstream node and the downstream node at the same offset, and using the set of response pattern pairs as the ordinal relationship transformation from the upstream node to the downstream node; constructing a baseline relationship transformation graph with retrieval nodes as vertices and ordinal relationship transformations as directed edges.
[0022] The direction of change or lack of significant response of each retrieval node to each offset in each dimension of the preset prompt set is encoded as a symbol, including: obtaining the union of the effective dimensions determined by the threshold in all retrieval nodes under each offset, as the global effective dimension set; for the response of each retrieval node under each offset, in each dimension of the global effective dimension set, the direction of change of the dimension with the absolute value of the response change greater than the corresponding threshold is encoded as +1 or -1; the dimension with the absolute value of the response change less than or equal to the corresponding threshold is encoded as 0.
[0023] In a RAG system, a retrieval node refers to a retrieval, sorting, or filtering operation module with an independent executable unit in the retrieval process, such as a query rewrite node, sparse retrieval node, dense retrieval node, reordering node, or fusion node. These nodes have data flow dependencies: the output of an upstream node serves as the input of a downstream node. When a node changes its behavior due to version updates, parameter drift, or changes in external data distribution, its response change will cascade along the data flow direction, ultimately resulting in a decline in overall system performance.
[0024] To detect this structural mismatch, a baseline relationship transformation graph reflecting the ordinal dependencies between nodes under healthy system conditions needs to be constructed. This application's embodiment employs an intervention approach to actively acquire response transmission patterns between nodes: each retrieval node is subjected to an offset intervention from a preset offset set Δ. Offset intervention refers to actively adjusting the runtime parameters of a retrieval node to cause a controllable shift in its output. The value range of the offset Δ is preferably {+0.1σ, -0.1σ, +0.3σ}, where σ is the historical standard deviation of the node's parameters under normal operating conditions. Bidirectional offsets (positive and negative) can detect the symmetrical response characteristics of nodes to parameter changes, while the larger +0.3σ is used to stimulate potential symbolic response pattern diversity.
[0025] After intervention, the response of each node needs to be measured. This application embodiment pre-defines a set Q containing 15 prompts, which are categorized into five types based on retrieval intent: exact fact queries, multi-hop inference queries, comparison queries, fuzzy intent queries, and negative / counterfactual queries, with three prompts in each category, covering common semantic domains in RAG systems. For each retrieval node at each offset, the change in its perplexity level (ppl) or retrieval score is recorded across each dimension of the pre-define prompt set Q, forming a multi-dimensional response vector.
[0026] Because the response of a RAG system inherently contains noise, such as the randomness of the generative model and minor fluctuations in the retrieval results, not all changes in the response represent meaningful signals. Therefore, this application embodiment performs multiple rounds of independent measurements on each cue dimension to calculate the noise distribution of the response changes for each dimension. A normality test is performed on the noise distribution for each dimension. If the test passes, a threshold of 2σ is set; otherwise, a non-parametric method is used, selecting an empirical quantile that ensures a false positive rate of no more than 5% as the threshold.
[0027] For multiple tests consisting of 15 cue dimensions, it is necessary to control the phylogenetic error rate. This application employs the Holm-Bonferroni stepwise correction method in its embodiments.
[0028] For each prompt, the normality of its ΔPPL (change in perplexity) distribution was determined using the Shapiro-Wilk test. For prompts that passed, a one-sample t-test was used to calculate the p-value; for prompts that failed, a Wilcoxon signed-rank test was used. The p-values of the 15 prompts were sorted in ascending order, and comparisons were made sequentially starting with the smallest p-value. The significance threshold corresponding to the i-th smallest p-value was adjusted to [value missing]. , where α = 0.05; if p(i) ≤ If the p-value is positive, the prompt is statistically significant; otherwise, the prompt and all subsequent prompts with larger p-values are considered to have no significant response. Dimensions that remain significant after Holm correction are then used for subsequent threshold calculations to further determine which specific dimensions produce significant responses and are encoded as symbols. This correction process is performed after the normality test.
[0029] Significant response changes are encoded as a first symbol (+1 indicates a positive change, with the response increasing; -1 indicates a negative change, with the response decreasing), while no significant response is encoded as a second symbol (0). It should be noted that the effective dimensions determined by the threshold may differ at different offsets in this embodiment. Therefore, during encoding, the union of the effective dimensions determined by the threshold across all search nodes at all offsets is first obtained as the global effective dimension set. The response at each search node at each offset is then uniformly encoded on this global effective dimension set, with previously filtered dimensions filled with 0. This ensures that the vector lengths of all response patterns are consistent, providing a basis for dimension alignment for subsequent bijective determination.
[0030] After the above encoding, each retrieval node obtains a symbol vector, i.e., the response pattern P, at each offset. ,δ), this response pattern reflects the node The response direction features along each semantic dimension at the offset δ. Subsequently, for upstream nodes with data flow relationships... and downstream nodes The response patterns of the upstream node and the downstream node at the same offset form a response pattern pair (P( ,δ),P( ,δ)), and group all response pattern pairs under all offsets into a set, which serves as the ordinal relationship transformation T(i→j) from the upstream node to the downstream node. This ordinal relationship transformation characterizes the response pattern pairs from the upstream node to the downstream node. How does the change in response mode propagate to downstream nodes when a parameter offset occurs? The ordinal transitivity rule is followed. It is important to emphasize that this transformation only records the correspondence in response direction, not the response magnitude. To ensure the reliability of the baseline, multiple rounds of independent measurement are performed on each constructed relation transformation. Only when a bijective correspondence can be established between the sets of relation transformations obtained from consecutive rounds of measurement (i.e., the elements of the sets are completely identical) is it included in the baseline relation transformation graph as a stable relation transformation. If the ratio of the number of stable relation transformations to the total number of relation transformations is lower than a preset threshold, an insufficient confidence warning is triggered, indicating to maintenance personnel that the current baseline confidence is insufficient.
[0031] Finally, using all retrieved nodes as vertices and the ordinal relation transformations verified by stability as directed edges, a discrete, pure topological structure graph without any numerical weights is constructed, namely the baseline relation transformation graph (e.g., ...). Figure 2As shown in Figure a), this serves as a reference benchmark for subsequent structural mismatch diagnosis. Since the figure only contains discrete symbolic relationships, its integrity and consistency are not affected by response magnitude disturbances. This baseline relationship transformation diagram is constructed under normal system operation conditions and can be periodically recalibrated or triggered when performance continues to decline through a baseline aging detection mechanism to combat baseline obsolescence caused by progressive drift in data distribution.
[0032] Step 102: If the system feedback score is less than the preset threshold, construct the current relationship transformation graph using the same intervention and coding method as the baseline relationship transformation graph.
[0033] During the actual operation of the RAG system, system performance changes over time. To monitor the system status in real time, this application embodiment introduces a feedback scoring mechanism to quantify the system's service quality.
[0034] The system feedback score is used to comprehensively evaluate the performance of the RAG system in its current operating state. In this embodiment, the feedback score is preferably obtained by weighting three factors: task success rate, generation quality score, and user feedback score. The task success rate, based on a preset evaluation set, judges whether the search results meet the query intent, reflecting the system's ability to complete basic search tasks. The generation quality score can be the geometric mean of the faithfulness and answer relevance scores in the RAGAS framework, which is more sensitive to extreme low values of either indicator and can more quickly capture changes in generation quality. The user feedback score collects explicit evaluations of the system's answers from actual users. When the number of user feedbacks is sparse, such as fewer than 10 feedbacks in the past hour, their weight is proportionally reduced, and the released weight is allocated to the task success rate and generation quality score in the original proportion, ensuring that the feedback score still has stable statistical significance in cold start or low-traffic scenarios.
[0035] When determining the diagnostic trigger conditions, the preset threshold is not a fixed value. This application's embodiment preferably adopts a dynamic threshold scheme: the preset threshold is set to the lower bound of 2σ of the average feedback score when the system is running normally, i.e. ,in Indicates the preset threshold. and Based on the sample mean and standard deviation estimates of the feedback scores over the past 30 days under normal system operation, the choice of 2σ corresponds to covering approximately 95% of the normal fluctuation range under the normality assumption.
[0036] In one embodiment of this application, taking a typical RAG system containing four nodes—query rewriting, sparse retrieval, dense retrieval, and reordering—as an example, experimental data shows that the average normal operation feedback score is 0.78, and the standard deviation is 0.09. Therefore, μ-2σ=0.78-0.18=0.60. 0.60 is only used as a default conservative threshold in the early stages of system operation or when historical data is unavailable. After the system has been running for 30 days, it is adaptively updated to a dynamic value based on actual operating data.
[0037] When the system feedback score is detected to be lower than the preset threshold θ, it means that the overall system performance has deviated from the normal fluctuation range and structural degradation may have occurred. At this time, the system automatically triggers the diagnostic process, adopting the same intervention operation and encoding method as when constructing the baseline relationship transformation graph, and re-executes the measurement in the system currently suspected of failure: applying the same preset offset set Δ to each retrieval node, recording the response of each dimension on the same preset prompt set Q, and obtaining the response pattern of each retrieval node in the current state through the same threshold judgment, global effective dimension alignment and symbol encoding, and then constructing the ordinal relationship transformation of the current state for node pairs with data flow relationships, finally forming the current relationship transformation graph.
[0038] It is important to emphasize that the embodiments of this application construct the current relation transformation graph in the exact same way as the baseline relation transformation graph, ensuring that the baseline relation transformation graph and the current relation transformation graph are strictly aligned in terms of data structure, encoding rules, and semantic dimensions. This provides a comparable basis for performing the existence determination of the one-to-one bijective mapping in subsequent steps. Furthermore, since the construction process does not involve the calculation of any scoring function, the construction of the current relation transformation graph can still be completed stably even in an environment with unstable cardinality.
[0039] Step 103: Perform a bijective mapping existence determination on each directed edge in the baseline relationship transformation graph and the corresponding directed edge in the current relationship transformation graph. If there is no one-to-one mapping relationship between the two corresponding relationship transformation sets, mark the directed edge as a structural mismatch edge.
[0040] In this embodiment, the existence determination of bijective mapping is performed on each directed edge in the baseline relationship transformation graph and its corresponding directed edge in the current relationship transformation graph. This includes: for each node pair with a corresponding relationship, obtaining the current relationship transformation set of the node pair in the current relationship transformation graph and the baseline relationship transformation set of the node pair in the baseline relationship transformation graph; determining whether the number of elements in the current relationship transformation set and the baseline relationship transformation set are equal; if the number of elements is not equal, determining that the directed edge corresponding to the node pair is a structural mismatch edge; if the number of elements is equal, determining whether each response pattern sequence pair in the current relationship transformation set can find a response pattern sequence pair with completely identical element level in the baseline relationship transformation set; if any response pattern sequence pair cannot find a corresponding one, determining that the directed edge corresponding to the node pair is a structural mismatch edge; if all response pattern sequence pairs can find a corresponding one, determining that the directed edge corresponding to the node pair is bijectively equivalent.
[0041] After constructing the current relation transformation graph in step 102, this application needs to perform a structural comparison between the current relation transformation graph and the baseline relation transformation graph to diagnose whether a mismatch has occurred in the retrieval structure. Through bijective mapping existence determination, the relationship transformation between each pair of nodes is checked one by one to ensure it remains consistent with the baseline.
[0042] The physical meaning of this determination is: if the upstream node to downstream nodes The ordinal propagation rule is completely consistent between the baseline and the current state, that is, under all offsets, response patterns and If the correspondence between the response patterns can be matched one-to-one, it means that the structural dependency between nodes has not changed; conversely, if the correspondence is mismatched, it means that the retrieval structure relationship represented by the directed edge has been mismatched.
[0043] Specifically, for each node pair with a corresponding relationship (i.e., the node pair exists in both the baseline and the current relationship transformation graph), the current relationship transformation set A of the node pair in the current relationship transformation graph and the baseline relationship transformation set B of the node pair in the baseline relationship transformation graph are obtained. It should be noted that the connected subgraph formed by nodes connected by mismatched edges in the current relationship transformation graph will be extracted as structural mismatch regions in subsequent steps, but this step still performs a step-by-step evaluation of all edges in the entire graph.
[0044] To determine whether the number of elements in the current relation transformation set A is equal to the number of elements in the baseline relation transformation set B, in set theory, a bijection exists only if the two sets have the same cardinality. Therefore, if the number of elements is not equal, there must be no one-to-one mapping between the two relation transformation sets. In this case, the directed edge corresponding to the node is directly determined to be a structural mismatch edge.
[0045] If the number of elements is equal, then proceed to element-level matching: determine whether each response pattern pair in the current relation transformation set A can find an element-level identical response pattern pair in the baseline relation transformation set B. Here, the response pattern pair includes a sequence pair of the form (P( ,δ),P( ,δ)), which refers to the pairing of upstream and downstream node response patterns under the same offset δ. Element-level complete identity means that the corresponding elements of the two response pattern pairs are completely identical dimension-wise across the globally valid dimension set. For example, if the response pattern pair in the current relation transformation graph is ((+1,-1,0),(-1,+1,+1)), then there must exist an identical response pattern pair in the baseline relation transformation graph.
[0046] If any response pattern pair in the current relation transformation set A cannot be found in the baseline relation transformation set B, then the directed edge corresponding to that node pair is determined to be a structural mismatch edge; if all response pattern pairs can be found, then the directed edge corresponding to that node pair is determined to be bijective equivalence, that is, the ordinal transitivity of that node pair is consistent with the baseline.
[0047] Using the above method, this application can accurately mark directed edges that cannot pass the bijective decision as structurally mismatched edges. The entire decision process is a deterministic set operation with a computational complexity of only O(|Δ|²), without relying on any scoring function. Therefore, it fundamentally avoids the NP-hard problem of graph search and has natural robustness to unstable response cardinality.
[0048] Step 104: Extract the maximally connected subgraph formed by nodes connected by structural mismatch edges in the current relation transformation graph as the structural mismatch region.
[0049] In step 103, through the existence determination of bijective mapping, all directed edges in the current relational transformation graph that fail the determination are marked as structural mismatch edges. These mismatch edges may be discretely distributed in the graph, or they may be connected to form local regions. For maintenance personnel, the information of a single mismatch edge is fragmented and difficult to directly guide troubleshooting operations.
[0050] Therefore, this application embodiment constructs a connected subgraph containing the mismatch edge to provide more complete contextual information. In the current relational transformation graph, the structural mismatch edge serves as a connection, linking different retrieval nodes together. This application extracts all nodes connected by one or more structural mismatch edges in the current relational transformation graph, and defines the connected subgraph formed by these nodes and the structural mismatch edges between them as the structural mismatch region. Here, connectivity means, in a graph theory sense, that there exists a path formed by structural mismatch edges between any two nodes in the subgraph, enabling them to reach each other; simultaneously, the connected subgraph is maximal, meaning that no structural mismatch edge can connect the subgraph to any other node in the current relational transformation graph, and each structural mismatch region is the maximum connected component formed by mismatch edges.
[0051] In one embodiment, assume the current relational transformation graph is as follows: Figure 2 As shown in Figure b, the graph contains nodes N1 to N6, where edges N2→N3, N2→N5, and N3→N5 are marked as mismatched edges, while node N6 has no mismatched edges pointing to the other nodes. A structural mismatch region is extracted, and this connected subgraph contains nodes {N2, N3, N5} and the mismatched edges N2→N3, N2→N5, and N3→N5 between them. It should be noted that the dashed boxes in the attached figure are schematic diagrams of the structural mismatch region. The nodes covered by these boxes are not equivalent to the mismatched connected subgraph extracted by the algorithm; the mismatched connected subgraph consists only of nodes connected by mismatched edges. Nodes N1, N4, and N6 do not belong to the structural mismatched connected subgraph. Although there are ordinary edges between N1, N4 and nodes inside the mismatched region, such as N1→N2, N4→N5, and there are also ordinary edges between N3 and N6, these edges are bijective equivalent ordinary edges and do not participate in the connectivity determination of the mismatched connected subgraph. Therefore, the corresponding nodes N1, N4, and N6 are not included in the structural mismatched connected subgraph.
[0052] It should be noted that the structural mismatch region is a connected subgraph, which may contain both mismatched edges and bijectively equivalent normal edges. Taking the mismatch region {N2, N3, N5} in this embodiment as an example, N2→N3, N2→N5, and N3→N5 are mismatched edges within this region. Other bijectively equivalent normal edges may also exist within the region, as well as bijectively equivalent normal edges pointing from nodes inside the region to nodes outside the region. This application includes normal edges in the mismatch region to ensure that, during the topology reconstruction phase, the system can comprehensively evaluate feasible solutions for restoring the baseline behavior pattern of the region through topology repair operations such as pruning, insertion, and replacement, based on the complete topology structure of the mismatch region, rather than only performing local repairs on a single isolated mismatched edge. This improves the effectiveness and feasibility of the topology reconstruction solution.
[0053] Through the processing in step 104, this application transforms the diagnostic results from an abstract set of mismatched edges into an intuitive set of mismatched nodes. The final output structural mismatch region can provide accurate fault location information for operation and maintenance personnel or adaptive reconfiguration modules, and has good interpretability.
[0054] Step 105: For the structural mismatch region, generate at least one candidate replacement substructure. In the simulation environment, construct a candidate relationship transformation graph for each candidate replacement substructure. Evaluate the matching degree between each candidate replacement substructure and the baseline relationship transformation graph by the number of structural mismatch edges between the candidate relationship transformation graph and the baseline relationship transformation graph. Select the candidate replacement substructure with the fewest structural mismatch edges as the optimal candidate replacement substructure and deploy it to the retrieval enhancement generation system.
[0055] In this embodiment of the application, for a structural mismatch region, generating at least one candidate replacement substructure includes: pruning the structural mismatch region by removing mismatched edges in the structural mismatch region and reconnecting nodes disconnected due to the removal of mismatched edges to nodes outside the structural mismatch region; or, inserting a new retrieval node into the structural mismatch region; or, replacing the structural mismatch region by rolling back the structural mismatch region to a historical version of the corresponding region in the baseline relationship transformation graph; the candidate replacement substructure is obtained by at least one of pruning, insertion, or replacement.
[0056] The matching degree between each candidate replacement substructure and the baseline relationship transformation diagram is evaluated by the number of structural mismatch edges between the candidate relationship transformation diagram and the baseline relationship transformation diagram. This includes: calculating the number of structural mismatch edges in the structural mismatch region of each candidate relationship transformation diagram and the baseline relationship transformation diagram respectively; using the number of structural mismatch edges as a measure of the matching degree between each candidate replacement substructure and the baseline relationship transformation diagram, with fewer structural mismatch edges indicating a higher matching degree.
[0057] like Figure 3 As shown in the figure, this application provides a flowchart for structural reconstruction and verification. Specifically, for each identified structural mismatch region, this application generates at least one candidate replacement substructure, wherein the generation strategy for the candidate replacement substructure includes three basic operations: pruning, insertion, and replacement.
[0058] Pruning refers to topological simplification of structurally mismatched regions, removing mismatched edges from the region, and reconnecting nodes disconnected due to edge removal to normal nodes outside the structurally mismatched region. Its core lies in selecting suitable target nodes for reconnection. This application calculates the similarity between nodes based on the extended vector representation of response patterns: [The text abruptly ends here, likely due to an incomplete sentence or missing information.] The symbolic response at each offset is used as an independent feature dimension to construct an extended vector matrix V( The dimension of the matrix is |Δ|×|Dglobal|, where Dglobal refers to the union of the effective dimensions that pass the threshold judgment among all search nodes at all offsets during the encoding stage. |Dglobal| is the total number of dimensions in this set, i.e., the number of all effective dimensions. The similarity between two nodes is calculated using the Hamming distance complement of the extended vector matrix over all elements, i.e., the proportion of the number of identical elements between the two matrices to the total number of elements. The normal region node with the highest similarity to the response pattern of the node to be reconnected and topologically reachable is selected as the reconnection target. If the similarity of all reachable candidate nodes is lower than the set threshold (preferably 0.4), the pruning strategy is abandoned, and a structure replacement rollback operation is directly performed on the edge, because when the similarity is too low, the probability of the reconnected structure passing the subsequent bijective judgment is significantly reduced.
[0059] Insertion operation refers to introducing new retrieval nodes into a structural mismatch region to compensate for the functional defects of the original structure. The core of the insertion operation lies in determining the optimal insertion position. This application determines the insertion point through betweenness centrality (BC), and the calculation range is limited to the weakly connected components within the mismatch region. If the mismatch region consists of multiple connected components, the insertion point is calculated independently for each connected component, and the edge with the highest BC value for that component is selected as the insertion point. If the number of nodes in the mismatch region is small, and the betweenness centrality of all nodes is 0, the insertion point is selected as the output edge of the upstream node of the mismatch region. The insertion module is selected from the lightweight processing operators registered in the RAG system, with priority given to operators compatible with the upstream and downstream interfaces of the mismatch region.
[0060] The replacement operation refers to rolling back the entire mismatched substructure to a historically stable version of the corresponding region in the baseline relationship transformation graph. A historically stable version is defined as a topological snapshot taken during the baseline bootstrapping phase when all edges in the region were at high confidence for the last time. If the region never reached this high-confidence state during the baseline bootstrapping phase, the rollback target is downgraded to the original topology measured during the first measurement in the baseline construction phase, and the rollback scope is limited to the set of nodes directly connected by the mismatched edges.
[0061] By combining the three basic strategies described above, this application can generate a variety of candidate replacement substructures. Preferably, this embodiment generates five candidates (K=5) to cover five strategies: pruning, insertion, replacement, pruning + insertion, and pruning + replacement, thus balancing the diversity of candidate solutions with evaluation efficiency.
[0062] After generating candidate replacement substructures, this application does not directly deploy them to the production environment, but performs offline evaluation in a simulation environment.
[0063] In this embodiment, the simulation environment is constructed as follows: candidate replacement substructures are deployed in an isolated shadow environment; measurements are performed using the same intervention operation as in step 101 for constructing the baseline relationship transformation diagram; and candidate relationship transformation diagrams corresponding to each candidate replacement substructure are constructed using the same encoding method. The simulation environment is resource-isolated from the production environment to ensure that the evaluation process does not affect online services.
[0064] The core metric for evaluating the matching degree between candidate replacement substructures and the baseline relationship transformation graph is the number of structural mismatch edges. Specifically, the number of structural mismatch edges in the structural mismatch region is calculated for each candidate relationship transformation graph and the baseline relationship transformation graph. This involves performing a bijective mapping existence check on each directed edge in the candidate relationship transformation graph and its corresponding directed edge in the baseline relationship transformation graph, and counting the number of edges that fail the check. This number of structural mismatch edges is used as a measure of the matching degree; a lower number of mismatch edges indicates a higher degree of matching between the candidate replacement substructure and the baseline behavior pattern.
[0065] Based on the above evaluation results, this application selects the candidate replacement substructure with the fewest structural mismatch edges as the optimal candidate replacement substructure and deploys it into the retrieval enhancement generation system. During deployment, this application preferably connects the old and new structures through a linear fusion method: Output = α·Noriginal + (1-α)·Nreplacement, where Output represents the final output result after fusion, Noriginal represents the output of the corresponding node in the original retrieval substructure corresponding to the structural mismatch region in the retrieval enhancement generation system before deploying the optimal candidate replacement substructure, Nreplacement represents the output of the corresponding node in the candidate replacement substructure, and α is uniformly selected from {0, 0.25, 0.5, 0.75, 1.0} to balance the preservation of functionality and the repair effect.
[0066] Through the above methods, this application achieves a self-healing search process without human intervention. Candidate solutions are evaluated and verified in an isolated simulation environment, without affecting online services in the production environment; after selecting the optimal solution, it is deployed to the production environment, thus completing a complete closed loop from diagnosis to repair.
[0067] In this embodiment of the application, the diagnosis and reconstruction method further includes: in the deployed retrieval enhancement generation system, constructing a reconstructed relation transformation graph using the same intervention and encoding method as the construction of the baseline relation transformation graph; and confirming successful reconstruction when the ratio of the number of structural mismatch edges in the structural mismatch region to the number of structural mismatch edges in the structural mismatch region before reconstruction is less than or equal to a preset ratio, and the improvement of the system feedback score compared to before reconstruction is greater than or equal to a preset magnitude.
[0068] In this embodiment of the application, the preset ratio is a positive number less than 1.
[0069] Through the above steps, this application selected the optimal candidate replacement substructure and deployed it to the RAG system, completing the structural repair. However, due to the differences between the simulation environment and the production environment, the solution evaluated as optimal in the simulation environment may not achieve the expected repair effect after deployment to the production environment. Therefore, this application includes a reconstruction verification step after deployment. By re-performing intervention measurements on the repaired system, the reconstruction effect is quantitatively verified from both structural and functional dimensions to ensure that the repair is indeed effective.
[0070] Specifically, after deploying the optimal candidate replacement substructure to the retrieval enhancement generation system, this application, in a new running session, employs the exact same intervention operations and encoding methods as in step 101 for constructing the baseline relationship transformation graph, to perform intervention measurements on the deployed system and construct the reconstructed relationship transformation graph. This construction process is consistent with the baseline construction process in step 101: each retrieval node is subjected to offset interventions, and its response changes in each dimension of the preset prompt set are recorded. These changes are then encoded into symbol vectors through threshold determination and global effective dimension alignment to obtain the response pattern. For node pairs with data flow relationships, the set of order pairs of response patterns between upstream and downstream nodes under the same offset is used as the ordinal relationship transformation. Finally, the reconstructed relationship transformation graph is constructed using all retrieval nodes as vertices and the ordinal relationship transformation as directed edges.
[0071] After obtaining the reconstructed relational transformation diagram, this application compares it with the baseline relational transformation diagram. The reconstruction verification adopts a dual judgment criterion of both structural and functional dimensions.
[0072] In terms of structure, the number of mismatched edges marked within the original structural mismatch region in the reconstructed relational transformation graph is divided by the number of mismatched edges before reconstruction to obtain the proportion of mismatched edges. If this proportion is less than or equal to a preset proportion, it indicates that the structural recovery has reached the expected level.
[0073] In terms of functionality, the improvement of the system feedback score compared to before the reconstruction is calculated. The system feedback score is a quantitative indicator that comprehensively reflects the system service quality. It is preferably obtained by weighting the task success rate, the generated quality score, and the user feedback score. If the improvement is greater than or equal to the preset range, it indicates that the function has been restored to the expected level.
[0074] When both of the above conditions are met, this application confirms successful refactoring. If only the structural condition is met but the functional condition is not, it is considered partially successful, and the system continues to monitor but does not trigger a rollback; if neither condition is met, the refactoring is considered invalid, and a rollback to the stable structure before deployment is triggered.
[0075] This application transforms the diagnostic problem from structure learning to structure comparison by constructing a baseline relationship transformation graph and using bijective mapping existence determination for structural comparison. This avoids the NP-hard problem of graph search by eliminating the need for a scoring function. Since only the sign of the response change direction is used as the diagnostic criterion, it is unaffected by fluctuations in the response magnitude and maintains stable diagnosis even in scenarios with unstable cardinality. By extracting connected subgraphs connected by mismatched edges as mismatched regions, the output is a specific set of mismatched nodes, providing strong interpretability. Finally, by simulating the environment to evaluate candidate replacement substructures and selecting the scheme with the fewest mismatched edges, a complete closed loop from diagnosis to repair is achieved.
[0076] This application also provides a diagnostic and reconstruction apparatus for retrieval structure mismatch, the diagnostic and reconstruction apparatus comprising: a memory configured to store instructions; and a processor configured to execute a diagnostic and reconstruction method according to any one of the above.
[0077] This application also provides a machine-readable storage medium storing instructions that, when executed by a processor, cause the processor to be configured to perform the diagnostic and refactoring method according to any one of the claims.
[0078] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the diagnostic and refactoring method according to any one of the above.
[0079] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0080] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0081] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0082] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0083] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0084] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0085] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0086] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0087] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for diagnosing and reconstructing retrieval structure mismatch, characterized in that, The diagnostic and reconstruction methods include: A baseline relationship transformation graph is constructed, wherein the retrieval nodes in the retrieval enhancement generation system are used as vertices, and the ordinal relationship transformations between nodes are used as directed edges. The ordinal relationship transformation is obtained by applying offset intervention to the nodes and encoding the response to obtain symbols. The encoding is as follows: the direction of change or no significant response of each retrieval node to each offset in each dimension of the preset prompt set is encoded as a symbol to obtain the response pattern of each retrieval node under each offset. For node pairs with data flow relationship, the set of ordinal pairs of response pattern pairs of upstream and downstream nodes under the same offset is the ordinal relationship transformation. If the system feedback score is less than a preset threshold, the current relationship transformation graph is constructed using the same intervention and encoding methods as those used to construct the baseline relationship transformation graph. For each directed edge in the baseline relationship transformation graph and the corresponding directed edge in the current relationship transformation graph, a bijective mapping existence determination is performed. If there is no one-to-one mapping relationship between the two corresponding relationship transformation sets, the directed edge is marked as a structural mismatch edge. Extract the maximally connected subgraph formed by the nodes connected by the structural mismatch edges in the current relation transformation graph as the structural mismatch region; For the structural mismatch region, at least one candidate replacement substructure is generated. In the simulation environment, a candidate relationship transformation graph is constructed for each candidate replacement substructure. The matching degree between each candidate replacement substructure and the baseline relationship transformation graph is evaluated by the number of structural mismatch edges between the candidate relationship transformation graph and the baseline relationship transformation graph. The candidate replacement substructure with the fewest structural mismatch edges is selected as the optimal candidate replacement substructure and deployed to the retrieval enhancement generation system.
2. The diagnosis and reconstruction method according to claim 1, characterized in that, The step of determining the existence of a bijective mapping between each directed edge in the baseline relationship transformation graph and its corresponding directed edge in the current relationship transformation graph includes: For each pair of nodes with a corresponding relationship, obtain the current relationship transformation set of the node pair in the current relationship transformation graph and the baseline relationship transformation set of the node pair in the baseline relationship transformation graph; Determine whether the number of elements in the current relation transformation set is equal to the number of elements in the baseline relation transformation set. If the number of elements is not equal, determine that the directed edge corresponding to the node is a structural mismatch edge. If the number of elements is equal, determine whether each response pattern pair in the current relation transformation set can find a response pattern pair with the same element level in the baseline relation transformation set; If no corresponding response pattern pair can be found, the directed edge corresponding to the node pair is determined to be a structural mismatch edge. If a corresponding response pattern pair can be found in all response pattern pairs, the directed edge corresponding to the node pair is determined to be bijective equivalent.
3. The diagnosis and reconstruction method according to claim 1, characterized in that, The step of generating at least one candidate replacement substructure for the structural mismatch region includes: Prune the structural mismatch region by removing mismatched edges and reconnecting the disconnected nodes to nodes outside the structural mismatch region; or, Insert a new retrieval node into the structural mismatch region; or, Replace the structural mismatched region and roll it back to the historical version of the corresponding region in the baseline relationship transformation diagram; The candidate replacement substructure is obtained by at least one of pruning, insertion, or replacement.
4. The diagnosis and reconstruction method according to claim 1, characterized in that, The construction of the baseline relationship transformation diagram includes: Apply each offset from the preset offset set to each search node, and obtain the response of each search node to each dimension of the preset prompt set at each offset; Responses whose absolute value of change in each dimension exceeds the corresponding threshold are considered significant responses, while responses that do not exceed the corresponding threshold are considered non-significant responses. The direction of change of significant response is encoded as the first symbol, and the no significant response is encoded as the second symbol, thus obtaining the response pattern of each retrieval node at each offset; For upstream and downstream nodes with data flow relationships, the response patterns of the upstream node and the downstream node under the same offset are used to form response pattern pairs, and the set of the response pattern pairs is used as the ordinal relationship transformation from the upstream node to the downstream node. The baseline relationship transformation graph is constructed using the retrieval node as the vertex and the ordinal relationship transformation as the directed edge.
5. The diagnosis and reconstruction method according to claim 1, characterized in that, The step of encoding the direction of change or lack of significant response of each retrieval node to each offset in each dimension of the preset prompt set into symbols includes: Obtain the union of the effective dimensions determined by the threshold in all search nodes at each offset, and use it as the global effective dimension set; For each retrieval node's response at each offset, in each dimension of the global valid dimension set, the direction of change of the dimension whose absolute value of the response change is greater than the corresponding threshold is encoded as +1 or -1. The dimension whose absolute value of the response change is less than or equal to the corresponding threshold is encoded as 0.
6. The diagnosis and reconstruction method according to claim 1, characterized in that, The diagnostic and reconstruction method also includes: In the deployed retrieval enhancement generation system, the reconstructed relationship transformation graph is constructed using the same intervention and encoding methods as those used to construct the baseline relationship transformation graph. If the ratio of the number of structural mismatched edges in the structural mismatched area to the number of structural mismatched edges in the structural mismatched area before reconstruction is less than or equal to a preset ratio, and the improvement in the system feedback score compared to before reconstruction is greater than or equal to a preset magnitude, then reconstruction is confirmed to be successful.
7. The diagnosis and reconstruction method according to claim 1, characterized in that, The method of evaluating the matching degree between each candidate replacement substructure and the baseline relationship transformation graph based on the number of structural mismatch edges between the candidate relationship transformation graph and the baseline relationship transformation graph includes: Calculate the number of structural mismatch edges in the structural mismatch region for each of the candidate relationship transformation graphs and the baseline relationship transformation graph; The number of mismatched edges in the structure is used as a measure of the degree of matching between each candidate replacement substructure and the baseline relationship transformation diagram. The fewer the number of mismatched edges in the structure, the higher the degree of matching.
8. A retrieval structure mismatch diagnosis and reconstruction device, characterized in that, The diagnostic and reconstruction device includes: The memory is configured to store instructions; and A processor, characterized in that the processor is configured to perform the diagnostic and refactoring method according to any one of claims 1 to 7.
9. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, this instruction causes the processor to be configured to perform the diagnostic and refactoring method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the diagnosis and reconstruction method according to any one of claims 1 to 7.