Performance test method and device for distributed system

By generating an initial test space through dynamic hierarchical sampling and trial-and-error learning, and combining it with knowledge graph analysis of real-time data, the problems of parameter redundancy and low efficiency in anomaly localization in distributed system performance testing are solved, achieving efficient performance testing and anomaly event localization.

CN121764786APending Publication Date: 2026-03-31AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In distributed system performance testing, redundant parameter combinations lead to a large number of test cases, resulting in low efficiency. Furthermore, existing methods struggle to respond to system state changes and locate abnormal events in real time.

Method used

An initial performance test space is generated through dynamic hierarchical sampling. Redundant data is removed by trial and error learning. Historical and real-time streaming data are analyzed using knowledge graphs to perform dynamic weighted node matching and cascaded enhanced path reasoning to locate abnormal events.

Benefits of technology

It achieves efficient performance testing, reduces redundant test cases, improves testing efficiency and the accuracy of anomaly localization, and adapts to dynamic changes in the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764786A_ABST
    Figure CN121764786A_ABST
Patent Text Reader

Abstract

The invention discloses a performance testing method and device for a distributed system. The method comprises the following steps: generating an initial performance test space based on performance parameters of a distributed system; simulating a running environment and a load condition of the distributed system in the initial performance test space to obtain a test case set of the distributed system; deleting redundant data from the test case set through trial and error learning to obtain an effective test case set; performing performance test on the distributed system by utilizing the effective test case set, and obtaining real-time stream data generated in the test process; analyzing the historical test data and the real-time streaming data by using a knowledge graph to obtain a test data analysis result; and positioning an abnormal event in a test process by utilizing a test data analysis result through dynamic weight node matching and cascade enhanced path reasoning. According to the method and the device, the technical problems of huge test case scale and low efficiency caused by parameter combination redundancy in distributed system performance testing in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed system testing technology, and more specifically, to a performance testing method and apparatus for distributed systems. Background Technology

[0002] With the rapid development of cloud computing and big data technologies, distributed systems have become the cornerstone of modern IT architecture due to their high availability and scalability. The complexity of distributed systems is not only reflected in the diversity of their physical components, such as server clusters, network devices, and storage systems, but also in the intricate interplay of software components, such as microservice architecture, data stream processing, and distributed databases. Therefore, comprehensive and in-depth performance testing is crucial.

[0003] In distributed system performance testing, traditional methods typically involve exploring the entire parameter space or employing simple random sampling strategies to cover all possible failure scenarios. While comprehensive, this approach is inefficient. The number of test cases grows exponentially with the increase in parameter dimensions, leading to long testing cycles, high costs, and difficulty in effectively identifying key parameter combinations when faced with complex relationships between parameters, resulting in a large number of invalid or inefficient tests.

[0004] Anomaly localization is another major challenge in distributed system testing. Due to the interdependence between system components, a single failure can trigger a chain reaction, causing multiple components to malfunction. Traditional methods rely on manual log analysis or pattern matching based on fixed rule bases, which prove inadequate when faced with dynamically changing failure modes. Furthermore, the reusability of anomaly patterns and remediation solutions across different scenarios is poor. After each test, there is a lack of an effective closed-loop feedback mechanism between test results and historical data, preventing parameter optimization and anomaly identification rules from dynamically iterating and adapting to different scenarios, thus limiting the accuracy and efficiency of testing.

[0005] Existing technologies, such as deep learning-based anomaly detection methods, while improving accuracy to some extent, often neglect the impact of real-time system state changes on anomaly localization. These methods primarily focus on single-dimensional anomaly detection, such as time-series anomaly detection based on time-frequency contrastive learning, and cannot respond in real-time to changes in multi-dimensional system parameters, especially abrupt attribute changes at critical points. Furthermore, the lack of hardware acceleration design leads to high inference latency and difficulties in edge deployment, limiting their application in real-time testing environments.

[0006] Furthermore, knowledge graphs, as a graphical data structure for expressing complex relationships between entities, have demonstrated enormous potential in fields such as data mining and natural language processing in recent years. In distributed system performance testing, the introduction of knowledge graphs aims to store and infer abnormal patterns and association rules in historical test data, and to generate location paths by matching abnormal features in the current test in real time using graph neural networks. Theoretically, this method can overcome the limitations of traditional testing methods, such as redundant parameter combinations and reliance on experience for anomaly localization, achieving intelligent and efficient performance testing. However, the effectiveness of static knowledge graphs that solely rely on historical data is limited when facing real-time system state changes.

[0007] There is currently no effective solution to the above problems. Summary of the Invention

[0008] This invention provides a method and apparatus for performance testing of distributed systems, which at least solves the technical problem in related technologies where redundant parameter combinations in distributed system performance testing lead to large test case sizes and low efficiency.

[0009] According to one aspect of the present invention, a performance testing method for a distributed system is provided, comprising: generating an initial performance test space based on the performance parameters of the distributed system; simulating the operating environment and load conditions of the distributed system in the initial performance test space to obtain a test case set for the distributed system; deleting redundant data from the test case set through trial and error learning to obtain an effective test case set, wherein the redundant data is data in the test case set whose performance impact on the distributed system is less than a performance impact threshold; performing performance testing on the distributed system using the effective test case set and acquiring real-time streaming data generated during the testing process; analyzing historical test data and the real-time streaming data using a knowledge graph to obtain test data analysis results; and locating abnormal events during the testing process using the test data analysis results through dynamic weighted node matching and cascaded enhanced path reasoning.

[0010] Optionally, generating an initial performance test space based on the performance parameters of the distributed system includes: extracting the performance parameters of the distributed system through dynamic hierarchical sampling, wherein the performance parameters include the following information of the distributed system: network configuration parameters, node resource thresholds, data replication strategies, and transaction concurrency; and generating the initial performance test space based on the performance parameters.

[0011] Optionally, obtaining a valid test case set by deleting redundant data from the test case set through trial-and-error learning includes: inputting the test case set into a reinforcement learning model to perform trial-and-error learning based on the test case set using the reinforcement learning model to obtain the redundant data in the test case set; and deleting the redundant data from the test case set to obtain the valid test case set.

[0012] Optionally, before analyzing historical test data and real-time streaming data using the knowledge graph to obtain test data analysis results, the performance testing method further includes: extracting high-frequency anomaly events from historical test logs using the TF-IDF algorithm, and using the high-frequency anomaly events as the root nodes of the knowledge graph, wherein the high-frequency anomaly events are anomaly events whose occurrence frequency exceeds an anomaly frequency threshold among all anomaly events; generating system component nodes of the knowledge graph based on the architecture topology information of the distributed system; dynamically expanding the child nodes of the knowledge graph by obtaining the anomaly propagation path corresponding to the real-time streaming data; generating temporal associations between each anomaly event and the system component nodes through a conditional random field to obtain a hierarchical node structure of the knowledge graph; and performing edge relationship expansion and attribute adaptive update on the knowledge graph to obtain the knowledge graph.

[0013] Optionally, the performance testing method further includes: when the number of nodes in the knowledge graph reaches a node number threshold and the anomaly recognition rate decreases by a predetermined number of consecutive predetermined times, automatically connecting low-frequency anomaly events and core component nodes through cascaded influence edges to form an association network; and recalculating the attribute weights of the knowledge graph based on the current test scenario.

[0014] Optionally, the historical test data and the real-time streaming data are analyzed using a knowledge graph to obtain test data analysis results, including: matching the real-time streaming data with abnormal event nodes in the knowledge graph to obtain node matching degree; when the node matching degree reaches a node matching degree threshold, determining that the abnormal event node is activated as an active node; searching the propagation path of the abnormal event based on the active node; and determining the information corresponding to the propagation path as the test data analysis results.

[0015] Optionally, the abnormal events in the testing process are located using the test data analysis results through dynamic weighted node matching and cascaded enhanced path reasoning, including: calculating the static edge confidence of the static dependency edges between each node and other nodes in the knowledge graph based on the set of activated nodes corresponding to the activated nodes; generating all potential abnormal propagation paths based on the static edge confidence and the dynamic enhanced edge confidence; performing attribute deviation verification on the abnormal propagation paths to obtain verification results; and obtaining the abnormal event based on the verification results.

[0016] Optionally, after using the test data analysis results to locate abnormal events in the test process through dynamic weight node matching and cascaded enhanced path reasoning, the performance testing method further includes: feeding the test results of the distributed system back into the knowledge graph and the reinforcement learning model to update the knowledge graph and the reinforcement learning model.

