A software testing problem locating and fixing method and device

By constructing a test log association graph and an improved graph neural network, combined with code and data dependencies, software testing problems are automatically located and fixed, solving the problems of low efficiency and poor accuracy in existing technologies, and achieving efficient software testing problem location and repair.

CN122450841APending Publication Date: 2026-07-24ANRUI DIGITAL INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANRUI DIGITAL INFORMATION TECH CO LTD
Filing Date
2026-05-18
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In current software testing, problem localization relies on manual analysis, which is inefficient and inaccurate, making it difficult to meet the rapid iteration needs of large-scale software systems.

Method used

A test log association graph is constructed, and an improved graph neural network is used for node feature updating and classification. Multi-dimensional root cause verification is performed by combining code execution path and data dependency relationship, which automatically identifies the source of the anomaly and assists in its repair.

Benefits of technology

It improved problem location efficiency by more than 50%, increased location accuracy by 35%, reduced manual intervention, and achieved automated rapid location and repair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122450841A_ABST
    Figure CN122450841A_ABST
Patent Text Reader

Abstract

The application discloses a software test problem positioning and repairing method and device. The method comprises the following steps: collecting log data in a software test process, taking a log event as a node, taking a causal relationship, a time sequence relationship and a module correlation relationship between events as edges, and constructing a test log correlation graph; adopting a graph neural network to update and classify node features of the test log correlation graph, adding an abnormal propagation weight factor in a node updating formula, positioning an abnormal source node in the test log correlation graph, and taking the abnormal source node as a log event corresponding to a problem root cause; based on the abnormal source node, combining code execution paths and data dependency relationships to verify the root cause, extracting a code segment corresponding to the abnormal source node through a program slicing technology, and tracing input data and an intermediate calculation process corresponding to the abnormal source node through data dependency analysis, and confirming the accuracy of problem root cause positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing technology, and more specifically, to a method and apparatus for locating and repairing software testing problems. Background Technology

[0002] During software functional testing, testers often spend a significant amount of time locating and fixing bugs after discovering them. Traditional methods rely on manual analysis of test logs, code, and runtime data, which is inefficient and prone to omissions. As software systems grow in size and complexity, the volume of test log data increases exponentially, making manual analysis insufficient for the demands of rapid iteration. Therefore, there is an urgent need for an intelligent method that can leverage AI technology to automatically analyze test logs, identify anomalies, locate the root causes of problems, and assist in their fixing. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention provides a method and apparatus for locating and repairing software testing problems.

[0004] According to one aspect of the present invention, a method for locating and fixing software testing problems is provided, comprising: Log data is collected during software testing. A test log association graph is constructed, using log events as nodes and causal relationships, temporal relationships, and module dependencies between events as edges. The weight of each edge is determined by semantic similarity, temporal interval, and module dependency. The weight W is calculated using the following formula: In the formula, S semantic Semantic similarity, T interval D is the normalized value of the time interval. module Module dependency; A graph neural network is used to update and classify the node features of the test log association graph. An anomaly propagation weight factor is added to the node update formula to locate the anomaly source node in the test log association graph, and the anomaly source node is taken as the log event corresponding to the root cause of the problem. The improved node update formula is as follows: In the formula, Let W be the feature vector of node v in the (k+1)th layer, N(v) be the neighboring nodes of node v, and W be the feature vector of node v in the (k+1)th layer. uv Let A be the edge weight from node u to v, b be the bias term, δ be the anomaly propagation weight factor, and A be the edge weight from node u to v. v Let σ be the anomaly probability value of node v, and σ be the activation function. Based on the aforementioned source node of the anomaly, root cause verification is performed by combining the code execution path and data dependencies. The code fragment corresponding to the source node of the anomaly is extracted by program slicing technology, and the input data and intermediate calculation process corresponding to the source node of the anomaly are traced by data dependency analysis to confirm the accuracy of the root cause location.

