Research and development test bidirectional synchronization method based on artificial intelligence
By constructing a causal intent graph and a correction model, the problem of information asymmetry between R&D and testing was solved, enabling reverse linkage between test-driven R&D and improving testing efficiency and system stability.
Patent Information
- Application Number
- CN202511525506.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-10-24
AI Technical Summary
In DevOps and Agile development models, information asymmetry between the development and testing processes leads to delayed test case generation, insufficient regression coverage, and difficulty in reproducing defects online. This is especially true in multi-team collaborative environments where data structures are heterogeneous and semantic barriers are severe, making it impossible for traditional testing processes to perceive development changes in real time.
The AI-based bidirectional synchronous R&D testing method analyzes behavioral intent and semantic logic through multimodal neural networks, constructs a causal intent graph, identifies causal nodes with blind spots and high conflict risks, generates completion tasks in reverse, generates structured test cases, and updates the R&D task status graph in real time through a correction model, thus achieving reverse linkage between test-driven R&D.
It achieves deep coupling and intelligent linkage between R&D and testing, identifies problematic behaviors in testing in real time, improves the response speed to R&D problems and system stability, and significantly improves the efficiency of engineering utilization of testing value.
Smart Images

Figure CN120994571A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence and software testing technology, in particular to a research and development test bidirectional synchronization method based on artificial intelligence. BACKGROUND
[0002] Under the background of rapid iteration of today's software systems, the information flow between research and development and testing processes is becoming increasingly complex, especially under the DevOps and agile development mode, the change frequency of research and development tasks and the consistency requirement of test coverage are increasing. However, the existing test process generally has the problem of "research and development-test" information asymmetry, mainly reflected in that the generation of test cases lags far behind the update of research and development tasks, resulting in problems such as test lag, insufficient regression coverage, and difficulty in online defect reproduction. Although existing technologies attempt to use natural language processing (NLP) or rule engine to assist in generating test cases, most of them are limited to one-way automated processes, lacking real-time bidirectional synchronization mechanism between research and development and testing.
[0003] More seriously, in a multi-team collaboration environment, due to the use of different tools, task formats, and terminology systems by each team, the data structure is heterogeneous, and the semantic gap is serious, making it difficult for the test system to accurately understand the research and development semantic context and dynamically adjust and automatically synchronize the test behavior.
[0004] For example, in the implementation of the upgrade process of a certain large financial system, due to the short update cycle and high concurrency of research and development tasks, the traditional test process cannot real-time perceive the research and development change content, and needs to manually compare the test coverage points one by one, which not only is low in efficiency, but also is prone to errors and omissions. This "asynchronous testing" mode has become a key bottleneck affecting software quality and delivery cycle. SUMMARY
[0005] The purpose of the present application is to provide a research and development test bidirectional synchronization method based on artificial intelligence to solve the problems in the background art.
[0006] In order to achieve the above purpose, the present application provides the following technical solution: a research and development test bidirectional synchronization method based on artificial intelligence, comprising: extracting task description, code change, user story, PRD document and UI design data, and analyzing behavior intention and semantic logic through a multi-modal neural network to construct a causal intention graph; based on the causal intention graph, reasoning upstream and downstream, identifying causal nodes with high coverage blind area and conflict risk, and reversely generating potential completion tasks; fusing the original research and development tasks and the completion tasks to form a complete state set, and driving the generation of structured test cases after conditional encoding, and attaching task identification and causal path information; After the test execution, the real-time collection of behavior logs and operation logs is performed to detect mismatch areas between modalities, and if there is deviation, a correction suggestion is generated through a rectification model and the task pool is automatically written back; According to the correction result, a dynamic update of a research and development task state atlas is performed to realize reverse linkage of test-driven research and development.
[0007] Preferably, the behavior intention and semantic logic are analyzed through the multi-modal neural network to construct a causal intention atlas, including: The task text, user story, and PRD document are semantically encoded based on a pre-trained language model to output a text semantic vector V_text; The UI design diagram is subjected to component recognition and layout modeling by using a visual Transformer or a target detection network to output an image semantic vector V_ui; The Git Diff is subjected to semantic change modeling by using a CodeBERT model to output a code feature vector V_code; The text semantic vector V_text, the image semantic vector V_ui, and the code feature vector V_code are subjected to task behavior unit recognition through a node recognition mechanism to serve as graph nodes, and a Transformer encoder is used to calculate the semantic relationship strength between the nodes, and the nodes are connected according to a relationship strength threshold to form a causal intention atlas G_causal with semantic paths, wherein the edges represent potential causal driving or dependent relationships.
[0008] Preferably, the upstream and downstream reasoning based on the causal intention atlas includes: A pre-post adjacency subgraph structure is constructed for each node in the causal intention atlas, and a graph neural network model is used to aggregate and propagate the node features in the subgraph to generate an upstream and downstream semantic representation vector of each node, wherein the graph neural network is a graph convolution network or a graph attention network, which is used to model the potential causal chain dependent relationship between the task behaviors.
[0009] Preferably, the causal nodes with high conflict risk and coverage blind area are identified, including: Based on the obtained node upstream and downstream representation vectors, the structural entropy, semantic deviation degree, and task path frequency of the nodes are calculated, and a comprehensive score threshold is set to screen out nodes with low structural centrality, large semantic deviation, or not covered by historical test paths to form a high-risk causal node set; The calculation method of the semantic deviation degree includes: calculating the cosine similarity between the behavior semantic vector of each candidate node and the vector of its upstream trigger node, and taking the inverse difference as the semantic deviation degree index; if the semantic deviation degree index is higher than the set threshold, it indicates that the node has a semantic mutation.
[0010] Preferably, the potential completion task is reversely generated, including: Taking each node in the high-risk node set as a seed point, performing reverse path backtracking along its upstream path, and generating a structured completion task based on the missing behavior type in the path and the historical task template, the completion task includes a title, a suggested description, a trigger condition, and a coverage object field, and is marked as a "test guide task".
[0011] Preferably, the post-condition coded driver generates a structured test case, which includes: Merging the original R&D task set and the completion task set generated by the causal graph reasoning at the structure level, removing task redundancy and semantic duplicates, and forming a complete task state set containing task numbers, behavior labels, data sources, and causal relationship paths; Based on the semantic vector representation of the task nodes in the causal graph, the semantic cosine similarity between the task pairs is calculated, and if the similarity is greater than a preset threshold θ_merge, it is judged as a task redundancy or a semantic equivalent task, and a task merging operation is performed; all the antecedent and consequent relationship edges in the causal path are retained after merging; For each task node in the complete task state set, extract its behavior type, source modality, causal position, and strategy label, construct a multi-dimensional feature vector, and after all task vectors are spliced, fuse with the multi-modal semantic vector to form a conditional control vector, which is used to guide the generation of structured test cases and task context strongly related test cases.
[0012] Preferably, the mismatch area between the detection modalities includes: Comparing the function paths, parameter changes, and state transition sequences in the test behavior log and the running log, using a sequence matching algorithm to calculate the behavior consistency score between the log pairs, and identifying the modality mismatch area through a difference vector, if the consistency score is lower than the set threshold θ_diff, it is determined that there is a semantic deviation or an uncovered behavior.
[0013] Preferably, the correction suggestion is generated by a rectification model, which includes: Input the feature encoding of the mismatch area into the pre-trained rectification suggestion generation model, the rectification suggestion generation model is based on a double-tower structure, the left tower input is the mismatch behavior semantic vector, and the right tower input is the historical repair case vector, the output suggestion repair content includes recommended supplementary test items, input parameter change suggestions, expected result adjustments or task completion prompts through similarity matching and context semantic synthesis mechanism.
[0014] Preferably, the R&D task state graph is dynamically updated according to the correction result, which includes: Map the correction type and task identifier in the rectification suggestion to the corresponding node in the R&D task state graph, and mark the node as a "to be updated", "to be supplemented" or "coverage exception" state label; The nodes represent R&D task units, and the edges represent the causal dependence relationship between tasks. The atlas state updating process includes: for the nodes marked as "to be updated" state, propagating the update influence score to its upstream and downstream, using the propagation function F_update, wherein the influence degree is proportional to the propagation weight of the dependent edge, when the propagation score exceeds the set threshold value θ_propagation, the state of the adjacent node is synchronized to upgrade to "to be reviewed" or "influencing", thereby forming a chain linkage reminding mechanism; The priority of the "to be supplemented" and "to be reviewed" nodes in the state atlas is re-evaluated, and the task weight, path centrality and influence radius are combined to automatically generate a complete task suggestion or change order, and push it to the R&D personnel task pool, marked as "test feedback driven task", to realize the reverse activation and dynamic linkage of the test result to the R&D process.
[0015] In the above technical solution, the technical effects and advantages provided by the present application are: 1、The present application introduces the R&D task state atlas, and dynamically updates it combined with the test feedback results, thereby realizing the deep coupling and intelligent linkage between R&D and testing. Compared with the defects of isolated task state, lagging test feedback and static task scheduling in the traditional R&D process, the present application can identify the problem behavior exposed in the test in real time, automatically label the task state change, and propagate the state of the task atlas through the causal path, thereby effectively revealing the potential chain influence range and improving the response speed of the R&D problem and the system stability.
[0016] 2、The present application constructs a task state priority scoring mechanism and a reverse scheduling engine, converts the mismatch information found in the test system into an operable R&D completion task, and forms a closed-loop feedback path of "test-driven R&D". The system not only supports fine expression and intelligent evolution of task state, but also has cross-module linkage perception and task automatic generation capability, which significantly improves the engineering utilization efficiency of test value. DETAILED DESCRIPTION
[0017] In order to more clearly illustrate the technical solutions in the embodiments or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art based on these drawings.
[0018] Figure 1 The flowchart of the present application based on the artificial intelligence R&D test bidirectional synchronization method. DETAILED DESCRIPTION
[0019] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0020] Embodiments, please refer to Figure 1 The R&D test bidirectional synchronization method based on artificial intelligence described in the embodiments includes: Extract the task description, code change, user story, PRD document and UI design data, and analyze the behavior intention and semantic logic through the multi-modal neural network to construct the causal intention graph; Based on the causal intention graph, the upstream and downstream reasoning is performed to identify the causal nodes with high coverage blind area and conflict risk, and the potential completion tasks are generated reversely; The original R&D task and the completion task are fused to form a complete state set, and after conditional coding, the structured test case is automatically generated, and the task identification and causal path information are attached; After the test execution, the behavior log and the running log are collected in real time, the mismatch area between the modes is detected, if there is deviation, the correction suggestion is generated through the rectification model and the task pool is automatically written back; According to the correction result, the R&D task state graph is dynamically updated to realize the reverse linkage of test-driven R&D.
[0021] In the present application, in order to realize the intelligent, structured and high-precision semantic linkage between R&D tasks and test tasks, the original information with business behavior meaning needs to be extracted from multiple R&D data sources, and the multi-modal semantic modeling of the information is performed, and then the "causal intention graph" is constructed. As the basic knowledge representation structure of the present application, the quality and precision of the graph will directly affect the test strategy planning and the effect of the case generation.
[0022] The "causal intention graph" (Causal Intention Graph, abbreviated as G causal) proposed in the present application is a directed graph structure with R&D task behavior units as graph nodes and semantic relationships as edges, which is used to express the causal driving relationship and behavior triggering path between tasks and modules. Its construction process is as follows: Firstly, the system is connected with multiple software R&D support platforms through integrated interfaces to collect the following five types of key task data: Task description text: obtain the task title, description, label and associated task field from the project management platform (such as Jira, TAPD); Code change diff (Git Diff): Obtain the code change information submitted by the R&D personnel from the code repository (such as GitLab, GitHub); User stories and requirement documents: Extract user stories and PRD document texts from product management platforms (such as Confluence, Notion); API interface definition files: Interface definitions in Swagger or OpenAPI format; UI design drafts: Capture UI changes and functional expectations by connecting to Figma or Sketch exported canvas JSON or PNG image resources.
[0023] After collecting the multi-source data, structure standardization processing is performed to convert them into a set of modeling-oriented intermediate data objects, including text task units, structured field descriptions, and image design resources, forming a unified input format {D_task} for subsequent semantic modeling modules.
[0024] For the above multi-source heterogeneous data, a multi-modal semantic modeling subsystem is designed and deployed, which uses targeted deep learning models to vectorize different types of input data. The main modules include: Text feature extraction module: Use the domain pre-trained language model BERT (Bidirectional Encoder Representations from Transformers) to encode task descriptions, user stories, and PRD document content. This model uses WordPiece tokenization to divide input text into Token sequences, and learns context relationships through a 12-layer Transformer encoder to output a vector representation for each Token. Finally, the [CLS] marker vector is used as the sentence semantic vector, denoted as V_text.
[0025] Code semantic modeling module: For Git Diff data, use the CodeBERT model for encoding. CodeBERT is a Transformer model designed for source code and natural language dual-modal tasks, supporting multiple programming languages. The model takes the modified code snippets as dual-sequence input and outputs the code semantic change vector, denoted as V_code, which is used to capture the evolution trend of interface logic.
[0026] Image visual modeling module: UI design draft images are processed through a DETR (DEtection TRansformer) model. DETR is a Transformer-based end-to-end target detection model that can extract component elements (such as buttons, input boxes, pop-up windows, etc.) and their spatial layout relationships from UI original images. The extraction results are encoded into image semantic vectors V_ui through a visual feature embedding layer, and combined with image position encoding to reflect the interaction possibility between components.
[0027] The above three types of vectors will be uniformly projected into the same semantic space to form the modal-aligned feature vector group {V_text, V_code, V_ui}.
[0028] In order to extract behavior nodes that can construct a graph from semantic vectors, the present application introduces a "task action recognition model". This model is based on the sequence labeling structure of BERT and is fine-tuned through BiLSTM-CRF to realize the recognition of potential behavior phrases, operation verbs, module names, etc. in the input text.
[0029] The recognized behavior units are represented in the following five-tuple structure: Node_i = (ID, Action_Label,Trigger_Condition, Affected_Object, Source_Type); Among them: ID: unique identifier; Action_Label: behavior intent label, such as "interface reconstruction", "verification logic change", "visual difference optimization"; Trigger_Condition: precondition of the behavior, such as "member level takes effect", "button is clicked"; Affected_Object: the target affected by the behavior, such as "order settlement interface", "login page UI"; Source_Type: source modality (text / code / image).
[0030] All recognized behavior units constitute the initial node set N_causal of the graph.
[0031] The causal relationship between nodes is constructed through a "semantic-driven path reasoning algorithm". This algorithm is based on the following two core criteria: Semantic similarity matching: the cosine similarity is used to calculate the vector distance between any two nodes, and if it is less than a preset threshold θ1 = 0.3, it is judged that there is a potential semantic dependency relationship.
[0032] Trigger-response chain pattern recognition: According to the timestamp, call chain or PRD logical sequence in the source modal field, a directed dependent edge is constructed. For example, "interface change behavior" → "UI change behavior" → "test verification behavior". The edge weight is denoted as W_ij, and its value ranges from 0 to 1, indicating the causal confidence between the two nodes, which is determined by the following function: ; Wherein: sim(V_i, V_j) is the semantic cosine similarity; Logic_Correlation(i, j) is the logical relationship strength score (value 0~1), based on the context order and causal vocabulary pair recognition; α and β are weighting coefficients, recommended setting α = 0.6, β = 0.4. When the edge weight W_ij≥ threshold value θ2=0.5, the system connects the edge between node i and node j, adds the edge set E_causal, and labels the edge type (such as dependent, trigger, coverage, complement, etc.).
[0033] The final causal intent graph G_causal is represented as G = (N_causal, E_causal), which is a directed weighted graph structure. Each node is attached with behavior intent label, modal source, semantic vector and other structured information, and the edge contains behavior trigger type, causal confidence score and semantic path description.
[0034] The graph supports the following two main uses: Provide context behavior path to the test generation module as task dependency input; Provide graph structure input to the graph neural network module (such as GCN or GAT) for subsequent behavior gap prediction and reverse task generation.
[0035] In addition, G_causal supports export in JSON-LD format for integration with external knowledge graphs or test platforms.
[0036] After completing the construction of the causal intent graph, it is necessary to further understand the upstream and downstream dependency relationships of each behavior node in the global semantic structure. The present application uses a graph neural network model to reason and process the graph.
[0037] The system can select one of the following two graph neural network structures: Graph Convolutional Network (GCN); Graph Attention Network (GAT).
[0038] The initial vector of each node comes from the semantic vector generated when the graph is constructed, which is uniformly a 512-dimensional real value vector, denoted as V_node_initial.
[0039] For GCN: information propagation is achieved by weighted average of first-order neighbor features; For GAT: attention mechanism is introduced to calculate attention weight for each neighbor node, and neighbor vectors are aggregated by weight.
[0040] Set the propagation layer to 2, that is, each node considers at most 2-hop adjacent nodes in the information propagation process, ensuring that both upstream and downstream behavior relationships are considered without introducing redundant interference.
[0041] After reasoning, the upstream and downstream aggregated representation vectors of each node are output, denoted as V_node_contextual, which are used for subsequent structure and semantic analysis.
[0042] In order to discover potential test coverage blind spots or demand conflict points, importance analysis and semantic deviation evaluation of nodes in the graph are needed. The specific process is as follows: For each node, calculate its "influence" in the graph structure, that is, the graph centrality index, including betweenness centrality and PageRank value. If a node has low centrality but large semantic deviation, it indicates that it is at the edge of the structure but has high risk.
[0043] For each node, calculate the semantic cosine similarity between it and all upstream nodes. If the upstream nodes are set P (containing upstream behavior nodes), the current node vector is V_cur, and the vector of each node in P is V_pj, then the semantic deviation D_p is: D_p = 1 minus the average (cosine similarity of V_cur and V_pj); When D_p is higher than the threshold value θ_gap (recommended value is 0.35), it means that the current node has a large semantic mutation, which may be a demand fracture or abnormal behavior.
[0044] Combine the historical use case library and task log to count the frequency of each node being covered by the test path. If a node is never included in any path, or its path only exists in a non-main stream, it is determined to be a coverage blind spot.
[0045] Standardize the above three indicators to a decimal between 0 and 1, and calculate the node risk score according to the following weighted formula: R_score = 0.4 × D_p + 0.4 × coverage blind spot score + 0.2 × centrality inverse score; If R_score is greater than 0.6, add the node to the high-risk causal node set N_gap.
[0046] For each node in the high-risk node set N_gap, perform the following completion process: From each high-risk node, trace its predecessor node chain according to the graph structure, with a maximum backtracking depth of 3 hops. If there is a missing behavior type in the backtracking path (such as missing logical verification or missing boundary check), mark it as "behavior chain defect".
[0047] Match the behavior defect type with the predefined task template library in the system. For example, if "data input" is found in the path but "format verification" is missing, it is mapped to the "input verification task template" and the template structure is extracted: Title field: "Supplement XXX field verification logic"; Description field: "The field has not been verified for format boundaries, and it is recommended to add XXX rules"; Condition field: "When the input is user form data"; Type field: "Test-driven R&D completion task".
[0048] Generate a structured task data object named T_back_i and attach a flag field source = 'from_test_gap' to facilitate subsequent identification as a test-driven completion task in the R&D system.
[0049] The system pushes T_back_i to the task management platform (such as Jira) through an open interface and establishes an association with the original test task, supporting R&D personnel review, confirmation, and merging.
[0050] To ensure that this mechanism can adapt to different projects or organizations, some key parameters are provided with configuration interfaces: θ_gap (semantic deviation threshold): recommended value 0.35, adjustable range 0.2 to 0.5; Maximum backtracking depth: default 3 hops, can be configured to 2 to 5 hops; Risk score threshold R_score: default 0.6, can be set to 0.5 to 0.8; Number of graph neural network propagation layers: recommended 2 layers, maximum 4 layers; Completion template library: loaded in JSON or YAML file format, supports adding / editing templates.
[0051] The original R&D task set (T_forward) is usually provided by the project management platform and contains explicit task numbers, task descriptions, priority, module attribution, and other structure fields; while the completion task set (T_back) is generated based on the high-risk nodes inferred in the causal graph by the graph neural network, and has the same structure as the original task but with a "reasoning generated" label.
[0052] The system first merges the two sets to form the task full set T_all. During the merging process, the following processing is considered: Structure field alignment: unify the field structure of tasks, including task number (T_id), task semantic vector (V_task), origin type (origin_type), action label (action_type), module attribution (module_id) and the like.
[0053] In order to avoid the redundancy in test case generation caused by semantic repetitive tasks, the system adopts a graph structure alignment method to eliminate task redundancy. The specific method is as follows: Calculate the cosine similarity of semantic vectors between all task nodes in T_forward and T_back; If the similarity is greater than the set threshold value θ_merge (the recommended value is 0.85), it is considered as a semantically equivalent task; In the graph structure, the task nodes with stronger upstream and downstream connectivity are retained, and the weakly connected nodes are deleted or merged; The merging operation retains all causal edge relationships and ensures the integrity of the causal path.
[0054] After processing, the complete task state set T_all with standard structure and non-redundant semantics is obtained, which serves as the basis for subsequent test case generation.
[0055] The application adopts a "conditional guided generation" strategy, so that test case generation is not limited to requirement text input, but is jointly controlled by multi-dimensional task context. For this purpose, a condition control vector C_all needs to be constructed.
[0056] The specific construction method is as follows: For each task in T_all, the following features are extracted to form a task feature vector C_task: task semantic vector (512 dimensions): output by BERT or RoBERTa encoder; action type vector (10 dimensions One-hot encoding): such as "interface modification", "UI change", "permission check" and the like; origin mark vector (2 dimensions): original task / reasoning generated task; causal level position (integer value): the level of the node from the root node in the graph; module attribution code (64-dimensional sparse vector): such as order, user, payment module and the like; path depth (scalar): the longest causal path depth involved in the task. Finally, the feature vector C_task_i of each task is formed, and the unified dimension is set to 640 dimensions. All task feature vectors are spliced according to the causal path order to form the overall condition control vector C_all. If the number of tasks is N, then: C_all = concatenate(C_task_1, C_task_2,..., C_task_N); before input to the generation model, truncate to K=10 tasks according to the maximum length, and use a sliding window mechanism for the part exceeding the length.
[0057] In the test case generation model, C_all is input as an external condition vector of a Transformer decoder, is fused with semantic input (such as PRD text, Git Diff, etc.), and guides the generation of a structured test case.
[0058] The generation module is a conditional generation model based on a Transformer architecture, and the core components include: Encoder: The input is the aforementioned multi-modal semantic feature, such as the sentence vector of the PRD document, the UI image embedding vector, and the code Diff change vector.
[0059] Decoder: The test case items are generated field by field in a self-recurrent manner, and the generation order is: test item (test_item), precondition (precondition), input data (input_data), expected result (expected_result), test method label (test_method), task number (T_id), and causal path encoding (P_causal). The condition vector C_all is used as the Key and Value of the cross-attention layer to guide the decoder to refer to the behavior characteristics in the current task chain when generating each field.
[0060] To enhance the explainability and later maintenance capability of the test case, the application proposes to attach task number and causal path information in each test case: Task number (T_id): used to mark which task the test case directly comes from, facilitating one-way tracing from test case to task.
[0061] Causal path encoding (P_causal): represents the task causal chain that the test case depends on, for example: T12→T18→T22.
[0062] The path is represented by a sequence of node numbers and stored as a structured field in the test case, which can be visualized in the test management platform and supports causal positioning of test defects.
[0063] The log collection system interfaces with two main data sources: Test behavior log (L_log): output by the test management platform (such as Metersphere, TestRail), containing case number, execution time, input data, expected output, actual output, and call path.
[0064] System runtime log (L_runtime): automatically generated when the system under test runs, collected in real time by an embedded collection agent (Agent), including interface call chain, parameter flow, state transition record, exception stack, and module response behavior, etc.
[0065] For subsequent comparative analysis, the system maps both types of logs into a unified structure, defined as a five-tuple form: LogEntry = (Entity_ID, Timestamp, Input_Vector, Execution_Path, Output_Vector); Entity_ID: Log belongs to the test case or system module identification; Timestamp: Event occurrence timestamp; Input_Vector: Input parameters after vectorization encoding; Execution_Path: Module call chain encoding; Output_Vector: Embedded representation of output response (such as JSON result embedding).
[0066] All logs are uniformly encoded and saved in the behavior comparison cache area for the mismatch detection module to call.
[0067] This step is used to identify areas of inconsistency or insufficient coverage between behavior and operation, referred to as modal mismatch area (S_diff).
[0068] First, based on the Execution_Path field, compare the behavior path sequences of the two log sources, and use the Edit Distance algorithm to calculate the path difference. The larger the difference value, the more serious the behavior branch deviation. The matching score (Path_Score) is defined as: Path_Score = 1 minus (normalized edit distance between actual behavior path and test path); Input_Vector and Output_Vector are considered as high-dimensional embedding vectors, and their cosine similarity between behavior and operation logs is calculated, denoted as Input_Similarity and Output_Similarity, respectively.
[0069] By weighted combination of the three score items, define the overall modal consistency score: Consistency_Score = 0.4 × Path_Score + 0.3 × Input_Similarity + 0.3 × Output_Similarity; If Consistency_Score is lower than threshold θ_diff (recommended value is 0.7), it is determined that the current use case has modal mismatch, and its behavior is marked as mismatch candidate area S_diff, and relevant context information is recorded for subsequent correction model.
[0070] To intelligently give operational repair suggestions, the application designs a correction suggestion generation model (CSG), which is implemented based on a double-tower neural network structure.
[0071] The CSG model includes two parts: a left tower network for encoding the context vector of the current mismatch area, inputting the Input_Vector, Output_Vector and Execution_Path triplets of the mismatch case, and forming the mismatch semantic vector V_diff after fusion; a right tower network for indexing the semantic vectors of use cases in the historical repair case library, each historical repair record including the pre-repair vector V_hist_pre and the post-repair suggestion text.
[0072] In the model training phase, the triplet loss (Triplet Loss) optimization objective is adopted to make the repair vectors of similar mismatch scenarios close.
[0073] In the inference phase, the model receives the current mismatch semantic vector V_diff and searches for the most similar repair vector V_hist_pre in the historical library. The Top-K retrieval of vector distance is used to obtain a candidate repair suggestion set.
[0074] At the same time, the Transformer decoder is introduced to reconstruct the context of the most similar vector, and finally output the specific repair suggestion text R_fix. The suggestion types include: suggestion of supplementing test case fields; input parameter boundary adjustment; modification of expected output logic; prompting of potential missing R&D behaviors.
[0075] To realize the closed-loop linkage of test→R&D, the repair suggestions are automatically structured and pushed to the task management platform.
[0076] Through Webhook or open API interface, it is connected to Jira, TAPD and other task management platforms; CorrectionTask is submitted as a new "suggestion task" or "case change item"; the original test case and repair suggestions are associated to ensure traceability; the task state graph G_state is updated, and the affected task nodes are marked as "to be repaired" or "suggestion update". All correction suggestions and corresponding mismatch areas and original behavior paths are recorded in the log database.
[0077] The research and development task state graph G_state is a directed graph G = (N, E), wherein: N represents a task node set, each node corresponding to an independent research and development task; E represents a task-dependent relationship edge set, including functional dependence, interface calling, process sequence, and other trigger logic.
[0078] Task node attribute design Each node N_i contains the following attribute fields for complete expression of task state and context information: Task number (T_id): unique identification; Behavior label (action_type): such as "interface modification", "permission verification", "page update"; Current state (state_tag): initially "completed", and can be marked as "to be updated", "to be supplemented", "test failed", "influencing", and the like; Origin type (origin_type): original creation or test feedback generation; Coverage state (test_coverage): whether an effective test case has been associated; Last update timestamp (last_update_ts); Source feedback number (from_diff_id): if derived from mismatch correction, indicating the mismatch region ID.
[0079] Attribute design of edges in the graph Each edge E_ij represents the causal relationship between nodes i and j, and has the following attributes: Trigger type (trigger_type): such as "call dependence", "data input", "process preposition"; Propagation weight (W_ij): between 0 and 1, used to measure the degree of state influence; Propagation directionality: by default, i→j, i.e., upstream task influences downstream task.
[0080] The data structure of the state graph uses an adjacency list for storage, supporting fast insertion and update in a dynamic task environment.
[0081] When the test system identifies modal mismatch and generates a correction suggestion R_fix from the rectification model, the system maps it to the task node in G_state, and updates the node state field according to the suggestion type. For example: If the suggestion is "add input verification", the original node is marked as "to be supplemented"; If the suggestion is "expected output logic is wrong", it is marked as "to be updated"; If the suggestion cannot be located to a specific node, select a node with a higher graph centrality among the adjacent nodes as the repair target.
[0082] The following state labels are predefined in the present application to give different linkage semantics to task nodes: completed: completed; test_failed: test failed; pending_update: pending update; suggest_patch: suggest patch; affected: affected; deprecated: deprecated.
[0083] The state label supports dynamic switching, and the state transition history is recorded to support audit and evolution analysis.
[0084] When the state of a node changes, its impact may not be limited to the node itself, so the "state influence degree" needs to be propagated to adjacent task nodes to identify potential chain update requirements. This mechanism uses a weighted propagation function F_update to achieve this.
[0085] For a state change node N_i, its influence on adjacent node N_j is denoted as S_ij, which is calculated as follows: S_ij = W_ij x A_i x D_f; where: W_ij is the propagation weight of edge E_ij, ranging from 0 to 1; A_i is the source node state severity coefficient, which is set according to the state, for example: pending_update: 0.8; suggest_patch: 0.6; test_failed: 1.0; D_f is the path distance attenuation factor, with a default value of 0.9, multiplied by one for each additional hop of propagation. The total propagation impact score S_ij is compared with the propagation threshold θ_propagation (recommended threshold is 0.5): if S_ij ≥ θ_propagation, then N_j is marked as affected; otherwise, the current state remains unchanged.
[0086] To prevent false positives caused by excessive propagation, the system sets the maximum propagation depth to 3 layers, and automatically truncates the propagation path if it exceeds this depth. At the same time, the system supports a propagation blacklist mechanism, which means that some uncontrollable or historically frozen modules do not participate in state linkage propagation.
[0087] When there are multiple task nodes in the graph with state labels "pending update" or "affected", the system will trigger the reverse R&D task generation or supplement process through the scheduling engine.
[0088] Calculate the new scheduling priority Score_priority for all candidate task nodes: Score_priority = w1 x Centrality + w2 x Severity + w3 x Propagation_Radius; where: Centrality is the graph centrality score (such as PageRank); Severity is the current state severity score (such as test_failed is 1.0, suggest_patch is 0.6); Propagation_Radius is the number of neighbors that the node state has affected; w1, w2, w3 are weighting factors, default settings are 0.3, 0.4, 0.3. The higher the priority score, the more likely the task will become the completion target generated by the reverse scheduling.
[0089] For high-priority nodes, the system calls the task template library to generate new task suggestions, including: Task title and suggestion content; Recommended responsible person (allocated according to module); Expected repair impact range; Flow into the R&D task pool and mark the source as "test feedback driven".
[0090] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. An artificial intelligence-based R&D test two-way synchronization method, characterized in that: The method comprises the following steps: Extract the task description, code changes, user stories, PRD documents and UI design data, and analyze the behavior intention and semantic logic through a multi-modal neural network to construct a causal intention graph; Based on the causal intention graph, infer the upstream and downstream, identify the causal nodes with high risk of coverage blind area and conflict, and generate potential completion tasks in reverse; Fuse the original R&D tasks and the completion tasks to form a complete state set, and generate structured test cases after conditional coding, with task identification and causal path information; After test execution, real-time collection of behavior logs and running logs, detection of mismatch areas between modalities, and generation of correction suggestions and automatic rewriting of task pool if there is deviation; According to the correction result, dynamically update the R&D task state graph to realize the reverse linkage of test-driven R&D. 2.The AI-based R&D test bidirectional synchronization method of claim 1, wherein: The multi-modal neural network is used to analyze the behavior intention and semantic logic, and construct a causal intention graph, which comprises the following steps: Based on the pre-trained language model, the semantic coding of task text, user story and PRD document is performed, and the text semantic vector V_text is outputted; The visual Transformer or target detection network is used for component recognition and layout modeling of the UI design diagram, and the image semantic vector V_ui is outputted; The CodeBERT model is used for semantic change modeling of Git Diff, and the code feature vector V_code is outputted; The text semantic vector V_text, image semantic vector V_ui and code feature vector V_code are used to identify the task behavior unit as a graph node through a node identification mechanism, and the semantic relationship strength between nodes is calculated by using a Transformer encoder, and the nodes are connected according to the relationship strength threshold to form a causal intention graph G_causal with semantic paths, wherein the edges represent the potential causal driving or dependent relationship. 3.The AI-based R&D test bidirectional synchronization method of claim 2, wherein: The upstream and downstream reasoning based on the causal intention graph comprises the following steps: The upstream and downstream representation vectors of each node in the causal intention graph are generated by constructing the front and rear adjacent subgraph structure of each node and using a graph neural network model to aggregate and propagate the node features in the subgraph, wherein the graph neural network is a graph convolution network or a graph attention network, which is used to model the potential causal chain dependent relationship between task behaviors. 4.The AI-based R&D test bidirectional synchronization method of claim 3, wherein: The high-risk causal node set is formed by calculating the structural entropy, semantic deviation degree and task path frequency of the nodes based on the obtained node upstream and downstream representation vectors, setting a comprehensive score threshold, and screening out the nodes with low structural centrality, large semantic deviation or not covered by historical test paths. The calculation method of the semantic deviation degree comprises the following steps: Calculate the cosine similarity between the behavior semantic vector of each candidate node and the upstream trigger node vector, and take the inverse difference as the semantic deviation degree index; if the semantic deviation degree index is higher than the set threshold, it means that the node has a semantic mutation. 5.The AI-based R&D test bidirectional synchronization method according to claim 4, characterized in that: The reverse generation of potential completion tasks comprises the following steps: Taking each node in the high-risk node set as a seed point, performing reverse path backtracking along its upstream path, and generating a structured completion task based on the missing behavior type in the path and the historical task template, the completion task includes a title, a suggested description, a trigger condition, and a coverage object field, and is marked as a "test guide task". 6.The AI-based R&D test bidirectional synchronization method according to claim 5, characterized in that: The post-condition generation generates a structured test case, including: Merging the original R&D task set and the completion task set generated by the causal graph reasoning at the structure level, removing task redundancy and semantic duplicates, and forming a complete task state set containing task numbers, behavior labels, data sources, and causal relationship paths; Based on the semantic vector representation of the task nodes in the causal graph, the semantic cosine similarity between the task pairs is calculated, and if the similarity is greater than a preset threshold θ_merge, it is judged as a task redundancy or a semantic equivalent task, and a task merging operation is performed; all the antecedent and consequent relationship edges in the causal path are retained after merging; For each task node in the complete task state set, extract its behavior type, source modality, causal position, and strategy label, construct a multi-dimensional feature vector, and after splicing all task vectors, fuse with the multi-modal semantic vector to form a conditional control vector, which is used to guide the generation of structured test cases related to the task context. 7.The AI-based R&D test bidirectional synchronization method according to claim 6, characterized in that: Detecting the mismatch area between modalities, including: Comparing the function paths, parameter changes, and state transition sequences in the test behavior log and the running log, using a sequence matching algorithm to calculate the behavior consistency score between the log pairs, and identifying the modal mismatch area through the difference vector extraction strategy, if the consistency score is lower than the set threshold θ_diff, it is determined that there is a semantic deviation or an uncovered behavior. 8.The AI-based R&D test bidirectional synchronization method of claim 7, wherein: The correction suggestion is generated by the rectification model, including: Input the feature encoding of the mismatch area into the pre-trained rectification suggestion generation model, the rectification suggestion generation model is based on a double-tower structure, the left tower input is the mismatch behavior semantic vector, and the right tower input is the historical repair case vector, the output suggestion repair content includes recommended supplementary test items, input parameter change suggestions, expected result adjustments, or task completion prompts. 9.The AI-based R&D test bidirectional synchronization method of claim 8, wherein: The development task state graph is dynamically updated according to the correction result, including: Map the correction type and task identifier in the rectification suggestion to the corresponding node in the development task state graph, and mark the node as "to be updated", "to be supplemented", or "coverage exception" state label; The node represents the R&D task unit, and the edge represents the causal dependence relationship between tasks; The graph state update process includes: for the node marked as "to be updated", propagate the update influence score to its upstream and downstream, use the propagation function F_update, where the influence degree is proportional to the propagation weight of the dependent edge, when the propagation score exceeds the set threshold θ_propagation, the state of the adjacent node is synchronized to "need to be reviewed" or "influencing", thus forming a chain-like linkage reminder mechanism; The priority of the "to be supplemented" and "to be reviewed" nodes in the state atlas is re-evaluated, and the task weight, path centrality and influence radius are combined to automatically generate a completion task suggestion or a change order, and push it to the R&D personnel task pool and mark it as a "test feedback driven task", so as to realize the reverse activation and dynamic linkage of the test result to the R&D process.
Citation Information
Patent Citations
Service management system based on multi-protocol support isomorphic environment
CN118863781A
Software test management system and test method
CN119292931A
Research and development document processing method and device
CN120087351A
Computer equipment fault monitoring system and method based on artificial intelligence
CN120508477A
Cited By
Code and non-code resource bidirectional mapping and consistency maintenance method and system
CN121349508A
Software test expected result prediction method and system based on deep learning
CN121434100A
Multi-agent task routing method and device based on causal atlas and related products
CN121900891A