[0017] According to another aspect of the present invention, a performance testing apparatus for a distributed system is also provided, comprising: a generation unit for generating an initial performance test space based on the performance parameters of the distributed system; a simulation unit for simulating the operating environment and load conditions of the distributed system in the initial performance test space to obtain a test case set for the distributed system; a deletion unit for deleting redundant data from the test case set through trial and error learning to obtain a valid test case set, wherein the redundant data is data in the test case set whose performance impact on the distributed system is lower than a performance impact threshold; a testing unit for performing performance testing on the distributed system using the valid test case set and acquiring real-time streaming data generated during the testing process; an analysis unit for analyzing historical test data and the real-time streaming data using a knowledge graph to obtain test data analysis results; and a processing unit for locating abnormal events during the testing process using the test data analysis results through dynamic weighted node matching and cascaded enhanced path reasoning.

[0018] Optionally, the generation unit includes: an extraction module, configured to extract the performance parameters in the distributed system through dynamic hierarchical sampling, wherein the performance parameters include the following information of the distributed system: network configuration parameters, node resource thresholds, data replication strategy, and transaction concurrency; and a first generation module, configured to generate the initial performance test space based on the performance parameters.

[0019] Optionally, the deletion unit includes: a trial-and-error module, used to input the test case set into a reinforcement learning model, so as to use the reinforcement learning model to perform trial-and-error learning based on the test case set to obtain the redundant data in the test case set; and a deletion module, used to delete the redundant data from the test case set to obtain the effective test case set.

[0020] Optionally, the performance testing device further includes: an extraction module, used to extract high-frequency anomaly events from historical test logs using the TF-IDF algorithm before analyzing historical test data and the real-time streaming data using the knowledge graph to obtain test data analysis results, and using the high-frequency anomaly events as the root nodes of the knowledge graph, wherein the high-frequency anomaly events are anomaly events whose occurrence frequency exceeds an anomaly frequency threshold among all anomaly events; a second generation module, used to generate system component nodes of the knowledge graph based on the architecture topology information of the distributed system; an acquisition module, used to acquire the anomaly propagation path corresponding to the real-time streaming data and dynamically expand the child nodes of the knowledge graph; a third generation module, used to generate temporal associations between each anomaly event and the system component nodes through a conditional random field to obtain a hierarchical node structure of the knowledge graph; and an update module, used to perform edge relationship expansion and attribute adaptive update on the knowledge graph to obtain the knowledge graph.

[0021] Optionally, the performance testing device further includes: a connection module, used to automatically connect low-frequency abnormal events and core component nodes through cascaded influence edges to form an association network when the number of nodes in the knowledge graph reaches a node number threshold and the anomaly recognition rate decreases by a predetermined value for a predetermined number of consecutive times; and a first calculation module, used to recalculate the attribute weights of the knowledge graph based on the current test scenario.

[0022] Optionally, the analysis unit includes: a matching module, used to match the real-time streaming data with the abnormal event nodes in the knowledge graph to obtain a node matching degree; a first determining module, used to determine that the abnormal event node is activated as an active node when the node matching degree reaches a node matching degree threshold; a search module, used to search for the propagation path of the abnormal event based on the active node; and a second determining module, used to determine that the information corresponding to the propagation path is the test data analysis result.

[0023] Optionally, the processing unit includes: a second calculation module, configured to calculate the static edge confidence of the static dependency edges between each node and other nodes in the knowledge graph based on the set of activation nodes corresponding to the activation node; a third generation module, configured to generate all potential anomaly propagation paths based on the static edge confidence and the dynamically enhanced edge confidence; a verification module, configured to perform attribute deviation verification on the anomaly propagation paths to obtain verification results; and an acquisition module, configured to obtain the anomaly event based on the verification results.

[0024] Optionally, the performance testing device further includes an update unit, used to feed back the test results of the distributed system to the knowledge graph and the reinforcement learning model after locating abnormal events in the testing process by using the test data analysis results through dynamic weight node matching and cascaded enhanced path reasoning, so as to update the knowledge graph and the reinforcement learning model.

[0025] According to another aspect of the present invention, a distributed system testing system is also provided, which uses the performance testing method for distributed systems described in any one of the above embodiments.

[0026] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes any one of the performance testing methods for a distributed system described above.

[0027] According to another aspect of the present invention, a processor is also provided, the processor being configured to run a program, wherein the program, when running, executes any of the performance testing methods for distributed systems described in the present invention.

[0028] According to another aspect of the present invention, a computer program product is also provided, including computer instructions, wherein when the computer instructions are executed by a processor, the performance testing method of any one of the distributed systems described herein is executed.

[0029] In this embodiment of the invention, an initial performance test space is generated based on the performance parameters of the distributed system. The operating environment and load of the distributed system are simulated in the initial performance test space to obtain a test case set for the distributed system. Redundant data is removed from the test case set through trial and error learning to obtain an effective test case set, wherein redundant data is data in the test case set whose impact on the performance of the distributed system is less than a performance impact threshold. The effective test case set is used to perform performance testing on the distributed system, and real-time streaming data generated during the testing process is acquired. Historical test data and real-time streaming data are analyzed using a knowledge graph to obtain test data analysis results. The test data analysis results are used to locate abnormal events during the testing process through dynamic weighted node matching and cascaded enhanced path reasoning. Through the above technical solution provided by this invention, the dynamic generation of the performance test space, the elimination of unimportant test cases through trial and error learning, and the use of knowledge graph analysis of historical and real-time data to locate abnormal events achieve the technical effect of improving testing efficiency. This solves the technical problem in related technologies where redundant parameter combinations in distributed system performance testing lead to a large number of test cases and low efficiency. Attached Figure Description

[0030] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0031] Figure 1 This is a flowchart of a performance testing method for a distributed system according to an embodiment of the present invention;

[0032] Figure 2 This is a schematic diagram of the dynamic hierarchical sampling parameter dimensions according to an embodiment of the present invention;

[0033] Figure 3 This is a flowchart of an optional performance testing method for a distributed system according to an embodiment of the present invention;

[0034] Figure 4 This is a flowchart of knowledge graph construction according to an embodiment of the present invention;

[0035] Figure 5 This is a flowchart of real-time anomaly location according to an embodiment of the present invention;

[0036] Figure 6 This is a schematic diagram of a performance testing device for a distributed system according to an embodiment of the present invention. Detailed Implementation

[0037] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0039] As described in the background section, redundant parameter combinations in distributed system performance testing in related technologies lead to large test case sizes and low efficiency. This invention provides a distributed system performance testing method and apparatus, a distributed system testing system, a computer-readable storage medium, a processor, and a computer program product.

[0040] For ease of description, some nouns or terms appearing in the embodiments of the present invention are explained below:

[0041] Dynamic hierarchical sampling technology: a technology that divides performance parameters into network layer, resource layer, and application layer and samples them in a hierarchical manner;

[0042] Monte Carlo random sampling: a method for generating an initial parameter space by randomly sampling the parameters of each layer;

[0043] Information entropy theory: a theory used to calculate the correlation between parameters and eliminate redundant parameters;

[0044] Latin Hypercube Design (LHD): A design method that ensures uniform sampling distribution;

[0045] Reinforcement learning model: A model built on the Q-learning algorithm for parameter tuning;

[0046] Q-learning algorithm: A specific algorithm in reinforcement learning used to construct parameter tuning strategies;

[0047] The lotus effect: the effect of exponential expansion of correlations in the critical point mechanism;

[0048] Dynamic weighted node matching: A method for calculating node matching degree by combining TF-IDF and CRF sequence matching;

[0049] TF-IDF matching: A node-feature vector matching method based on the TF-IDF algorithm;

[0050] CRF_SeqMatch: A feature sequence correlation matching method based on conditional random fields;

[0051] Cascaded Enhanced Path Reasoning: A reasoning method for generating anomalous paths by combining the confidence of static and dynamic edges;

[0052] Static edge propagation confidence (Conf_static): Edge propagation confidence based on predefined dependency weights;

[0053] Dynamically enhanced edge confidence (Conf_dynamic): The edge propagation confidence when node attributes undergo a sudden change;

[0054] Attribute closed-loop verification: a mechanism for verifying abnormal attribute deviations by dynamically adjusting thresholds;

[0055] Dynamic threshold (θv): A validation threshold that is dynamically adjusted based on the recent error rate;