[0005] According to another aspect of the present invention, a software testing problem localization and repair apparatus is provided, comprising: The construction module is used to collect log data during software testing. It uses log events as nodes and the causal relationships, temporal relationships, and module dependencies between events as edges to construct a test log association graph. The weight of each edge is determined by semantic similarity, temporal interval, and module dependency. The weight W is calculated using the following formula: In the formula, S semantic Semantic similarity, T interval D is the normalized value of the time interval. module Module dependency; The localization module is used to update and classify node features of the test log association graph using a graph neural network. An anomaly propagation weight factor is added to the node update formula to locate the anomaly source node in the test log association graph, and the anomaly source node is taken as the log event corresponding to the root cause of the problem. The improved node update formula is as follows: In the formula, Let W be the feature vector of node v in the (k+1)th layer, N(v) be the neighboring nodes of node v, and W be the feature vector of node v in the (k+1)th layer. uv Let A be the edge weight from node u to v, b be the bias term, δ be the anomaly propagation weight factor, and A be the edge weight from node u to v. v Let σ be the anomaly probability value of node v, and σ be the activation function. The confirmation module is used to perform root cause verification based on the anomaly source node, combined with the code execution path and data dependency relationship. It extracts the code fragment corresponding to the anomaly source node through program slicing technology, and traces the input data and intermediate calculation process corresponding to the anomaly source node through data dependency analysis to confirm the accuracy of the root cause location.

[0006] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing a computer program for performing the methods described in any of the above aspects of the present invention.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the method described in any of the preceding aspects of the present invention.

[0008] Therefore, this invention provides an AI-based method and system for rapid location and repair of software testing problems. By constructing a test log association graph, improving the root cause localization of graph neural networks, and performing multi-dimensional root cause verification, it achieves automatic discovery, accurate location, and assisted repair of problems. Attached Figure Description

[0009] Exemplary embodiments of the present invention can be more fully understood by referring to the following figures: Figure 1 This is a flowchart illustrating a software testing problem localization and repair method provided in an exemplary embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a software testing problem location and repair device provided in an exemplary embodiment of the present invention; Figure 3 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. Detailed Implementation

[0010] Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. It is obvious that the described embodiments are merely some embodiments of the present invention, and not all embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein.

[0011] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps described in these embodiments do not limit the scope of the invention.

[0012] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of the present invention are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.

[0013] It should also be understood that in the embodiments of the present invention, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.

[0014] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more unless explicitly defined or given contrary instructions in the context.

[0015] Furthermore, the term "and / or" in this invention is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this invention generally indicates that the preceding and following related objects have an "or" relationship.

[0016] It should also be understood that the description of the various embodiments in this invention emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.

[0017] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0018] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.

[0019] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, they should be considered part of the specification.

[0020] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0021] The embodiments of this invention can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Well-known examples of terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.

[0022] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.

[0023] Exemplary methods Figure 1 This is a flowchart illustrating a software testing problem localization and repair method provided in an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as... Figure 1 As shown, the software testing problem localization and repair method 100 includes the following steps: Step 101: Collect log data during the software testing process. Using log events as nodes and the causal, temporal, and module-related relationships between events as edges, construct a test log association graph. The weight of each edge is determined by semantic similarity, temporal interval, and module dependency. The weight W is calculated using the following formula: In the formula, S semantic Semantic similarity, T interval D is the normalized value of the time interval. module Module dependency; Step 102: A graph neural network is used to update and classify the node features of the test log association graph. An anomaly propagation weight factor is added to the node update formula to locate the anomaly source node in the test log association graph, and this anomaly source node is taken as the log event corresponding to the root cause of the problem. The improved node update formula is as follows: In the formula, Let W be the feature vector of node v in the (k+1)th layer, N(v) be the neighboring nodes of node v, and W be the feature vector of node v in the (k+1)th layer. uv Let A be the edge weight from node u to v, b be the bias term, δ be the anomaly propagation weight factor, and A be the edge weight from node u to v. v Let σ be the anomaly probability value of node v, and σ be the activation function. Step 103: Based on the anomaly source node, perform root cause verification by combining code execution path and data dependency relationship. Extract the code fragment corresponding to the anomaly source node through program slicing technology, and trace the input data and intermediate calculation process corresponding to the anomaly source node through data dependency analysis to confirm the accuracy of the root cause location.

