Software defect treatment method and system based on dynamic knowledge graph and multi-modal reasoning
By using dynamic knowledge graphs and multimodal reasoning, an entity relationship model is constructed and intelligent analysis is performed, which solves the problems of multi-source data silos and reliance on expert experience in software defect management, and achieves efficient and accurate defect location and repair.
Patent Information
- Application Number
- CN202610026409.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-09
- Publication Date
- 2026-02-06
AI Technical Summary
Existing software defect management suffers from problems such as silos of multi-source data, reliance on expert experience, high false alarm rates of static analysis tools, and low efficiency in defect location and repair.
By employing a method based on dynamic knowledge graphs and multimodal reasoning, a dynamic four-dimensional entity relationship model is constructed, various entity parameters are collected and standardized, and intelligent reasoning module analysis is performed to generate defect root causes and repair suggestions.
It improves the accuracy and efficiency of defect location, reduces manual intervention, enhances the quality and controllability of defect management, and realizes intelligent management of the entire process.
Smart Images

Figure CN121478627A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software defect management technology, and more specifically, to a software defect management method and system based on dynamic knowledge graphs and multimodal reasoning. Background Technology
[0002] Root cause analysis of software system defects, generation of repair suggestions, and digital management of testing experience are important aspects of routine software system maintenance.
[0003] Current software defect management primarily relies on manual tracing and investigation. This approach suffers from several problems: defect reports, code changes, test cases, and environment configurations are scattered across independent systems such as JIRA, Git, Jenkins, and Kubernetes, leading to inefficient cross-system correlation analysis, time-consuming and labor-intensive tracing, and a high dependence on personal experience. To replace manual work, existing technologies employ static code analysis tools (such as SonarQube and Checkstyle). However, these tools cannot correlate with runtime environment factors, resulting in a false positive rate as high as 38%, and they struggle to locate environment-related defects. Furthermore, 70% of defect remediation experience is not structured and is lost with personnel turnover.
[0004] Therefore, it is necessary to optimize software defect management methods to overcome technical bottlenecks such as difficulties in correlation analysis caused by multi-source data silos, over-reliance on expert experience and difficulty in knowledge accumulation, high false alarm rate of static analysis tools and inability to adapt to environmental changes, and lack of systematic iterative evolution mechanism for defect management experience, so as to improve the efficiency and accuracy of defect location. Summary of the Invention
[0005] The purpose of this invention is to provide a software defect management method and system based on dynamic knowledge graphs and multimodal reasoning, which can improve the efficiency and accuracy of defect localization.
[0006] This invention is achieved through the following technical solution: The software defect management method based on dynamic knowledge graphs and multimodal reasoning includes the following steps: Collect various entity parameters from different source systems, including defect, code, test, and environment data, and perform standardization processing. A dynamic four-dimensional entity relationship model is constructed. This model is used to form a knowledge graph based on four-dimensional entities, enabling structured storage and real-time updates of knowledge. The intelligent reasoning module performs root cause analysis of software defects and generates repair suggestions. Implement full-process management of defect remediation.
[0007] Preferably, the method for standardization is as follows: Build a unified data pipeline and connect to the defect tracking system, code version management system, test management system and environment configuration management system through multi-source adapter components; A spatiotemporal alignment processing method is adopted to establish a unified timeline based on event timestamps, set a time watermark threshold, and filter data streams within the effective time window. Perform entity identifier mapping operations to uniformly map entity identifiers from different systems to a standardized entity identifier system, and establish cross-system data association relationships; The collected data is verified for completeness, accuracy, and consistency to ensure the reliability of the input data.
[0008] Preferably, the method for constructing the dynamic four-dimensional entity relationship model is as follows: Construct multiple entity types, including defects, code changes, test cases, and runtime environments; Configure various attributes for entity types. Attributes for defects include verification level, reproduction steps, timestamp, and business impact. Attributes for code changes include AST characteristics, affected files, developers, and code complexity. Attributes for test cases include coverage path, assertion conditions, execution results, and priority. Attributes for the runtime environment include container configuration, network topology, resource quotas, and middleware version. Dynamic weights are established for entity types. These dynamic weights are used to calculate the correlation strength between candidate entity types and the current defect when performing defect root cause reasoning. The dynamic weights are then updated through the dynamic weight model. Configure the core features of the output for entity types. The core features of the output for defects, code changes, test cases and runtime environments are defect pattern coding, change impact score, test effectiveness index and environment stability index, respectively.
[0009] Preferably, the method for updating the dynamic weights using a dynamic weight model is as follows: Obtain the freshness index of the dynamic weight. : ; ; in, Represents time decay. This represents the frequency of use score, which is the normalized number of times a corresponding knowledge item is accessed within a preset period. This represents the validity verification score, which is calculated based on the proportion of the corresponding knowledge item that was adopted and successfully verified in historical analysis. , and As weight, It is a natural exponential function. The time elapsed since the last update of the dynamic weights; If freshness index If the value is less than 0.3, the dynamic weight is updated immediately; if the freshness index... If the value is not less than 0.3 and less than 0.6, the dynamic weight will be added to the planned update queue and wait for updating. It will be processed according to the plan when system resources are idle. If the freshness index... If the value is not less than 0.6, an update will only be triggered when requested or when the associated data changes.
[0010] Preferably, the method for updating the dynamic weights is as follows: ; in, and These are the dynamic weights before and after the update, respectively. The time decay factor, The learning rate is used to control the rate at which new feedback is incorporated. The validity verification score is the k-th feedback received within the past time period up to the present. This is a feedback discount factor used to adjust the degree of influence of historical feedback.
[0011] Preferably, the intelligent reasoning module includes: The multimodal feature extraction module is used to extract and fuse code semantic features, environment graph structure features, and log time series features; The graph neural network inference module is used to output the probability score of each entity as the root cause of the defect.
[0012] Preferably, the multimodal feature extraction module includes: The code feature encoder is a Transformer encoding architecture based on a self-attention mechanism, used to extract deep semantic features and structural information of code changes to obtain code semantic feature vectors; The environmental feature encoder processes the topological relationships of the environment configuration through a graph convolutional network structure to extract the structural features and dependencies of the system environment, thereby obtaining an environmental graph structural feature vector. The log feature encoder analyzes the temporal patterns of log data through a long short-time memory autoencoder to identify abnormal sequences and error trends, and obtains log temporal feature vectors. The cross-modal attention fusion layer is used to dynamically weight and fuse code semantic feature vectors, environment graph structure feature vectors, and log time-series feature vectors through residual connections and layer normalization to generate a unified cross-modal feature representation.
[0013] Preferably, the graph neural network inference module includes: The local attention aggregation layer uses a graph attention network to capture the direct relationships between entities and calculate the influence weights of adjacent nodes through a multi-head attention mechanism. The global relational reasoning layer adopts a graph Transformer structure and discovers indirect association patterns and long-range dependencies between entities through a self-attention mechanism.
[0014] Preferably, the training method for the multimodal feature extraction module is as follows: The initial training was performed on historical project data to obtain the basic model; A fine-tuned model is obtained by performing a second training using data from the target project. The model is continuously trained based on the data generated during the usage process to obtain a long-term optimized model.
[0015] This invention also provides a software defect management system based on dynamic knowledge graphs and multimodal reasoning, applied to the aforementioned software defect management method based on dynamic knowledge graphs and multimodal reasoning, including: The data acquisition layer is used to collect parameters of various entities from various source systems, including defect, code, test and environmental data, and to perform standardization processing. The knowledge graph layer is used to construct a dynamic four-dimensional entity relationship model. This dynamic four-dimensional entity relationship model is used to form a knowledge graph based on four-dimensional entities, enabling structured storage and real-time updates of knowledge. The intelligent analysis layer is used to perform root cause analysis of software defects and generate repair suggestions through the intelligent reasoning module. The application service layer is used for the entire process management of defect governance.
[0016] The technical solution of the present invention has at least the following advantages and beneficial effects: This invention collects multiple types of entity parameters from multiple source systems and performs correlation analysis on these entity parameters, effectively avoiding the problem of data isolation and providing a reliable data foundation for defect analysis. This invention constructs a dynamic four-dimensional entity relationship model and forms a knowledge graph based on the dynamic four-dimensional entity relationship model. It also sets up a dynamic update mechanism so that the knowledge graph can evolve in real time with data changes, overcoming the problem of the accuracy of traditional static knowledge bases decreasing over time. This invention, based on dynamic knowledge graphs, uses an intelligent reasoning module to perform joint reasoning on multi-dimensional entity relationships such as defects, code, tests, and environment, which helps improve the accuracy of defect root cause localization and the rationality of remediation suggestions. This invention is rationally designed to achieve intelligent management of the entire process of defect discovery, analysis, processing and tracking, which helps to improve the controllability of defect management, reduce manual intervention and improve the efficiency and quality of software defect management. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the software defect management method based on dynamic knowledge graph and multimodal reasoning provided in Embodiment 1 of the present invention. Figure 2 This is a schematic diagram illustrating the working principle of the multimodal feature extraction module provided in Embodiment 1 of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0019] Example 1 Software defect management methods based on dynamic knowledge graphs and multimodal reasoning, see [reference]. Figure 1 This includes the following steps: First, it is necessary to collect various entity parameters from various source systems, including defect, code, test and environment data, and then standardize them.
[0020] In this embodiment, the standardization process is performed as follows: Build a unified data pipeline and connect to the defect tracking system, code version management system, test management system and environment configuration management system through multi-source adapter components; A spatiotemporal alignment processing method is adopted to establish a unified timeline based on event timestamps, set a time watermark threshold, and filter data streams within the effective time window to ensure the temporal consistency of data. Perform entity identifier mapping operations to uniformly map entity identifiers from different systems to a standardized entity identifier system, and establish cross-system data association relationships; The collected data is verified for completeness, accuracy, and consistency to ensure the reliability of the input data.
[0021] To identify and process the collected entity parameters, it is necessary to construct a dynamic four-dimensional entity relationship model. This model forms a knowledge graph, enabling structured storage and real-time updates of knowledge.
[0022] As a preferred option, referring to Table 1 below, the method for constructing a dynamic four-dimensional entity relationship model is as follows: Construct multiple entity types, including defects, code changes, test cases, and runtime environments; Configure various attributes for entity types. Attributes for defects include verification level, reproduction steps, timestamp, and business impact. Attributes for code changes include AST characteristics, affected files, developers, and code complexity. Attributes for test cases include coverage path, assertion conditions, execution results, and priority. Attributes for the runtime environment include container configuration, network topology, resource quotas, and middleware version. Dynamic weights are established for entity types. These dynamic weights are used to calculate the correlation strength between candidate entity types and the current defect when performing defect root cause reasoning. The dynamic weights are then updated through the dynamic weight model. Configure the core features of the output for entity types. The core features of the output for defects, code changes, test cases and runtime environments are defect pattern coding, change impact score, test effectiveness index and environment stability index, respectively.
[0023] Table 1. Dynamic four-dimensional entity relationship model.
[0024]
[0025] The dynamic weighting model in this embodiment achieves its effect by linearly weighting and fusing the time decay effect with the feedback reinforcement mechanism. Its core lies in a composite mathematical expression. This method explicitly defines the law of historical knowledge value decaying over time, and how new feedback information is integrated and influences the weights. Based on this, the method for updating the dynamic weights through the dynamic weighting model is as follows: Obtain the freshness index of the dynamic weight. : ; ; in, Represents time decay. This represents the frequency of use score, which is the normalized number of times a corresponding knowledge item is accessed within a preset period. The preset period is a fixed duration. This represents the validity verification score, which is calculated based on the proportion of the corresponding knowledge item that was adopted and successfully verified in historical analysis. , and As weight, It is a natural exponential function. This is the time elapsed since the last update of the dynamic weights. As a preferred example, , and The values are 0.4, 0.3 and 0.3 respectively.
[0026] If freshness index If the value is less than 0.3, the system automatically marks the knowledge item as "outdated" and therefore immediately updates the dynamic weight. If freshness index If the value is not less than 0.3 and less than 0.6, the dynamic weight will be included in the planned update queue and wait for update. It will be processed according to the plan when system resources are idle. If freshness index A value of 0.6 or higher indicates that no active update is needed at this time; updates will only be triggered when requested or when related data changes.
[0027] Specifically, the method for updating the dynamic weights is as follows: ; in, and These are the dynamic weights before and after the update, respectively. The time decay factor, The learning rate is used to control the rate at which new feedback is incorporated. The validity verification score is the k-th feedback received within the past time period up to the present. This is a feedback discount factor used to adjust the degree of influence of historical feedback. It's worth noting that an initial dynamic weight can be preset at the beginning for easy updates later.
[0028] First, the updated dynamic weights in the exponential decay function Under the influence of The larger the value, the more significant the decay; this part of the calculation simulates the natural aging process of knowledge over time. Secondly, all validity verification scores for this knowledge are collected and stored in chronological order. The validity verification scores for each historical period are obtained by summing the weights. The weighted summation means that the more recent the feedback, the higher its weight in the summation. The greater the impact on the final result, the more significant the effect. In particular, the time decay factor... A preferred setting is 0.85, which is the feedback discount factor. The learning rate can then be set to 0.9. The preferred value is 0.15. This dynamic weight is applied to the relationships between entities in the knowledge graph. According to the settings of this embodiment, the dynamic weight is applied to the relationships between entities in the knowledge graph. When performing defect root cause reasoning, the system calculates the association strength between candidate entities (such as code changes, environment configuration items) and the current defect. This association strength is calculated by the dynamic weight model described above. The association path with a higher weight is considered more credible in the reasoning.
[0029] Based on the above approach, the collected data and established knowledge graph can be used to perform root cause analysis of software defects and generate repair suggestions through the intelligent reasoning module.
[0030] In this embodiment, the intelligent reasoning module includes: The multimodal feature extraction module is used to extract and fuse code semantic features, environment graph structure features, and log time series features; The graph neural network inference module is used to output the probability score of each entity as the root cause of the defect.
[0031] On the one hand, a schematic diagram illustrating the working principle of the multimodal feature extraction module can be found in [reference needed]. Figure 2 The multimodal feature extraction module includes: The code feature encoder, based on a self-attention mechanism and the Transformer encoding architecture, is used to extract deep semantic features and structural information of code changes, resulting in a code semantic feature vector extracted by the Transformer encoder. The feature extraction can be implemented by converting the source code into an abstract syntax tree (AST), i.e., a code change AST, using a parser. Then, structural features (such as node type, depth, and number of branches), semantic features (identifiers and context encoded via a neural network), and complexity metrics (such as cyclomatic complexity) are extracted from the tree.
[0032] The environment feature encoder processes the topological relationships of environment configurations through a graph convolutional network structure to extract the structural features and dependencies of the system environment, resulting in an environment graph structure feature vector extracted by the graph convolutional network. Specifically, the extraction method can be as follows: model the environment configuration (such as containers, network policies, and resource quotas) as a graph structure, i.e., the environment configuration topology graph, where nodes represent components and edges represent dependencies. Use a graph convolutional network to process this structure and learn the feature representation of each configuration node in its neighbor context.
[0033] The log feature encoder analyzes the temporal patterns of log data using a Long Short-Term Memory (LSTM) autoencoder to identify anomalous sequences and error trends, obtaining log temporal feature vectors extracted by the LSTM autoencoder. The extraction method can be as follows: parsing and encoding the log sequence, using the LSTM autoencoder model to learn the normal temporal patterns between log events, and identifying anomalous sequences that deviate from this pattern.
[0034] The cross-modal attention fusion layer takes the feature vectors from the three modalities mentioned above as input, and then dynamically weights and fuses the code semantic feature vector, environment graph structure feature vector, and log temporal feature vector through residual connections and layer normalization. During weighted fusion, the relative importance of each modal feature is calculated, ultimately generating a unified cross-modal feature representation. The use of residual connections and layer normalization techniques in the feature fusion process ensures training stability and the effectiveness of feature representation.
[0035] Based on the fused feature representation, root cause classification, repair suggestion generation, and confidence assessment can be output in the global relation inference layer, which serves as the subsequent inference output layer.
[0036] On the other hand, the graph neural network inference module includes: The local attention aggregation layer employs a graph attention network, using a multi-head attention mechanism to capture direct relationships between entities and calculate the influence weights of neighboring nodes. The principle of this layer is that, in the knowledge graph, it first focuses on each entity and its directly connected neighboring entities. The graph attention network calculates an attention coefficient for each pair of neighboring nodes, which determines the proportion of information from each neighbor that should be given during information aggregation. Through the multi-head attention mechanism, aggregation is performed simultaneously from multiple different representation subspaces to capture richer local information.
[0037] The global relational reasoning layer employs a graph Transformer structure, utilizing a self-attention mechanism to discover indirect association patterns and long-range dependencies between entities. Its principle is that, based on local aggregation, the graph Transformer structure facilitates information propagation and reasoning across the entire graph. Through self-attention, each node can "pay attention" to all other nodes in the graph, thereby discovering potential associations and long-range dependencies between indirect entities. After multiple rounds of such global information interaction, the feature representation of each node incorporates the contextual information of the entire graph.
[0038] When outputting the root cause of a defect, the node features processed by the hierarchical attention mechanism are input into a classifier. The classifier outputs a probability score for each entity as the root cause of the current defect, thereby achieving accurate root cause localization. A softmax function can be used for multi-class probability calculation; the inference system supports multi-round iterative inference, gradually refining and optimizing the analysis results through a confidence propagation algorithm.
[0039] Furthermore, the training method for the multimodal feature extraction module can be: The initial training is conducted on historical project data to obtain a basic model. The goal is to enable the model to learn domain-wide characteristics and patterns of software defects, such as common code smells, configuration error patterns, and log error chains, and to build a basic pattern library. A second training process is performed using data from the target project to obtain a fine-tuned model. This step focuses on adjusting the model to adapt it to the specific technology stack, architectural features, and business context of the new project. This process is achieved through feature space alignment techniques. Simultaneously, patterns relevant to the target project are selected from the basic pattern library to form the initial adaptation pattern library for that project.
[0040] Third-party training is continuously conducted based on data generated during usage to obtain a long-term optimized model. For example, online learning algorithms incrementally absorb newly generated experience data, continuously optimize the project-specific model, and use techniques such as experience replay buffers to balance new knowledge learning and old knowledge retention, preventing catastrophic forgetting in the process of adapting the model to new projects.
[0041] Finally, it enables full-process management of defect remediation.
[0042] This embodiment can also set up a self-evolving knowledge system to form a closed-loop learning mechanism of "analysis-generation-verification-feedback".
[0043] During the analysis phase, when a new defect occurs, the system first performs multi-dimensional pattern recognition, including temporal patterns (occurrence time regularity), spatial patterns (affected modules / services), and behavioral patterns (error log characteristics). The current defect is then matched with a historical defect database to identify relevant historical lessons.
[0044] During the generation phase, successful remediation solutions are extracted and adapted from matched similar historical cases. Using a trained model and the unique context of the current defect, new and unseen remediation suggestions are generated. All generated suggestions are sorted and filtered, prioritizing solutions with high confidence, low implementation cost, and low risk.
[0045] During the verification phase, after the remediation recommendations are adopted and implemented, the system will collect the implementation results and quantitatively evaluate the effectiveness of the recommendations from three dimensions: Technical effectiveness: Has the problem been resolved? Implementation costs: the amount of work required; Risk impact: Whether it introduces new problems.
[0046] Based on these indicators, a comprehensive score is given for this restoration experience.
[0047] During the feedback phase, the experience gained (defect features, adopted suggestions, and effect scores) is used as new training data. Incremental learning techniques are employed to fine-tune the model, enabling it to absorb new knowledge while avoiding the forgetting of old knowledge through techniques such as knowledge distillation. Based on the feedback scores, the dynamic weights of relevant entities and relationships in the knowledge graph are updated; for details, please refer to the dynamic weight update method mentioned in this embodiment.
[0048] Under the scheme of this embodiment, an implementation example is as follows: A large trading platform, employing a cloud-native microservice architecture, serves hundreds of millions of users and processes over ten million transactions daily. Its system characteristics include: over 200 microservices using the Spring Cloud + Kubernetes technology stack; a production environment running on a Kubernetes cluster spanning three regions, totaling over 5,000 Pods; involvement of over 30 independent systems, including GitLab (code), Jenkins (build), JIRA (defects), Prometheus (monitoring), ELK (logging), SkyWalking (tracing), and Nacos (configuration center); over 500 code commits daily and over 20 production releases weekly. Its core pain points are: a single online payment failure requires six senior engineers to spend four hours investigating 15 related systems and analyzing over 20,000 lines of logs to pinpoint the root cause; 30% of online defects are related to environment configuration, but traditional tools cannot link code and environmental factors; new personnel need six months to independently handle complex defects, making it difficult to transfer expert experience.
[0049] When applying the application, defect data primarily comes from JIRA and generally includes defect ID, title, description, severity level (P0-P4); reproduction steps, business impact scope (number of affected users, number of orders); timestamps: creation time, update time, resolution time; associated code commit ID, test case ID. Code data comes from GitLab, including commit hash, author, commit time; list of changed files and differences; code complexity metrics: cyclomatic complexity change, code line count change; and the identifier of the affected service module. Test data can come from Jenkins / TestNG, including test case ID, execution result (pass / fail); execution time, execution time; code coverage data: line coverage, branch coverage; and associated code commit scope. Environment data comes from K8s / Nacos, including Pod configuration: CPU limit (number of cores), memory limit (GB), number of replicas; service configuration: timeout (milliseconds), number of retries, circuit breaker configuration; middleware configuration: database connection pool size, Redis timeout, MQ queue depth; and network configuration: service mesh strategy, load balancing algorithm.
[0050] The spatiotemporal alignment process is as follows: Time window: The time of defect occurrence is the center, and the window is extended by 1 hour before and after it as the correlation window.
[0051] Entity mapping: Map JIRA defect IDs, Git commit hashes, and K8s Pod names to internal system entity IDs.
[0052] Data quality verification: Check data integrity (required fields), consistency (timestamp logic), and accuracy (configured value range).
[0053] Then, the dynamic four-dimensional entity relationship model is established as shown in Table 2.
[0054] Table 2. Dynamic four-dimensional entity relationship model of the case.
[0055]
[0056] In the multimodal feature extraction module, the actual configuration can be as follows: (1) Actual parameters of code AST features: Structural features: The depth of payment service method calls has increased from 3 layers to 8 layers; Semantic features: The newly added "risk control verification" method introduces an external HTTP call; Complexity characteristics: The cyclomatic complexity of the key payment methods increased from 12 to 25; (2) Actual parameters of the environmental configuration diagram structure: a. Node attributes: Payment service Pod: CPU = 2 cores, memory = 4GB, number of replicas = 10; Database instance: Connections = 200, Timeout = 5000ms; Redis Cluster: Connection Pool = 100, Timeout = 2000ms; b. Edge relations: Payment service → Database: JDBC connection, average latency = 20ms; Payment services → Redis: cached reads, average latency = 2ms; Payment services → Risk control services: HTTP call, average latency = 50ms; (3) Actual parameters of log time-series characteristics: Error pattern: The "Connection timeout" error peaked between 20:30 and 20:35, with the frequency increasing from 5 times / minute to 200 times / minute; Performance metrics: The response time of the payment interface P99 increased dramatically from 200ms to 5000ms; Resource metrics: The CPU utilization of the payment service Pod increased from 40% to 95%.
[0057] The following specific effects were achieved on this large trading platform: Efficiency improvement: Average defect location time: reduced from 4 hours to 15 minutes; The initial repair suggestion adoption rate increased from 35% to 88%. The time for new employees to independently handle defects has been reduced from 6 months to 1 month. Quality improvement: Defect false alarm rate: reduced from 42% to 11%; Repeat defect incidence: reduced by 65%; Average online resolution time for critical defects (P0 / P1) has decreased from 2 hours to 25 minutes. Knowledge Accumulation: Structured knowledge entries: Over 5000 defect handling experiences accumulated; Automated rules: Generates 200+ preventative monitoring rules; Cross-team collaboration: Sharing experience in handling defects across different business lines (e-commerce, finance, logistics) improves efficiency by 300%.
[0058] Example 2 This embodiment provides a software defect management system based on dynamic knowledge graphs and multimodal reasoning, applied to the aforementioned software defect management method based on dynamic knowledge graphs and multimodal reasoning, including: The data acquisition layer is used to collect parameters of various entities from various source systems, including defect, code, test and environmental data, and to perform standardization processing. The knowledge graph layer is used to construct a dynamic four-dimensional entity relationship model. This dynamic four-dimensional entity relationship model is used to form a knowledge graph based on four-dimensional entities, enabling structured storage and real-time updates of knowledge. The intelligent analysis layer is used to perform root cause analysis of software defects and generate repair suggestions through the intelligent reasoning module. The application service layer is used for the entire process management of defect governance.
[0059] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A software defect management method based on dynamic knowledge graphs and multimodal reasoning, characterized in that, Includes the following steps: Collect various entity parameters from different source systems, including defect, code, test, and environment data, and perform standardization processing. A dynamic four-dimensional entity relationship model is constructed. This model is used to form a knowledge graph based on four-dimensional entities, enabling structured storage and real-time updates of knowledge. The intelligent reasoning module performs root cause analysis of software defects and generates repair suggestions. Implement full-process management of defect remediation.
2. The software defect management method based on dynamic knowledge graph and multimodal reasoning according to claim 1, characterized in that, The method for standardization is as follows: Build a unified data pipeline and connect to the defect tracking system, code version management system, test management system and environment configuration management system through multi-source adapter components; A spatiotemporal alignment processing method is adopted to establish a unified timeline based on event timestamps, set a time watermark threshold, and filter data streams within the effective time window; Perform entity identifier mapping operations to uniformly map entity identifiers from different systems to a standardized entity identifier system, and establish cross-system data association relationships; The collected data is verified for completeness, accuracy, and consistency to ensure the reliability of the input data.
3. The software defect management method based on dynamic knowledge graph and multimodal reasoning according to claim 1, characterized in that, The method for constructing a dynamic four-dimensional entity relationship model is as follows: Build multiple entity types, including defects, code changes, test cases, and runtime environments; Configure various attributes for entity types. Attributes for defects include verification level, reproduction steps, timestamp, and business impact. Attributes for code changes include AST characteristics, affected files, developers, and code complexity. Attributes for test cases include coverage path, assertion conditions, execution results, and priority. Attributes for the runtime environment include container configuration, network topology, resource quotas, and middleware version. Dynamic weights are established for entity types. These dynamic weights are used to calculate the correlation strength between candidate entity types and the current defect when performing defect root cause reasoning. The dynamic weights are then updated through the dynamic weight model. Configure the core features of the output for entity types. The core features of the output for defects, code changes, test cases and runtime environments are defect pattern coding, change impact score, test effectiveness index and environment stability index, respectively.
4. The software defect management method based on dynamic knowledge graph and multimodal reasoning according to claim 3, characterized in that, The method for updating the dynamic weights using a dynamic weight model is as follows: Obtain the freshness index of the dynamic weight. : ; ; in, Represents time decay. This represents the frequency of use score, which is the normalized number of times a corresponding knowledge item is accessed within a preset period. This represents the validity verification score, which is calculated based on the proportion of the corresponding knowledge item that was adopted and successfully verified in historical analysis. , and As weight, It is a natural exponential function. The time elapsed since the last update of the dynamic weights; If freshness index If the value is less than 0.3, the dynamic weight is updated immediately; if the freshness index... If the value is not less than 0.3 and less than 0.6, the dynamic weight will be added to the planned update queue and wait for updating. It will be processed according to the plan when system resources are idle. If the freshness index... If the value is not less than 0.6, an update will only be triggered when requested or when the associated data changes.
5. The software defect management method based on dynamic knowledge graph and multimodal reasoning according to claim 4, characterized in that, The method for updating the dynamic weights is as follows: ; in, and These are the dynamic weights before and after the update, respectively. The time decay factor, The learning rate is used to control the rate at which new feedback is incorporated. The validity verification score is the k-th feedback received within the past time period up to the present. This is a feedback discount factor used to adjust the degree of influence of historical feedback.
6. The software defect management method based on dynamic knowledge graph and multimodal reasoning according to claim 1, characterized in that, The intelligent reasoning module includes: The multimodal feature extraction module is used to extract and fuse code semantic features, environment graph structure features, and log time series features; The graph neural network inference module is used to output the probability score of each entity as the root cause of the defect.
7. The software defect management method based on dynamic knowledge graph and multimodal reasoning according to claim 6, characterized in that, The multimodal feature extraction module includes: The code feature encoder is a Transformer encoding architecture based on a self-attention mechanism, used to extract deep semantic features and structural information of code changes to obtain code semantic feature vectors; The environment feature encoder processes the topological relationships of the environment configuration through a graph convolutional network structure to extract the structural features and dependencies of the system environment, and obtains the environment graph structure feature vector. The log feature encoder analyzes the temporal patterns of log data through a long short-time memory autoencoder to identify abnormal sequences and error trends, and obtains log temporal feature vectors. The cross-modal attention fusion layer is used to dynamically weight and fuse code semantic feature vectors, environment graph structure feature vectors, and log time-series feature vectors through residual connections and layer normalization to generate a unified cross-modal feature representation.
8. The software defect management method based on dynamic knowledge graph and multimodal reasoning according to claim 6, characterized in that, The graph neural network inference module includes: The local attention aggregation layer uses a graph attention network to capture the direct relationships between entities and calculate the influence weights of adjacent nodes through a multi-head attention mechanism. The global relational reasoning layer adopts a graph Transformer structure and discovers indirect association patterns and long-range dependencies between entities through a self-attention mechanism.
9. The software defect management method based on dynamic knowledge graph and multimodal reasoning according to claim 6, characterized in that, The training method for the multimodal feature extraction module is as follows: The initial training was performed on historical project data to obtain the basic model; A fine-tuned model is obtained by performing a second training using data from the target project. The model is continuously trained based on the data generated during the usage process to obtain a long-term optimized model.
10. A software defect management system based on dynamic knowledge graphs and multimodal reasoning, applied to the software defect management method based on dynamic knowledge graphs and multimodal reasoning as described in any one of claims 1-9, characterized in that, include: The data acquisition layer is used to collect parameters of various entities from various source systems, including defect, code, test and environmental data, and to perform standardization processing. The knowledge graph layer is used to construct a dynamic four-dimensional entity relationship model. This dynamic four-dimensional entity relationship model is used to form a knowledge graph based on four-dimensional entities, enabling structured storage and real-time updates of knowledge. The intelligent analysis layer is used to perform root cause analysis of software defects and generate repair suggestions through the intelligent reasoning module. The application service layer is used for the entire process management of defect governance.
Citation Information
Patent Citations
Automatic domain knowledge map construction method for software defects
CN108121829A
Software code defect automatic detection and repair system based on deep learning
CN121050920A
Intelligent identification and early warning method for chemical potential safety hazards
CN121170993A