[0056] Learning rate (η): A parameter used for dynamic threshold adjustment (η=0.05);

[0057] Closed-loop feedback optimization mechanism: a mechanism that feeds test results back to the optimization of the model and knowledge graph;

[0058] Hardware acceleration unit (FPGA): A hardware unit used for parallel processing of test data streams;

[0059] Policy network weights: Weights used in reinforcement learning models to optimize parameter pruning thresholds.

[0060] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0061] Example 1

[0062] According to an embodiment of the present invention, a method embodiment for performance testing of a distributed system is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0063] Figure 1 This is a flowchart of a performance testing method for a distributed system according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0064] Step S102: Generate an initial performance test space based on the performance parameters of the distributed system.

[0065] In this embodiment, a dynamic hierarchical sampling technique is employed to extract key performance parameters from four main dimensions of the distributed system (network configuration, node resources, data replication strategy, and transaction concurrency) to form an initial parameter space. This space encompasses all possible parameter combinations, serving as the foundation for generating subsequent test cases.

[0066] Figure 2 This is a schematic diagram of the dynamic hierarchical sampling parameter dimensions according to an embodiment of the present invention, such as... Figure 2 As shown, for the network layer, it can include bandwidth, RTT jitter, and packet loss rate; for the resource layer, it can include CPU level, memory leak threshold, and disk IOPS; for the application layer, it can include thread pool size and transaction retries.

[0067] Dynamic hierarchical sampling not only ensures broad parameter coverage but also eliminates redundant parameters using information entropy theory, maintaining a refined parameter space. This technique categorizes parameters hierarchically, which facilitates parameter combination optimization in subsequent steps.

[0068] The initial performance test space generated here comprehensively covers the key parameters of the system, providing a rich and representative dataset for subsequent test case simulation and analysis. By eliminating redundant parameters, testing efficiency and resource utilization are improved.

[0069] Step S104: Simulate the operating environment and load conditions of the distributed system in the initial performance test space to obtain the test case set of the distributed system.

[0070] In this embodiment, within the constructed initial performance test space, a series of test cases are generated by simulating different operating environments and load scenarios. These test cases cover the system's performance under various conditions, providing comprehensive data support for testing system performance and identifying anomalies.

[0071] By setting different environment variables and load levels, test cases can reflect the system's real-world behavior under stress. This approach ensures the diversity and representativeness of the test case set, providing a foundation for subsequent parameter optimization.

[0072] Simulated test case sets accurately reflect the system's performance under different conditions, providing detailed data for subsequent redundant data removal and the creation of effective test case sets. This step is an indispensable part of the testing methodology, ensuring the comprehensiveness and effectiveness of the testing.

[0073] Step S106: Through trial and error learning, redundant data is removed from the test case set to obtain an effective test case set. The redundant data is the data in the test case set whose performance impact on the distributed system is less than the performance impact threshold.

[0074] In this embodiment, the simulated test case set is input into a reinforcement learning model. This model, based on trial and error learning, gradually identifies data points with minimal impact on system performance, i.e., redundant data. Through multiple iterations, the model learns which test cases substantially contribute to performance testing, thereby eliminating redundant data from the original test case set.

[0075] Reinforcement learning optimizes decision-making strategies through interaction with the environment, with the ultimate goal of maximizing cumulative rewards. In this scenario, the environment is a distributed system, and the rewards come from improvements in system performance metrics. Through continuous experimentation, the model learns which parameter combinations are most helpful for performance improvement, thereby identifying redundant data.

[0076] The effective test case set, after removing redundant data, focuses more intently on key performance test points. This not only reduces unnecessary testing, saving time and computing resources, but also improves the accuracy and efficiency of testing. The streamlined test case set makes subsequent performance testing and anomaly detection more precise and efficient.

[0077] By using dynamic hierarchical sampling technology, core performance parameters are extracted from the network configuration, node resource thresholds, data replication strategies, and transaction concurrency of the distributed system to generate an initial parameter space. Based on the Q-learning algorithm, a reinforcement learning model dynamically trims redundant parameter combinations with system throughput, latency volatility, and fault recovery time as reward functions, generating a simplified test case set, which effectively reduces the size of the parameter combination.

[0078] Step S108: Perform performance testing on the distributed system using a valid set of test cases, and obtain real-time streaming data generated during the testing process.

[0079] Step S110: Use knowledge graphs to analyze historical test data and real-time streaming data to obtain test data analysis results.

[0080] In this embodiment, high-frequency anomaly events in historical test logs can be extracted using the TF-IDF algorithm and used as the root node of the knowledge graph. Then, system component nodes are generated based on the system architecture topology information, and child nodes are dynamically expanded. Real-time streaming data is matched with the knowledge graph, and temporal associations between anomaly events and components are generated through conditional random fields to construct a hierarchical node structure.

[0081] Knowledge graphs, as a high-level data structure, can intuitively represent the connections between system components and the propagation paths of anomalous events in a graph format. TF-IDF is used to determine the importance of anomalous events, while Conditional Random Fields are used to capture the dynamic propagation characteristics of anomalous events. Through the analysis of graph neural networks, anomalous events can be located in real time, and even future anomalous events can be predicted.

[0082] Analyzing real-time streaming data using knowledge graphs enables rapid and accurate location of anomalous events within a system. This approach not only allows for quick response and reduces fault recovery time, but also continuously improves the accuracy of anomaly detection and the robustness of the system through ongoing graph updates. Ultimately, knowledge graphs become a powerful tool for real-time monitoring and anomaly localization, significantly enhancing the testing and operational capabilities of distributed systems.

[0083] Step S112: Using the test data analysis results, abnormal events in the test process are located through dynamic weighted node matching and cascaded enhanced path reasoning.

[0084] After testing, the test results and anomaly localization conclusions are fed back to the knowledge graph and reinforcement learning model to update the graph structure and model parameters. This closed-loop feedback mechanism ensures that subsequent tests can more accurately reflect the true state of the system.

[0085] Closed-loop feedback, based on test data and anomaly localization results, dynamically adjusts parameters to enable the knowledge graph and reinforcement learning model to continuously learn and improve. The feedback mechanism is a continuous process that promotes the self-optimization of the graph and model, enhancing the system's adaptability and predictive capabilities.

[0086] Through closed-loop feedback optimization, knowledge graphs and reinforcement learning models can continuously evolve, better adapting to the complexity and changes of distributed systems. This process not only improves the efficiency of anomaly detection but also provides a solid foundation for subsequent system optimization and fault prevention. The implementation of the closed-loop mechanism makes the testing methods highly automated and adaptable, significantly improving the operation and maintenance level and performance of distributed systems.

[0087] Using a knowledge graph as the core carrier and the dynamically parameterized test features output above as input, the system first activates abnormal event nodes in real-time streaming data matching through a dynamic threshold (related to the frequency of system anomalies), overcoming the limitations of static pattern matching. Then, it integrates static dependency weights and dynamic attribute mutations to deduce fault propagation paths, reconstructing the chain-like anomaly logic of the distributed system. Next, it uses normalized attribute deviation combined with a dynamic verification threshold to verify the fit between the path and the actual anomaly, filtering false positive inferences. When the graph node size exceeds a critical value, it balances the long-tail path coverage of the large graph through logarithmic edge expansion and an exponential coverage model, avoiding accuracy decay caused by scale expansion. Finally, it dynamically optimizes graph edge weights based on real-time feedback of diagnostic accuracy deviation and edge usage frequency, achieving self-evolution of the knowledge graph. This entire mechanism relies on the associative reasoning capabilities of the knowledge graph to analyze the anomaly propagation chain, and adapts to the dynamic changes of the real-time system through four modules: dynamic threshold, attribute verification, scale adaptation, and self-optimization.

[0088] As described above, an initial performance test space is generated based on the performance parameters of the distributed system. The operating environment and load of the distributed system are simulated within this initial test space to obtain a test case set. Redundant data is removed from the test case set through trial and error learning, resulting in a valid test case set. Redundant data refers to data in the test case set whose impact on the performance of the distributed system is below a performance impact threshold. The valid test case set is used to perform performance testing on the distributed system, and real-time streaming data generated during the testing process is acquired. Historical test data and real-time streaming data are analyzed using a knowledge graph to obtain test data analysis results. These results are then used to locate abnormal events during the testing process through dynamic weighted node matching and cascading enhanced path reasoning. This process achieves the technical effect of dynamically generating a performance test space, eliminating unimportant test cases through trial and error learning, and using a knowledge graph to analyze historical and real-time data to locate abnormal events, thus improving testing efficiency.