[0024] Specifically, this invention aims to solve the technical problems of existing software testing, such as reliance on manual methods for problem location, low efficiency, and poor accuracy. It provides an AI-based method and system for rapid problem location and repair in software testing. By constructing a test log association graph, improving the root cause localization of graph neural networks, and performing multi-dimensional root cause verification, it achieves automatic problem discovery, accurate location, and assisted repair.

[0025] This invention provides an AI-based method for locating and fixing software testing problems, such as... Figure 1 As shown, the main steps include: Step 1: Data Collection and Preprocessing Collect various log data generated during software testing, including server logs, application logs, business logs, performance metrics, etc. These logs record various system operations, events, and state changes. First, it's essential to ensure the complete collection of these logs, including different types such as server logs and application logs. For example, for a web application, this involves collecting access logs from the web server (such as Apache or Nginx), runtime logs from the application server (such as Tomcat or Node.js), and business logs recorded by the application itself.

[0026] The collected raw log data is cleaned and preprocessed: duplicate data is removed, missing values ​​are handled, low-level or irrelevant log entries (such as overly frequent heartbeat detection logs) are filtered, and the logs are formatted into structured JSON or CSV formats to ensure data consistency and analyzability.

[0027] Step 2: Test Log Association Graph Construction Using preprocessed log events as nodes and the causal, temporal, and module-related relationships between events as edges, a test log association graph is constructed. The weight of each edge is determined by these three dimensions: Semantic similarity (S_{semantic}Ssemantic): Calculates the semantic similarity between the contents of two log events based on a word vector model (Word2Vec or BERT).

[0028] Normalized time interval (T_{interval}Tinterval): The normalized value of the time interval between two log events. The shorter the interval, the higher the weight.

[0029] Module dependency (D_{module}Dmodule): Predefines the dependency strength based on the calling relationships between modules in the software architecture.

[0030] The formula for calculating the weight is: Using the above formula, each edge is assigned a comprehensive weight, forming a complete log association network, which provides a graph structure foundation for subsequent root cause localization.

[0031] Step 3: Root Cause Localization of Improved GNN A graph neural network (GNN) is used to update and classify the node features of the aforementioned test log association graph. Based on the traditional GNN node update formula, this invention innovatively adds an anomaly propagation weight factor to focus on identifying the "anomaly source node" (i.e., the log event corresponding to the root cause of the problem) in the association graph.

[0032] The improved node update formula is as follows: In the formula, Let W be the feature vector of node v in the (k+1)th layer, N(v) be the neighboring nodes of node v, and W be the feature vector of node v in the (k+1)th layer. uv Let be the edge weight from node u to v (from step 2), b be the bias term, δ be the anomaly propagation weight factor, and δ=0.25 be the anomaly propagation weight factor (obtained through experimental optimization); A v Let σ be the anomaly probability value of node v (calculated by a pre-trained anomaly detection model), and σ be the activation function, using ReLU. This formula adds an anomaly propagation term to the traditional neighbor aggregation. This amplifies the characteristics of abnormal nodes during propagation, making it easier to distinguish the source node from ordinary abnormal nodes. After iterative training, the model can quickly locate the source node of the anomaly propagation, i.e., the log event corresponding to the root cause of the problem.

[0033] Step 4: Multi-dimensional root cause verification To confirm that the anomaly source node located by GNN is indeed the root cause of the problem, this invention further verifies this by combining code execution path and data dependency relationships: Program slicing analysis: This technique extracts the code fragment corresponding to the source node of the exception. Based on the Abstract Syntax Tree (AST) of the source code, it calculates the set of all statements that affect the output of that code location, forming forward or backward slices, and analyzes the syntax errors, logical loopholes, or boundary condition issues within them.

[0034] Data dependency analysis: Construct a data dependency graph to trace the sources of input data and intermediate computation processes upon which abnormal outputs depend. By analyzing the data flow, confirm whether the problem is caused by incorrect input data, abnormal data transformation, or defects in computational logic.

[0035] If both verification methods point to the same code location or data node, the root cause is confirmed to be accurate; if there is ambiguity, multiple candidate root causes are output with confidence levels marked for developers' reference.

[0036] Step 5: Assisted Repair and Knowledge Reuse The confirmed root causes of problems and suggested fixes (such as the location of modified code and methods for data correction) are structured and stored in a knowledge base. When similar log patterns reappear, the system can automatically match historical cases and push fix solutions, enabling knowledge reuse and continuous optimization.