[0089] Therefore, the technical solution provided by the above embodiments of the present invention solves the technical problem in the related art of redundant parameter combinations in distributed system performance testing, which leads to a large test case size and low efficiency.

[0090] Figure 3 This is a flowchart of an optional performance testing method for a distributed system according to an embodiment of the present invention, such as... Figure 3 As shown, firstly, dynamic hierarchical sampling can be performed, followed by reinforcement learning parameter tuning, knowledge graph construction, and feedback of parameter tuning results. After dynamic parameter set generation and test case simplification, combined with the anomaly localization process and anomaly conclusion feedback, real-time anomaly localization can be driven by the knowledge graph; finally, a closed-loop feedback optimization mechanism is implemented.

[0091] According to the above embodiments of the present invention, generating an initial performance test space based on the performance parameters of a distributed system includes: extracting performance parameters from the distributed system through a dynamic hierarchical sampling method, wherein the performance parameters include the following information of the distributed system: network configuration parameters, node resource thresholds, data replication strategies, and transaction concurrency; and generating an initial performance test space based on the performance parameters.

[0092] In this embodiment, dynamic hierarchical sampling technology is used to extract parameters in the distributed system hierarchically according to four dimensions: network configuration, node resource thresholds, data replication strategy, and transaction concurrency, thereby constructing a multi-dimensional parameter space. Specifically, parameter extraction is based on a preset sampling strategy, such as Monte Carlo random sampling and Latin hypercube design (LHD), to generate an initial performance test space. This space contains all parameter combinations required for system operation, providing a comprehensive data foundation for subsequent test case generation and model training.

[0093] Dynamic stratified sampling technology, incorporating information entropy theory, aims to eliminate redundant information in parameter combinations, retaining only the most representative and critical parameters. By calculating the correlation between parameters, it identifies independent and dependent variables, reducing the size of the entire parameter set and avoiding data redundancy and computational waste when constructing test case sets. This approach allows for more efficient exploration and coverage of key areas in performance testing, ensuring the effectiveness and relevance of the tests.

[0094] Dynamic stratified sampling significantly reduces the number of test cases while ensuring coverage of key performance parameters, improving model training efficiency and testing comprehensiveness. It can accurately pinpoint performance bottlenecks and anomalies, providing high-quality test data for subsequent parameter tuning and fault localization.

[0095] According to the above embodiments of the present invention, obtaining a valid test case set by deleting redundant data from the test case set through trial and error learning includes: inputting the test case set into a reinforcement learning model to perform trial and error learning based on the test case set using the reinforcement learning model to obtain redundant data in the test case set; and deleting the redundant data from the test case set to obtain a valid test case set.

[0096] In this embodiment, trial-and-error learning involves an iterative process where a set of test cases is input into a reinforcement learning model. The model evaluates each test case based on the Q-learning algorithm or other suitable strategies, identifying redundant test cases that have little or no impact on system performance. Redundant data is determined by comparing changes in performance metrics after test case execution with a preset performance impact threshold.

[0097] The reinforcement learning model dynamically adjusts the weights and importance of test cases based on changes in the system state before and after test case execution, as well as the degree of deviation from the performance target. Test cases whose impact on system performance is below a preset threshold are considered redundant because they do not provide additional or significant information about system behavior.

[0098] Through trial and error learning, the test case set can be greatly simplified, eliminating redundant and invalid tests, thereby reducing testing time and computational resource consumption, and improving testing efficiency and model training speed. The resulting effective test case set can more accurately reflect the system's true performance and give more attention to and testing of key parameters.

[0099] The workflow of the reinforcement learning model includes: defining the state space as a discrete encoding of parameter combinations (e.g., network configuration = 01, resource threshold = 10), and the action space as parameter addition / deletion / weight adjustment; the reward function is designed as follows:

[0100] Where T is the throughput and L is the latency volatility. The number of successful fault recovery attempts is represented by σ. High-reward actions are explored using an ε-greedy strategy, and the Q-value table is updated using the Bellman equation. When the variance of the reward function is less than σ for three consecutive iterations, the parameter set convergence is triggered, and the final test cases are output.

[0101] According to the above embodiments of the present invention, before analyzing historical test data and real-time streaming data using a knowledge graph to obtain test data analysis results, the performance testing method further includes: extracting high-frequency anomaly events from historical test logs using the TF-IDF algorithm, and using the high-frequency anomaly events as the root nodes of the knowledge graph, wherein the high-frequency anomaly events are anomaly events whose occurrence frequency exceeds an anomaly frequency threshold among all anomaly events; generating system component nodes of the knowledge graph based on the architecture topology information of the distributed system; dynamically expanding the child nodes of the knowledge graph by obtaining the anomaly propagation path corresponding to the real-time streaming data; generating temporal associations between each anomaly event and the system component nodes through a conditional random field to obtain a hierarchical node structure of the knowledge graph; and performing edge relationship expansion and attribute adaptive update on the knowledge graph to obtain the knowledge graph.

[0102] In this embodiment, the TF-IDF algorithm is first used to analyze historical test logs, extracting frequently occurring and performance-impacting anomaly events as the root nodes of the knowledge graph. Then, system component nodes are generated based on the distributed system's architecture topology. Analysis of real-time streaming data is used to dynamically expand the graph's child nodes, ensuring the graph can cover new anomaly patterns. Finally, a Conditional Random Field (CRF) is used to establish temporal associations between anomaly events, forming a hierarchical node structure.

[0103] A knowledge graph is a graph data structure that can store and associate entities and their relationships. The TF-IDF algorithm is used to measure the relative importance of anomalous events, while CRF is used to model the propagation paths and patterns of anomalous events. Through graph neural networks, knowledge graphs can perform dynamic reasoning to predict the occurrence and propagation of anomalous events.

[0104] The constructed knowledge graph enables rapid and accurate identification and localization of abnormal events. Through continuous dynamic expansion, it increases adaptability to new anomalies and improves the accuracy and response speed of anomaly localization.

[0105] According to the above embodiments of the present invention, the performance testing method further includes: when the number of nodes in the knowledge graph reaches the node number threshold and the anomaly recognition rate decreases by a predetermined number of consecutive predetermined times, automatically connecting low-frequency anomaly events and core component nodes through cascaded influence edges to form an association network; and recalculating the attribute weights of the knowledge graph based on the current test scenario.

[0106] In this embodiment, when the number of knowledge graph nodes reaches a certain threshold and the anomaly detection rate shows a continuous downward trend, a critical point expansion mechanism is triggered. This mechanism automatically connects low-frequency anomaly events with core component nodes through cascading influence edges, forming a denser network of connections. Simultaneously, the attribute weights of nodes in the knowledge graph are recalculated based on the current test scenario.

[0107] The critical point expansion mechanism is designed to prevent the knowledge graph from prematurely ceasing growth and missing potential anomaly patterns. By dynamically adjusting edge relationships, it ensures the graph's continuous expansion capability. Adaptive updates of attribute weights ensure the graph can respond to different testing scenarios, improving anomaly localization accuracy.

[0108] Dynamic expansion and attribute updates enable the knowledge graph to continuously evolve, adapt to different testing scenarios, and improve the coverage and accuracy of anomaly identification.

[0109] According to the above embodiments of the present invention, the analysis of historical test data and real-time streaming data using a knowledge graph to obtain test data analysis results includes: matching real-time streaming data with abnormal event nodes in the knowledge graph to obtain node matching degree; when the node matching degree reaches the node matching degree threshold, determining that the abnormal event node is activated as an active node; searching the propagation path of the abnormal event based on the active node; and determining the information corresponding to the propagation path as the test data analysis result.

[0110] In this embodiment, real-time streaming data is matched with anomalous event nodes in the knowledge graph, and the matching degree is calculated. When the matching degree exceeds a preset threshold, the anomalous event node is activated, and the propagation path of the anomalous event is searched based on the activated node. The propagation path is then determined as the test data analysis result.

[0111] Here, the dynamic weighted node matching algorithm, combined with conditional random fields, evaluates the degree of agreement between real-time data and historical patterns, ensuring timely identification of anomalies. Cascaded enhanced path reasoning can track the propagation path of anomalies, providing precise information for anomaly localization.

[0112] Through real-time data matching and cascading inference, anomaly location becomes faster and more accurate, reducing fault recovery time and false positive rate, and improving system stability and availability.

[0113] According to the above embodiments of the present invention, abnormal events in the testing process are located by using test data analysis results through dynamic weighted node matching and cascaded enhanced path reasoning, including: calculating the static edge confidence of the static dependency edges between each node and other nodes in the knowledge graph based on the set of activated nodes corresponding to the activated nodes; generating all potential abnormal propagation paths based on the static edge confidence and the dynamic enhanced edge confidence; verifying the attribute deviation of the abnormal propagation paths to obtain the verification results; and obtaining the abnormal events based on the verification results.

[0114] In this embodiment, based on the set of activated nodes, the propagation confidence of static dependency edges is calculated. If the mutation rate of a node attribute exceeds 20%, the calculation of dynamically enhanced edges is triggered. Then, a Top 3 list of potential abnormal propagation paths is generated by combining the confidence scores, and the validity of the paths is ensured by attribute bias verification.

[0115] Dynamic weighted node matching and cascaded enhanced path reasoning, based on graph neural networks, utilizes static and dynamic confidence scores to evaluate anomalous paths. This approach captures the complex relationship between real-time features and historical patterns, ensuring both depth and breadth in anomaly localization.

[0116] This method not only ensures the accuracy of anomaly location but also improves the speed and efficiency of location, enabling the system to respond quickly in real-time environments and reducing the negative impact of faults.

[0117] The rules for constructing knowledge graphs are as follows:

[0118] S1. Phased Node Generation: The construction of a progressively accumulating knowledge graph, starting from the core root node and expanding dynamically, begins with the core root node. Figure 4 This is a flowchart of knowledge graph construction according to an embodiment of the present invention, such as... Figure 4 As shown, high-frequency anomaly events are extracted from historical test logs using the TF-IDF algorithm as root nodes, and initial component nodes are generated by combining this with the system architecture topology. This stage ensures that the root nodes cover the core problem domain through static code analysis and log keyword matching. During test execution, the system further analyzes real-time log streams and dynamically expands child nodes based on the anomaly propagation path. Conditional Random Fields (CRF) are used to model the temporal correlation between anomaly events and components, generating a hierarchical node structure, while incremental entity recognition ensures the automatic expansion of new anomaly patterns and their association with the root nodes, forming a progressive coverage from the core to the edge.

[0119] S2. Dynamic Extension of Edge Relationships: A Two-Layer Network Construction of Basic Dependencies and Cascading Enhancements: In the design of basic dependency edges, the "triggering" relationship is established through the confidence level (historical occurrence frequency × system load weight) between abnormal event nodes and component nodes, while the "call dependency" is based on the call count and time consumption ratio of call chain tracking data, such as API gateway → user service → database. When the system enters the dynamic extension phase, cascading impact edges are activated: if abnormal event A triggers a failure in component B and propagates to component C, for example, database lock waiting causes API timeout, then a cascading edge "A→B→C" is automatically generated, and its weight is determined by the failure propagation probability obtained from historical data regression analysis. At the same time, the repair dependency edge is automatically associated with all abnormal event nodes that triggered the failure of B after the solution node S is verified to be effective, forming a reverse repair path from solution → faulty component → abnormal event. This two-layer edge relationship design retains the stability of static dependencies and achieves deep coverage of complex failure chains through dynamic enhancement edges.