[0037] Beneficial effects Compared with the prior art, the present invention has the following beneficial effects: Improve location efficiency: By constructing a test log association graph and an improved GNN algorithm, the root cause location is transformed from manual line-by-line analysis to automated graph reasoning, improving location efficiency by more than 50%.

[0038] Improved localization accuracy: By introducing anomaly propagation weight factors and multi-dimensional verification mechanisms, the root cause identification accuracy reaches 95.8%, which is 35% higher than the traditional GNN algorithm.

[0039] Reduce manual intervention: Automatically complete log analysis, anomaly detection, root cause location and preliminary verification, significantly reducing the workload of developers in troubleshooting issues.

[0040] Knowledge reuse: Store historical problems and solutions in a knowledge base to enable experience sharing across projects and accelerate the remediation of future problems.

[0041] Exemplary device Figure 2 This is a schematic diagram of the structure of a software testing problem localization and repair device provided in an exemplary embodiment of the present invention. Figure 2 As shown, the device 200 includes: Module 210 is used to collect log data during software testing. It constructs a test log association graph using log events as nodes and causal relationships, temporal relationships, and module dependencies between events as edges. The weight of each edge is determined by semantic similarity, temporal interval, and module dependency. The weight W is calculated using the following formula: In the formula, S semantic Semantic similarity, T interval D is the normalized value of the time interval. module Module dependency; The localization module 220 is used to update and classify node features of the test log association graph using a graph neural network, adding an anomaly propagation weight factor to the node update formula, locating the anomaly source node in the test log association graph, and taking the anomaly source node as the log event corresponding to the root cause of the problem; the improved node update formula is: In the formula, Let W be the feature vector of node v in the (k+1)th layer, N(v) be the neighboring nodes of node v, and W be the feature vector of node v in the (k+1)th layer. uv Let A be the edge weight from node u to v, b be the bias term, δ be the anomaly propagation weight factor, and A be the edge weight from node u to v. v Let σ be the anomaly probability value of node v, and σ be the activation function. The confirmation module 230 is used to perform root cause verification based on the abnormal source node, combined with the code execution path and data dependency relationship. It extracts the code fragment corresponding to the abnormal source node through program slicing technology, and traces the input data and intermediate calculation process corresponding to the abnormal source node through data dependency analysis to confirm the accuracy of the root cause location.

[0042] Exemplary electronic devices Figure 3 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. For example... Figure 3 As shown, the electronic device 30 includes one or more processors 31 and memory 32.

[0043] The processor 31 may be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0044] The memory 32 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 31 may execute the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above, and / or other desired functions. In one example, the electronic device may also include an input device 33 and an output device 34, these components being interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0045] In addition, the input device 33 may also include, for example, a keyboard, a mouse, etc.

[0046] The output device 34 can output various information to the outside. The output device 34 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0047] Of course, for the sake of simplicity, Figure 3 Only some of the components of the electronic device relevant to the present invention are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.

[0048] Exemplary computer program products and computer-readable storage media In addition to the methods and apparatus described above, embodiments of the present invention may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods according to various embodiments of the present invention described in the "Exemplary Methods" section above.

[0049] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of the present invention. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0050] Furthermore, embodiments of the present invention may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps of the methods for information mining of historical change records according to various embodiments of the present invention as described in the "Exemplary Methods" section above.

[0051] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0052] The basic principles of the present invention have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in the present invention are merely examples and not limitations, and should not be considered as essential features of each embodiment of the present invention. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the present invention to the necessity of employing the aforementioned specific details.

[0053] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0054] The block diagrams of devices, systems, devices, and systems involved in this invention are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, systems, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0055] The methods and systems of the present invention may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of the present invention are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, the present invention may also be implemented as a program recorded on a recording medium, the program comprising machine-readable instructions for implementing the methods according to the present invention. Thus, the present invention also covers recording media storing programs for performing the methods according to the present invention.

[0056] It should also be noted that in the systems, apparatus, and methods of the present invention, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered equivalents of the present invention. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the invention. Therefore, the invention is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0057] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the invention to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A method for locating and fixing software testing problems, characterized in that, include: Log data is collected during software testing. A test log association graph is constructed, using log events as nodes and causal relationships, temporal relationships, and module dependencies between events as edges. The weight of each edge is determined by semantic similarity, temporal interval, and module dependency. The weight W is calculated using the following formula: In the formula, S semantic Semantic similarity, T interval D is the normalized value of the time interval. module Module dependency; A graph neural network is used to update and classify the node features of the test log association graph. An anomaly propagation weight factor is added to the node update formula to locate the anomaly source node in the test log association graph, and the anomaly source node is taken as the log event corresponding to the root cause of the problem. The improved node update formula is as follows: In the formula, Let W be the feature vector of node v in the (k+1)th layer, N(v) be the neighboring nodes of node v, and W be the feature vector of node v in the (k+1)th layer. uv Let A be the edge weight from node u to v, b be the bias term, δ be the anomaly propagation weight factor, and A be the edge weight from node u to v. v Let σ be the anomaly probability value of node v, and σ be the activation function. Based on the aforementioned source node of the anomaly, root cause verification is performed by combining the code execution path and data dependencies. The code fragment corresponding to the source node of the anomaly is extracted by program slicing technology, and the input data and intermediate calculation process corresponding to the source node of the anomaly are traced by data dependency analysis to confirm the accuracy of the root cause location.

2. The method according to claim 1, characterized in that, In the test log association graph construction step, the causal relationships, temporal relationships, and module association relationships between log events are extracted from the original log text using natural language processing technology. The semantic similarity S... semantic The similarity between log event content is calculated based on a word vector model.

3. The method according to claim 1, characterized in that, The anomaly propagation weight factor δ is set to 0.25, and the activation function σ is the ReLU function.

4. The method according to claim 1, characterized in that, The anomaly probability value A v Each log event is calculated using a pre-trained anomaly detection model, which employs either a statistical outlier detection algorithm or a deep learning-based autoencoder.

5. The method according to claim 1, characterized in that, The program slicing technology extracts the set of all statements that affect the output at the code location corresponding to the source node of the anomaly as the code fragment; the data dependency analysis traces the input variables and intermediate computing nodes that the anomaly output depends on by constructing a data dependency graph.

6. The method according to claim 1, characterized in that, The method further includes: Based on the software's change history, functional importance, and historical test data, machine learning algorithms are used to prioritize test cases. During test case execution, performance metrics and functional correctness are monitored in real time, and the test log association graph construction step is triggered when an anomaly is detected.

7. The method according to claim 1, characterized in that, The method further includes: Code structure features, code complexity features, and code style features are extracted from the code repository to construct a machine learning prediction model, which predicts potential problems in the code and uses the prediction results as prior information for constructing the test log association graph.

8. A software testing problem location and repair device, characterized in that, include: The construction module is used to collect log data during software testing. It uses log events as nodes and the causal relationships, temporal relationships, and module dependencies between events as edges to construct a test log association graph. The weight of each edge is determined by semantic similarity, temporal interval, and module dependency. The weight W is calculated using the following formula: In the formula, S semantic Semantic similarity, T interval D is the normalized value of the time interval. module Module dependency; The localization module is used to update and classify node features of the test log association graph using a graph neural network. An anomaly propagation weight factor is added to the node update formula to locate the anomaly source node in the test log association graph, and the anomaly source node is taken as the log event corresponding to the root cause of the problem. The improved node update formula is as follows: In the formula, Let W be the feature vector of node v in the (k+1)th layer, N(v) be the neighboring nodes of node v, and W be the feature vector of node v in the (k+1)th layer. uv Let A be the edge weight from node u to v, b be the bias term, δ be the anomaly propagation weight factor, and A be the edge weight from node u to v. v Let σ be the anomaly probability value of node v, and σ be the activation function. The confirmation module is used to perform root cause verification based on the anomaly source node, combined with the code execution path and data dependency relationship. It extracts the code fragment corresponding to the anomaly source node through program slicing technology, and traces the input data and intermediate calculation process corresponding to the anomaly source node through data dependency analysis to confirm the accuracy of the root cause location.

9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for performing the method described in any one of claims 1-7.

10. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1-7.