[0120] S3. Adaptive Attribute Update: Closed-Loop Optimization from Static Thresholds to Dynamic Feedback: The attributes of abnormal nodes are dynamically updated through joint analysis of real-time monitoring data and historical thresholds. For example, the trigger condition is expanded from "network latency > 200ms" to "network latency > 200ms and CPU utilization > 80%", while also adding the probability of this abnormality causing cascading failures. The attributes of solution nodes are dynamically adjusted through an online learning mechanism: the initial value is based on the success rate recorded in the operation and maintenance work order (e.g., "resource reallocation success rate reaches 92%)", and subsequent values ​​are adjusted using a smoothing factor. The updated success probability is calculated by weighting the number of successful attempts of the solution in the current test, using the following formula: In addition, cost attributes (such as CPU and time) are introduced to weigh the priority of multiple solutions and ensure that attribute updates are always consistent with the current test scenario (such as high concurrency pressure).

[0121] S4. Critical Point Triggered Expansion: Adaptive Evolution of an Exponentially Connected Network: When the number of knowledge graph nodes reaches a preset threshold (e.g., 1000 nodes) and the new anomaly identification rate decreases by less than 5% for three consecutive times, the system triggers a lotus effect critical point mechanism: low-frequency anomaly events and core component nodes are automatically connected through cascading influence edges, forming a denser connected network; simultaneously, attribute weights are recalculated based on the current test scenario to enhance the graph's scenario adaptability. This mechanism enables the graph to achieve exponential expansion of connections after reaching a certain scale, avoiding initial redundant construction and ensuring high coverage in complex scenarios. Finally, through closed-loop feedback, the anomaly localization conclusions and repair effects of each test are fed back to the graph, driving its continuous evolution, thereby achieving high anomaly localization accuracy and significantly improved localization path coverage in distributed performance testing.

[0122] According to the above embodiments of the present invention, after locating abnormal events in the testing process by using test data analysis results through dynamic weight node matching and cascaded enhanced path reasoning, the performance testing method further includes: feeding the test results of the distributed system back into the knowledge graph and reinforcement learning model to update the knowledge graph and reinforcement learning model.

[0123] In this embodiment, after testing and anomaly localization are completed, the test results are fed back into the knowledge graph and reinforcement learning model for updating them. In this way, the model and graph can self-optimize based on the latest test feedback, enhancing their future testing and localization capabilities.

[0124] The closed-loop feedback mechanism, based on machine learning principles, uses test results to feed back into the model and knowledge graph, enabling iterative updates of knowledge and strategies. This method continuously optimizes model parameters, making the knowledge graph more comprehensive and improving the automation level and accuracy of testing.

[0125] The closed-loop feedback mechanism ensures the continuous evolution of the testing method, which can adapt to system changes, improve the accuracy and efficiency of anomaly localization, reduce maintenance costs, and enhance the overall performance and reliability of the distributed system.

[0126] Based on the characteristics of the knowledge graph, real-time anomaly localization adjusts parameters and calculation logic according to the following steps to achieve dynamic collaborative diagnosis. Figure 5 This is a flowchart of real-time anomaly location according to an embodiment of the present invention, such as... Figure 5 As shown, it includes the following steps:

[0127] Step 2.1, Dynamic Weighted Node Matching: Input: Real-time streaming data feature vector: Node matching degree calculation: ,in, This represents anomaly event nodes in the knowledge graph. These are high-frequency anomaly events extracted from historical test logs using TF-IDF, and belong to either the core root node or dynamically expanded child nodes. This represents the feature vector of real-time streaming data, which includes system operation metrics collected during the current test, such as network status, resource utilization, and application layer transaction data. Specific indicators, etc. This represents the static matching degree between the node and the real-time features calculated based on the TF-IDF algorithm; This represents the sequence matching degree calculated based on a conditional random field (CRF). α and β represent weighting factors. These represent static and dynamic weighting factors, respectively. SeqMatch is a feature sequence correlation model based on Conditional Random Fields. By combining static feature weights (TF-IDF) and dynamic temporal correlation (CRF_SeqMatch), and balancing the influence of the two through weighting factors α and β, the feature vector of real-time streaming data is quantified. With the abnormal event nodes in the knowledge graph The degree of matching.

[0128] The node matching degree calculation aims to accurately identify whether the real-time data features in the current test match existing abnormal patterns in the knowledge graph from two dimensions: static feature similarity and dynamic temporal correlation. Activation threshold: , ,in, For node matching degree, The system dynamically adjusts its settings based on the frequency of system anomalies to improve long-tail coverage.

[0129] Step 2.2, Cascaded Enhanced Path Reasoning: Input: Set of Activated Nodes { }, calculate static edge propagation: ,in, The source node is the abnormal event node activated in step 2.1. For downstream related nodes, This represents the static dependency weights, obtained through historical statistics. and The probability of abnormal propagation, ranging from [0,1], for example, A value of 0.8 indicates that there is an 80% probability that "Service A timed out" will cause the database connection pool to run out; this is based on historical dependencies. Calculate the current matching degree (Sim). → The confidence level of this static edge in the current test scenario is a fundamental quantitative indicator for path reasoning.

[0130] Dynamically enhanced edge trigger (if node attribute mutation > 20%). Where γ is the enhancement coefficient; γ = 0.5, and ΔA is the attribute change rate. For real-time sudden anomalies (such as a sudden increase in resource utilization or a sudden change in network latency), the path confidence is dynamically amplified on the basis of static confidence, which solves the problem that static dependencies cannot adapt to real-time changes and improves the ability to identify the propagation path of sudden failures.

[0131] Furthermore, for the comprehensive confidence path: , The overall confidence score represents the credibility of the entire anomaly propagation path. The higher the score, the more likely the path is to accurately reflect the anomaly propagation pattern. For chain multiplication: multiply the edges along the path from the first edge to the second edge. The confidence scores of each edge are multiplied sequentially. The number of edges in the path; For the first in the path Each node, i.e., an anomaly event node in the knowledge graph. For the first in the path Each node is related to Directly associated downstream abnormal nodes; , where is the confidence level of a single edge; in cascaded augmented path reasoning, the system first enumerates all potential anomaly propagation paths based on the static dependency edges and dynamic augmented edges of the activated nodes, and then through The formula performs a multiplication operation on the edge confidence of each path, forcibly constraining the high confidence of each step of the association, filtering out paths that are locally related but contradictory overall, and then selecting the Top 3 candidates according to the comprehensive confidence. Compared with "single node matching" or "full path verification", this scheme focuses on high-confidence paths that adapt to static dependencies and real-time features, so that at least one of the Top 3 candidate paths matches the real fault chain with a high accuracy. This not only compresses the scope of subsequent closed-loop verification, but also relies on the integrity constraint of the multiplication to ensure the probability of root cause hit, achieving a balance between efficiency and accuracy, and providing a precise target for fault reconstruction.

[0132] Step 2.3, Attribute Loop Closure Verification: Input: Candidate path P, i.e., the Top 3 anomaly propagation paths obtained from cascaded inference; Calculate the anomaly attribute bias: ,in, This represents the i-th real-time attribute value associated with path P. Let p represent the value of the i-th baseline attribute stored in the knowledge graph, and p represent the total number of key attributes involved in the candidate path p. For example, if a service timeout path is associated with three attributes: CPU, memory, and network latency, then p=3. This represents the importance weight of the i-th attribute; it is normalized (divided by) Weighted summation addresses the differences in dimensions between different attributes while highlighting the impact of core attributes. It quantifies the deviation of the current system state from the normal path in the knowledge graph, avoiding the bias of single-attribute judgments; dynamic threshold adjustment: ,in, , The base threshold is the maximum allowable deviation tolerance when the system is stable in the long term, η = 0.05 learning rate. The frequency of anomalies within the most recent time window; verification results: By using quantified deviation vs. dynamic tolerance ( Using this as the criterion, verify whether the candidate paths of the cascaded inference truly correspond to the current fault. If they pass (Deviation ≤ If the path is a high-confidence root cause chain, proceed directly to the repair process; if it fails: trigger the generation of repair suggestions, such as reverse analysis of path defects, supplementation of monitoring dimensions, and avoidance of false positive paths interfering with subsequent operations.

[0133] Step 2.4: Critical Expansion Enhancement: When the number of knowledge graph nodes... At this point, a critical expansion mechanism is triggered, balancing graph scalability and complexity through logarithmic edge expansion and exponential coverage gain. Exponential correlation is activated: Where K = 3, is the expansion coefficient. This is the number of nodes, which is the base-2 logarithm rounded down. hour, Rounded to 9, it simulates the logarithmic relationship between the graph size and the expansion requirements. When the number of nodes doubles, the expansion requirements increase linearly to avoid complexity explosion. It outputs the number of new associated edges to be added, so that the expansion intensity increases slowly with the graph size. This solves the problem of insufficient path coverage in large graphs and prevents redundancy caused by blind expansion.

[0134] Added path coverage: 0.002 is the attenuation coefficient, and ExpandLink is the number of expanded edges calculated by the preceding formula, which directly determines the upper limit of the coverage gain. This controls the coverage of newly added paths to avoid excessive expansion and waste of resources, while ensuring the coverage of long-tail paths in the large graph.

[0135] Step 2.5: Real-time Feedback Optimization: By dynamically updating edge weights, the knowledge graph learns from the diagnostic results, continuously optimizing inference accuracy. Formula: , Representing an edge Weight update amount, To update the step size, the difference between the diagnostic accuracy and the target accuracy is the accuracy deviation term. Taking the target accuracy of at least one matching real fault chain among the Top 3 candidate paths obtained from the cascaded enhanced path inference in step 2.2 as an example, if the actual accuracy is higher, it indicates that the edge contribution is greater, and the weight is increased; conversely, it is decreased. The edge usage frequency represents the activity level of the edge, i.e., the more frequently the edge is used. If the path diagnostic accuracy of a certain edge is higher than the target accuracy: If the value is positive, the weight is increased, and subsequent reasoning will tend to select that edge, strengthening high-quality connections; if the path diagnosis accuracy of a certain edge is lower than the target accuracy: A negative value reduces weights, suppressing low-quality associations and decreasing erroneous reasoning; the update magnitude of high-frequency edges is amplified, accelerating the weeding out of inferior knowledge graphs and allowing the knowledge graph to dynamically evolve with test data, continuously approaching higher diagnostic accuracy. Closed-loop feedback optimization mainly involves the end-to-end output of anomaly localization, collecting dynamic activation thresholds. Attribute weight Dynamic verification threshold The evaluation metrics, including ExpandLinks (number of expanded edges), Coverage Gain, and diagnostic accuracy / false positive rate, are as follows: From the knowledge graph perspective, the evaluation metrics include diagnostic accuracy (the proportion of the top 3 paths that match the real fault chain), false negative rate, and coverage gain; the corresponding adjustable parameters include edge weight update step size μ, critical expansion coefficient K, and the base value of the dynamic verification threshold. When the diagnostic accuracy is lower than the target accuracy, it indicates that the edge weight adjustment is not precise enough, and μ needs to be increased to strengthen the weight of high-contribution edges; if the false negative rate is consistently higher than 5%, it indicates that the validation threshold has been reached. Too strict, needs to be lowered. If the coverage gain is less than 40%, it indicates insufficient expansion of edges, and K needs to be increased to increase the number of associated edges generated. From the reinforcement learning model dimension mentioned in step 1, the evaluation metrics are the convergence speed of the parameter combination reward function (convergence efficiency of metrics such as throughput and latency volatility) and the fault coverage of simplified test cases; the corresponding adjustable parameter is the information entropy threshold δ of dynamic hierarchical sampling. If anomaly localization reveals that a certain type of fault is not covered by the test cases in step 1, it indicates that the parameters associated with this type of fault are misjudged as redundant, and δ needs to be increased to retain more potential key parameters and avoid omissions.

[0136] Ultimately, all parameter adjustment results are synchronously written into the policy network and edge relation attributes of the reinforcement learning model, forming a complete closed loop from indicator feedback → parameter optimization → model / graph iteration, ensuring that parameter tuning and anomaly localization dynamically adapt to the test scenario.

[0137] In the above-described technical solution provided in the embodiments of the present invention, the knowledge graph construction rules construct a core capability foundation for anomaly localization: core root nodes are extracted from historical logs using TF-IDF, initial component nodes are generated by combining system topology, and child nodes are dynamically expanded through CRF time-series modeling of real-time log streams to achieve progressive coverage of core problem domains and long-tail anomalies; basic dependency edges establish stable connections based on "historical frequency × load weight," cascaded enhancement edges automatically capture fault propagation chains, and repair dependency edges are used to verify effective solutions through reverse correlation, forming a closed loop of forward fault reasoning and reverse repair; anomaly node attributes are integrated with real-time monitoring and historical thresholds, and solution nodes update their effectiveness probability and cost weights through online learning, ensuring that the depth of localization judgment matches the current test scenario (such as high concurrency pressure). The synergy of these three elements allows anomaly localization to penetrate the propagation logic of complex fault chains (restoring the complete path from the root cause to secondary faults) and accurately match real-time system states, achieving high-precision anomaly localization results. The critical point mechanism and closed-loop feedback in the knowledge graph construction rules endow the graph with the vitality of continuous evolution: when the node scale (e.g., 1000 nodes) and the recognition rate trend (three consecutive decreases of <5%) meet the criteria, the cascading connection between low-frequency anomalies and core nodes is triggered, achieving exponential expansion of the associated network—avoiding redundant construction in the early stages and ensuring path coverage in complex scenarios through dense associations; the scenario-based recalculation of attribute weights further enhances the graph's adaptability to high-concurrency and resource-constrained testing scenarios. More importantly, the closed-loop feedback feeds back the localization conclusions and repair effects of each test to the graph: nodes dynamically expand with new anomalies, edge relationships are updated and optimized with fault modes, and attribute thresholds are adaptively adjusted with changes in scenarios. This evolutionary capability allows the graph to maintain a significant improvement in localization path coverage over the long term during distributed system iterations and test scenario changes, breaking through the bottlenecks of traditional static graphs that are prone to obsolescence and difficult to expand.

[0138] Furthermore, dynamic diagnosis relies on a core root node + incremental child node architecture based on phased nodes, combined with CRF temporal correlation optimization of node activation logic. This upgrades anomaly localization from "static rule matching" to "real-time data-driven dynamic reasoning," effectively improving anomaly localization accuracy and shortening single-round diagnosis time, achieving simultaneous improvement in accuracy and efficiency. Moreover, the dynamic collaborative diagnosis and knowledge graph's scale evolution mechanism, along with the exponential correlation expansion triggered by critical points, ensures the path coverage of the large system while automatically adapting diagnostic parameters to high-concurrency and resource-constrained test scenarios through scenario-based attribute weight recalculation. Closed-loop feedback feeds diagnostic conclusions back into the graph, driving nodes, edges, and attributes to dynamically iterate with testing. This not only ensures that the current diagnosis aligns with the system state but also continuously evolves the graph's diagnostic capabilities.

[0139] The technical solutions provided by the above embodiments of the present invention have the following beneficial effects: 1) The knowledge graph construction rules start from the core root node, extract high-frequency abnormal events as root nodes through the TF-IDF algorithm of historical test logs, and generate initial component nodes in combination with the system architecture topology; during test execution, through real-time log stream analysis, the child nodes are dynamically expanded based on the abnormal propagation path, and the temporal association between abnormal events and components is modeled using Conditional Random Field (CRF) to form a hierarchical node structure; at the same time, through incremental entity recognition, it is ensured that new abnormal patterns are automatically associated with the root node, realizing progressive knowledge coverage from the core to the edge. 2) The knowledge graph construction rules include a two-layer network of basic dependencies and cascading reinforcement: in the basic dependency edges, the "inducing" relationship is established based on the historical occurrence frequency of abnormal events and components and the system load weight, and the "call dependency" is constructed based on the number of calls and the time consumption ratio of the call chain; the cascading influence edge is activated in the dynamic expansion stage. If the abnormal event triggers the component failure propagation, the cascading path edge is automatically generated, and the weight is determined by the historical failure propagation probability; in addition, after the solution is verified to be effective, the repair dependency edge is associated with the abnormal event that induced the failure to form a reverse repair path. 3) In the knowledge graph construction rules, the attributes of abnormal nodes are updated jointly through real-time monitoring data and historical thresholds. For example, the triggering conditions are expanded from a single threshold to a combination of multiple conditions, and cascading failure probabilities are added. The attributes of solution nodes are adjusted based on online learning. The initial value is based on the success rate of maintenance work orders, and the effectiveness probability is subsequently updated by weighting the smoothing factor and the current number of successful tests. At the same time, cost attributes are introduced to balance the priority of multiple solutions and adapt to the current test scenario. 4) In the knowledge graph construction rules, when the number of nodes reaches a preset threshold (e.g., 1000) and the new anomaly recognition rate decreases by less than 5% for three consecutive times, the lotus effect critical point mechanism is triggered: low-frequency abnormal events and core components are automatically connected through cascading influence edges to form a dense network of connections. At the same time, the attribute weights are recalculated based on the current test scenario to achieve exponential expansion of the association relationship. This mechanism avoids redundant construction in the early stage and ensures high coverage in complex scenarios, ultimately driving continuous evolution through closed-loop feedback. 5) In the anomaly localization process, the feature vector of real-time streaming data is input, and the node matching degree is calculated based on TF-IDF and CRF sequence matching; the activation threshold is activated. As the system anomaly frequency dynamically decreases, while ensuring the identification of core anomalies, the coverage of long-tail anomalies is improved, providing accurate initial nodes for subsequent path reasoning. 6) Based on the set of activated nodes, the static edge propagation confidence is first calculated; if the node attribute mutation is >20%, dynamic enhancement edge calculation is triggered; paths are generated by combining static and dynamic confidence, and the Top 3 paths are output. 7) Anomaly attribute deviation is calculated for candidate paths, and the reasonableness of the deviation is evaluated by combining attribute importance weights; the verification threshold is dynamically adjusted to adapt to the anomaly characteristics of the current test scenario; if the deviation is ≤ If the verification passes, then a repair suggestion is generated to ensure the consistency between the localization conclusion and the actual abnormal characteristics. 8) The diagnostic results are fed back to the knowledge graph, and the edge relationship weights are dynamically adjusted through the edge weight update formula; this mechanism enables the association relationship of the knowledge graph to be continuously optimized with the test scenario, enhancing the adaptability of cross-scenario abnormal reasoning.

[0140] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0142] Example 2

[0143] According to embodiments of the present invention, a performance testing apparatus for a distributed system for implementing the above-described performance testing method for a distributed system is also provided. Figure 6 This is a schematic diagram of a performance testing apparatus for a distributed system according to an embodiment of the present invention, such as... Figure 6 As shown, the device includes: a generation unit 601, a simulation unit 603, a deletion unit 605, a testing unit 607, an analysis unit 609, and a processing unit 611. The device will be described below.

[0144] Generation unit 601 is used to generate an initial performance test space based on the performance parameters of the distributed system.

[0145] Simulation unit 603 is used to simulate the operating environment and load conditions of the distributed system in the initial performance test space to obtain the test case set of the distributed system.

[0146] Deletion unit 605 is used to delete redundant data from the test case set through trial and error learning to obtain an effective test case set. The redundant data is the data in the test case set whose performance impact on the distributed system is lower than the performance impact threshold.

[0147] Test unit 607 is used to perform performance testing on the distributed system using a valid set of test cases and to acquire real-time streaming data generated during the testing process.

[0148] Analysis unit 609 is used to analyze historical test data and real-time streaming data using knowledge graphs to obtain test data analysis results.

[0149] The processing unit 611 is used to locate abnormal events in the testing process by using test data analysis results through dynamic weight node matching and cascaded enhanced path reasoning.

[0150] It should be noted that the above-mentioned generation unit 601, simulation unit 603, deletion unit 605, testing unit 607, analysis unit 609 and processing unit 611 correspond to steps S102 to S112 in the above embodiments. The three modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments.

[0151] As can be seen from the above, in the scheme described in the above embodiments of the present invention, the generation unit can generate an initial performance test space based on the performance parameters of the distributed system; the simulation unit can simulate the operating environment and load of the distributed system in the initial performance test space to obtain a test case set of the distributed system; the deletion unit can delete redundant data from the test case set through trial and error learning to obtain an effective test case set, wherein the redundant data is data in the test case set whose performance impact on the distributed system is lower than the performance impact threshold; the testing unit can use the effective test case set to perform performance testing on the distributed system and obtain real-time streaming data generated during the testing process; the analysis unit can use a knowledge graph to analyze historical test data and real-time streaming data to obtain test data analysis results; the processing unit can use the test data analysis results to locate abnormal events in the testing process through dynamic weighted node matching and cascaded enhanced path reasoning, thereby realizing the technical effect of dynamically generating a performance test space, eliminating unimportant test cases through trial and error learning, and using a knowledge graph to analyze historical and real-time data to locate abnormal events, thus achieving the technical effect of improving testing efficiency.

[0152] Therefore, the technical solution provided by the above embodiments of the present invention solves the technical problem in the related art of redundant parameter combinations in distributed system performance testing, which leads to a large test case size and low efficiency.

[0153] Optionally, the generation unit includes: an extraction module, used to extract performance parameters in the distributed system through dynamic hierarchical sampling, wherein the performance parameters include the following information of the distributed system: network configuration parameters, node resource thresholds, data replication strategy, and transaction concurrency; and a first generation module, used to generate an initial performance test space based on the performance parameters.

[0154] Optionally, the deletion unit includes: a trial-and-error module for inputting the test case set into the reinforcement learning model to perform trial-and-error learning based on the test case set using the reinforcement learning model to obtain redundant data in the test case set; and a deletion module for deleting the redundant data from the test case set to obtain a valid test case set.

[0155] Optionally, the performance testing device further includes: an extraction module, used to extract high-frequency anomaly events from historical test logs using the TF-IDF algorithm before analyzing historical test data and real-time streaming data using the knowledge graph to obtain test data analysis results, and using the high-frequency anomaly events as the root nodes of the knowledge graph, wherein the high-frequency anomaly events are anomaly events whose occurrence frequency exceeds the anomaly frequency threshold among all anomaly events; a second generation module, used to generate system component nodes of the knowledge graph based on the architecture topology information of the distributed system; an acquisition module, used to acquire the anomaly propagation path corresponding to the real-time streaming data to dynamically expand the child nodes of the knowledge graph; a third generation module, used to generate temporal associations between each anomaly event and the system component nodes through a conditional random field to obtain a hierarchical node structure of the knowledge graph; and an update module, used to perform edge relationship expansion and attribute adaptive update on the knowledge graph to obtain the knowledge graph.

[0156] Optionally, the performance testing device further includes: a connection module, used to automatically connect low-frequency abnormal events and core component nodes through cascaded influence edges to form an association network when the number of nodes in the knowledge graph reaches the node number threshold and the anomaly recognition rate decreases by a predetermined value for a predetermined number of consecutive times; and a first calculation module, used to recalculate the attribute weights of the knowledge graph based on the current test scenario.

[0157] Optionally, the analysis unit includes: a matching module for matching real-time streaming data with abnormal event nodes in the knowledge graph to obtain node matching degree; a first determination module for determining that an abnormal event node is activated as an active node when the node matching degree reaches a node matching degree threshold; a search module for searching the propagation path of the abnormal event based on the active node; and a second determination module for determining that the information corresponding to the propagation path is the test data analysis result.

[0158] Optionally, the processing unit includes: a second calculation module, used to calculate the static edge confidence of the static dependency edges between each node and other nodes in the knowledge graph based on the set of activated nodes corresponding to the activated node; a third generation module, used to generate all potential anomaly propagation paths based on the static edge confidence and the dynamically enhanced edge confidence; a verification module, used to perform attribute deviation verification on the anomaly propagation paths and obtain the verification results; and an acquisition module, used to obtain the anomaly events based on the verification results.

[0159] Optionally, the performance testing device further includes an update unit, which, after using the test data analysis results to locate abnormal events during the testing process through dynamic weight node matching and cascaded enhanced path reasoning, feeds the test results of the distributed system back to the knowledge graph and reinforcement learning model to update the knowledge graph and reinforcement learning model.

[0160] According to another aspect of the present invention, a distributed system testing system is also provided, which uses the performance testing method for distributed systems described above.

[0161] According to another aspect of the present invention, a processor is also provided for running a program, wherein the program executes any one of the following in a distributed system performance testing method.

[0162] According to another aspect of the present invention, a computer program product is also provided, including computer instructions, wherein any one of the computer instructions is executed when executed by a processor, and a method for testing the performance of a distributed system is provided.

[0163] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program execution includes a method for performance testing of a distributed system.

[0164] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0165] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0166] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0167] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0168] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0169] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0170] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0171] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A performance testing method for a distributed system, characterized in that, include: Generate an initial performance test space based on the performance parameters of the distributed system; The operating environment and load conditions of the distributed system are simulated in the initial performance test space to obtain the test case set of the distributed system. By learning through trial and error, redundant data is removed from the test case set to obtain an effective test case set, wherein the redundant data is data in the test case set whose performance impact on the distributed system is less than the performance impact threshold; The distributed system is subjected to performance testing using the effective test case set, and real-time streaming data generated during the testing process is obtained. The historical test data and the real-time streaming data are analyzed using a knowledge graph to obtain the test data analysis results; By using the test data analysis results, abnormal events during the test process can be located through dynamic weighted node matching and cascaded enhanced path reasoning.

2. The performance testing method for a distributed system according to claim 1, characterized in that, An initial performance test space is generated based on the performance parameters of the distributed system, including: The performance parameters in the distributed system are extracted by a dynamic hierarchical sampling method, wherein the performance parameters include the following information of the distributed system: network configuration parameters, node resource thresholds, data replication strategy, and transaction concurrency. The initial performance test space is generated based on the performance parameters.

3. The performance testing method for a distributed system according to claim 1, characterized in that, By learning through trial and error, redundant data is removed from the test case set to obtain an effective test case set, including: The test case set is input into the reinforcement learning model to utilize the reinforcement learning model to perform trial and error learning based on the test case set, thereby obtaining the redundant data in the test case set; The redundant data is removed from the test case set to obtain the effective test case set.

4. The performance testing method for a distributed system according to claim 1, characterized in that, Before using knowledge graphs to analyze historical test data and real-time streaming data to obtain test data analysis results, the performance testing method further includes: The TF-IDF algorithm is used to extract high-frequency anomaly events from historical test logs, and the high-frequency anomaly events are used as the root nodes of the knowledge graph. The high-frequency anomaly events are the anomaly events that occur more than the anomaly count threshold among all anomaly events. The system component nodes of the knowledge graph are generated based on the architectural topology information of the distributed system. The knowledge graph is dynamically expanded by acquiring the anomaly propagation path corresponding to the real-time streaming data. The temporal associations between each abnormal event and the system component nodes are generated by a conditional random field to obtain the hierarchical node structure of the knowledge graph. The knowledge graph is obtained by expanding edge relationships and adaptively updating attributes.

5. The performance testing method for a distributed system according to claim 4, characterized in that, The performance testing method also includes: When the number of nodes in the knowledge graph reaches the node number threshold and the anomaly recognition rate decreases by a predetermined number of consecutive predetermined times, low-frequency anomaly events and core component nodes are automatically connected through cascaded influence edges to form an association network. The attribute weights of the knowledge graph are recalculated based on the current test scenario.

6. The performance testing method for a distributed system according to claim 1, characterized in that, The historical test data and the real-time streaming data are analyzed using a knowledge graph to obtain the test data analysis results, including: The real-time streaming data is matched with the abnormal event nodes in the knowledge graph to obtain the node matching degree; When the node matching degree reaches the node matching degree threshold, the abnormal event node is determined to be activated as an active node; Search for the propagation path of the abnormal event based on the activated node; The information corresponding to the propagation path is determined as the test data analysis result.

7. The performance testing method for a distributed system according to claim 6, characterized in that, Using the test data analysis results, through dynamic weighted node matching and cascaded enhanced path reasoning, abnormal events during the test process are located, including: Based on the set of activated nodes corresponding to the activated node, calculate the static edge confidence of the static dependency edges between each node and other nodes in the knowledge graph; All potential anomaly propagation paths are generated based on the static edge confidence and the dynamically enhanced edge confidence; The abnormal propagation path was subjected to attribute deviation verification, and the verification results were obtained. The abnormal event is obtained based on the verification results.

8. The performance testing method for a distributed system according to any one of claims 1 to 7, characterized in that, After using the test data analysis results to locate abnormal events during the test process through dynamic weighted node matching and cascading enhanced path reasoning, the performance testing method further includes: The test results of the distributed system are fed back into the knowledge graph and the reinforcement learning model to update the knowledge graph and the reinforcement learning model.

9. A performance testing device for a distributed system, characterized in that, include: The generation unit is used to generate an initial performance test space based on the performance parameters of the distributed system. The simulation unit is used to simulate the operating environment and load conditions of the distributed system in the initial performance test space to obtain a test case set of the distributed system. The deletion unit is used to delete redundant data from the test case set through trial and error learning to obtain an effective test case set, wherein the redundant data is data in the test case set whose performance impact on the distributed system is lower than the performance impact threshold; The testing unit is used to perform performance testing on the distributed system using the set of valid test cases and to acquire real-time streaming data generated during the testing process. The analysis unit is used to analyze historical test data and real-time streaming data using a knowledge graph to obtain test data analysis results; The processing unit is used to locate abnormal events during the testing process by using the test data analysis results through dynamic weighted node matching and cascaded enhanced path reasoning.

10. A distributed system testing system, characterized in that, The distributed system testing system uses the performance testing method for distributed systems as described in any one of claims 1 to 8.