Server testing method and apparatus

By extracting features from multi-dimensional monitoring indicators and fusing data, combined with an intelligent fault detection model, the problem of time-consuming fault location in existing server testing methods has been solved, enabling rapid and accurate identification and prediction of server faults.

CN122633489APending Publication Date: 2026-08-25SUMA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611126014.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing server testing methods rely on human experience and lack intelligent data analysis, resulting in time-consuming fault location and easy omission of key information.

Method used

By employing multi-dimensional monitoring indicator feature extraction and data fusion, combined with pre-trained fault detection models and association rule mining, fault information and propagation paths are determined, and intelligent anomaly detection and fault prediction are performed using machine learning and deep learning models.

Benefits of technology

It enables rapid and accurate identification and prediction of server faults, reduces the difficulty of operation and maintenance, and improves the efficiency of fault location and the success rate of prevention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122633489A_ABST
    Figure CN122633489A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a server testing method and device. The specific implementation of the method comprises: performing feature extraction and data fusion based on multi-dimensional monitoring indicators to obtain a feature vector; determining fault information based on the feature vector through a pre-trained fault detection model; and determining a propagation path of the fault by mining association rules between the multi-dimensional monitoring indicators based on the fault information. The implementation improves testing efficiency, reduces fault positioning difficulty, can provide early warning of faults, and realizes active protection of server reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments disclosed herein relate to the field of computer technology, and more specifically to server testing methods and apparatus. Background Technology

[0002] With the rapid development of cloud computing, big data, and artificial intelligence technologies, servers, as core infrastructure, directly impact the stable operation of the entire system. Server reliability testing is a crucial step in ensuring server quality, and traditional testing methods primarily rely on human experience and fixed testing procedures.

[0003] Current technologies lack intelligent data analysis capabilities, making it impossible to extract valuable information from multi-dimensional data. After a test fails, manual analysis of numerous log files is required to pinpoint the root cause of the failure, which is time-consuming and prone to missing crucial information. Summary of the Invention

[0004] The embodiments of this disclosure provide server testing methods and apparatus.

[0005] In a first aspect, embodiments of this disclosure provide a server testing method, comprising: extracting features and fusing data based on multi-dimensional monitoring indicators to obtain feature vectors; determining fault information based on the feature vectors using a pre-trained fault detection model; and determining the fault propagation path based on the fault information by mining the association rules between multi-dimensional monitoring indicators.

[0006] In some embodiments, the multi-dimensional monitoring metrics include at least one of the following: hardware monitoring metrics, software monitoring metrics, network monitoring metrics, environmental monitoring metrics, and test monitoring metrics; and feature extraction and data fusion based on the multi-dimensional monitoring metrics to obtain a feature vector, including: preprocessing the multi-dimensional monitoring metrics to obtain monitoring data, wherein the preprocessing includes at least one of the following methods: normalization, time alignment, and missing value handling; and performing feature extraction and data fusion on the monitoring data using a principal component analysis algorithm to obtain a feature vector.

[0007] In some embodiments, the fault information includes at least one of the following: fault type, fault cause, solution, and related components; and the fault information is determined based on feature vectors using a pre-trained fault detection model, including: determining first fault information from the feature vectors using statistical rules; determining second fault information from the feature vectors using a machine learning model; determining third fault information from the feature vectors using a deep learning model; and aggregating the first fault information, the second fault information, and the third fault information to obtain the fault information.

[0008] In some embodiments, the method further includes: fusing the second fault information and the third fault information to obtain fused fault information; determining a target prevention action based on the fused fault information and the propagation path; and executing the target prevention action.

[0009] In some embodiments, the method further includes: monitoring system state changes after the target prevention action is executed, determining the prevention effect; and adjusting the network parameters of the machine learning model and the deep learning model based on the prevention effect.

[0010] In some embodiments, based on fault information, the propagation path of a fault is determined by mining the association rules between multi-dimensional monitoring indicators, including: determining the association rules between multi-dimensional monitoring indicators through a relationship mining algorithm; constructing a directed acyclic graph of fault propagation based on the association rules; and determining the propagation path of the fault based on the fault information and the directed acyclic graph.

[0011] In some embodiments, the method further includes: fusing code information, log information, stack information, and assertion information to construct a context for a test failure scenario; determining fault semantics based on the context using a large language model; querying a set of candidate historical cases that match the fault semantics in a constructed fault knowledge graph, wherein the fault knowledge graph is a knowledge network automatically constructed from historical test data, and the fault knowledge graph contains at least one of the following entities: fault type, fault cause, solution, and related components; and performing relational reasoning on the set of candidate historical cases using a graph neural network to obtain the current fault cause.

[0012] In some embodiments, the method further includes: updating the fault knowledge graph based on the current fault cause and its associated fault type, solution and related components in response to detecting that the current fault cause is not in the fault knowledge graph.

[0013] In some embodiments, the method further includes: determining test case information based on server status using a pre-trained policy learner, wherein the test case information includes at least one of the following: test case type, test intensity, test scope, and test priority; generating test candidate cases using a genetic algorithm based on the test case information; and mutating the test candidate cases to generate multiple test cases.

[0014] In some embodiments, the method further includes: prioritizing multiple test cases; allocating test resources to each test case based on its priority, resource requirements, and current server load; executing multiple test cases based on the test resources to obtain test results; and adjusting the network parameters of the policy learner based on the test results.

[0015] Secondly, embodiments of this disclosure provide a server testing apparatus, comprising: a data processing unit configured to perform feature extraction and data fusion based on multi-dimensional monitoring indicators to obtain a feature vector; a detection unit configured to determine fault information based on the feature vector using a pre-trained fault detection model; and an analysis unit configured to determine the fault propagation path based on the fault information by mining the association rules between multi-dimensional monitoring indicators.

[0016] Thirdly, embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more computer programs stored thereon, wherein when the one or more computer programs are executed by the one or more processors, the one or more processors perform the method as described in any one of the first aspects.

[0017] Fourthly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method as described in any one of the first aspects.

[0018] Fifthly, embodiments of this disclosure provide a computer program product including a computer program that, when executed by a processor, implements the method as described in any one of the first aspects.

[0019] The server testing method and apparatus provided in the embodiments of this disclosure achieve proactive assurance of server reliability through core technologies such as multi-dimensional data acquisition, intelligent anomaly detection, automated root cause analysis, adaptive test generation, and fault prediction and prevention.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0021] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is an exemplary system architecture diagram to which one embodiment of this disclosure can be applied; Figure 2 This is a flowchart of one embodiment of the server testing method according to the present disclosure; Figure 3 This is a schematic diagram of another embodiment of the server testing method according to the present disclosure; Figure 4 This is a flowchart of yet another embodiment of the server testing method according to the present disclosure; Figure 5 This is a flowchart of yet another embodiment of the server testing method according to the present disclosure; Figure 6 This is a schematic diagram of the structure of one embodiment of the server testing apparatus according to the present disclosure; Figure 7 This is a schematic diagram of the structure of a computer system suitable for implementing embodiments of the present disclosure. Detailed Implementation

[0022] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0023] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0024] Figure 1 An exemplary system architecture is shown that can be applied to embodiments of the server testing methods or server testing apparatus disclosed herein.

[0025] like Figure 1 As shown, the system architecture includes: (1) Data acquisition layer: Real-time collection of multi-dimensional data such as server hardware, software, network, environment and testing through monitoring agents, supporting standard protocols such as SNMP (Simple Network Management Protocol).

[0026] (2) Data processing layer: The collected raw data is preprocessed (normalization, time alignment, missing value handling), and then features are extracted and data is fused using methods such as PCA (Principal Component Analysis, the most classic dimensionality reduction algorithm in machine learning and data mining) to construct a unified feature vector.

[0027] (3) Intelligent analysis layer: It includes four core modules: anomaly detection, root cause analysis, test optimization and fault prediction, and uses artificial intelligence technology for intelligent analysis.

[0028] (4) Decision execution layer: Based on the analysis results, the strategy engine makes decisions on prevention or recovery actions, which are automatically executed by the executor and the results are displayed through the operation and maintenance console.

[0029] (5) Knowledge storage layer: Store historical monitoring data into a time series database, build and update fault knowledge graphs, and provide knowledge support for intelligent analysis.

[0030] The data acquisition layer is the foundation of the system, responsible for collecting server operation data in real time from multiple dimensions. The data acquisition process is as follows: (1) Hardware monitoring: Collect hardware operation indicators such as CPU (central processing unit) utilization, memory usage, disk I / O (input / output), network traffic, temperature, voltage, and fan speed to reflect the health status of server hardware.

[0031] (2) Software monitoring: Collect software operation information such as process status, service status, system log, application log, and error log to reflect the operating status of system software.

[0032] (3) Network monitoring: Collect network indicators such as network latency, packet loss rate, number of connections, and bandwidth utilization to reflect the quality of network communication.

[0033] (4) Environmental monitoring: Collect environmental indicators such as room temperature, humidity, power status, and rack location to reflect the server operating environment.

[0034] (5) Test monitoring: Collect test indicators such as test case execution status, test results, test coverage, and test duration to reflect the test execution status.

[0035] (6) Data preprocessing: The collected raw data is parsed, normalized in units, and timestamp aligned to ensure that the data format is consistent.

[0036] (7) Data storage: Store the preprocessed data in a time series database.

[0037] Continue to refer to Figure 2 The diagram illustrates a flow 200 of an embodiment of a server testing method according to the present disclosure. This server testing method includes the following steps: Step 201: Based on multi-dimensional monitoring indicators, feature extraction and data fusion are performed to obtain feature vectors.

[0038] In this embodiment, the multi-dimensional monitoring indicators collected above undergo preprocessing, which may include missing value imputation, abnormal noise removal, data normalization, and timestamp alignment. This is used to eliminate the impact of differences in the units of measurement of different dimensions of indicators and data time series deviations, ensuring the integrity and validity of the monitoring data. Based on this, feature extraction is performed on the preprocessed multi-dimensional monitoring indicators to uncover the core operational characteristics, fluctuation characteristics, and correlation characteristics of each monitoring indicator. Furthermore, the multi-dimensional heterogeneous monitoring data is fused, integrating the scattered and independent monitoring indicator data into a structured feature vector with unified and fixed dimensions. This achieves a unified representation of multi-source monitoring data and provides standard input data for subsequent fault detection model inference.

[0039] Step 202: Based on the feature vector, determine the fault information using a pre-trained fault detection model.

[0040] In this embodiment, a dedicated fault detection model is pre-trained based on massive historical normal operation monitoring data and monitoring sample data of various fault scenarios. The model has the ability to identify abnormal states of monitoring features. The feature vectors constructed in step 201 are input into the pre-trained fault detection model, and the model performs comprehensive analysis and reasoning on the feature distribution, numerical fluctuations, and feature correlation states of the feature vectors.

[0041] By using the model's feature matching and anomaly detection logic, the system identifies whether there are any anomalies in the current system operation status. If an anomaly is detected, the system accurately outputs the corresponding fault information, which may include core fault information such as fault type, fault occurrence time, fault-related services, fault anomaly degree, and fault-affected modules, thus completing the intelligent identification and judgment of system faults.

[0042] Step 203: Based on the fault information, determine the fault propagation path by mining the correlation rules between multi-dimensional monitoring indicators.

[0043] In this embodiment, after obtaining system fault information, the identified fault nodes and fault anomaly features are used as anchor points. For the set of multi-dimensional monitoring indicators that triggered this fault, the association rule mining algorithm (Apriori algorithm or FP-Growth algorithm) is used to deeply mine the massive time-series monitoring data. The abnormal time-series relationship, numerical linkage relationship and causal dependency relationship of each dimension monitoring indicator are traversed and analyzed. High confidence indicator association rules are selected and false association relationships caused by accidental data fluctuations are eliminated.

[0044] Based on the causal relationship rules of the real indicators obtained through mining, and combined with the system architecture logic, a Directed Acyclic Graph (DAG) for fault propagation is constructed. This clearly outlines the abnormal propagation sequence of each monitoring indicator, identifies the source indicator, intermediate propagation indicators, and the ultimately affected indicators of the fault, and ultimately accurately determines the complete fault propagation path from the root cause to each business module. This enables fault root cause localization and fault propagation link tracing, providing accurate data support for subsequent fault repair and risk prevention.

[0045] The method provided in the above embodiments of this disclosure first extracts features from multi-dimensional monitoring indicators and fuses data to generate a unified feature vector. Then, it quickly identifies fault information based on a pre-trained fault detection model. Finally, it specifically mines the association rules between monitoring indicators to deduce the fault propagation path. On the one hand, it unifies the representation of heterogeneous monitoring data and improves the identification accuracy and judgment efficiency of the fault detection model. On the other hand, it can accurately mine the real causal transmission relationship between indicators, clearly restore the complete fault propagation link, effectively filter false alarm associations, quickly locate the root cause and scope of impact of the fault, significantly reduce the difficulty of troubleshooting operation and maintenance faults, and provide a reliable basis for fault handling and early risk prevention.

[0046] In some optional implementations of this embodiment, the multi-dimensional monitoring indicators include at least one of the following: hardware monitoring indicators, software monitoring indicators, network monitoring indicators, environmental monitoring indicators, and test monitoring indicators; and feature extraction and data fusion based on multi-dimensional monitoring indicators to obtain feature vectors, including: preprocessing the multi-dimensional monitoring indicators to obtain monitoring data, wherein the preprocessing includes at least one of the following methods: normalization, time alignment, and missing value handling; and performing feature extraction and data fusion on the monitoring data using principal component analysis algorithm to obtain feature vectors.

[0047] This embodiment provides a method for constructing feature vectors based on multi-dimensional monitoring indicators. The specific steps are as follows: Step 1: Collect multi-dimensional monitoring metrics. The collected monitoring metrics should include at least one of the following categories: hardware monitoring metrics, software monitoring metrics, network monitoring metrics, environmental monitoring metrics, and test monitoring metrics. Hardware monitoring metrics include hardware operating parameters such as CPU utilization, memory usage, disk I / O, and device temperature. Software monitoring metrics include program operating parameters such as service response latency, concurrent request volume, number of process connections, and error frequency. Network monitoring metrics include transmission parameters such as packet loss rate, bandwidth usage, and link latency. Environmental monitoring metrics include data center environmental parameters such as data center temperature and humidity, voltage, and cooling fan speed. Test monitoring metrics include automated test parameters such as test case execution time, interface pass rate, and load test.

[0048] Step 2: Perform preprocessing operations on the collected multi-dimensional monitoring indicators to obtain standardized monitoring data. The preprocessing operation can be at least one of normalization, time alignment, and missing value handling. Normalization eliminates the differences in the dimensions of different types of indicators, time alignment unifies the time sequence timestamps of all indicators, and missing value handling repairs data gaps by interpolation and mean filling, ensuring that the monitoring data is complete, time-series synchronized, and numerically comparable.

[0049] Step 3: Use Principal Component Analysis (PCA) algorithm to perform feature extraction and data fusion on the preprocessed monitoring data. Remove redundant related information between monitoring indicators, retain the core fluctuation characteristics of the data, and integrate multi-source, heterogeneous, and high-dimensional multi-dimensional monitoring indicators into a feature vector with unified dimensions and condensed information, thus completing the standardized representation output of multi-dimensional monitoring data.

[0050] This solution covers five categories of monitoring data sources: hardware, software, network, environment, and testing. It completes data regularization through normalization, time-series alignment, and missing data repair, and then uses PCA to achieve dimensionality reduction and fusion. This not only eliminates the problem of inconsistent dimensions and time series of heterogeneous indicators, but also removes indicator redundancy, compresses data dimensions, retains key operational characteristics, and outputs a unified standard feature vector, reducing the computational overhead of subsequent fault detection models and improving the accuracy and efficiency of anomaly identification.

[0051] In some optional implementations of this embodiment, the fault information includes at least one of the following: fault type, fault cause, solution, related components; and the fault information is determined based on feature vectors using a pre-trained fault detection model, including: determining first fault information from feature vectors using statistical rules; determining second fault information from feature vectors using a machine learning model; determining third fault information from feature vectors using a deep learning model; and aggregating the first fault information, second fault information, and third fault information to obtain the fault information.

[0052] By fusing monitoring data from different dimensions and employing a three-layer anomaly detection mechanism, rapid, accurate, and predictive anomaly detection can be achieved. (1) First-level statistical rule detection: Traditional statistical methods such as threshold detection and sliding window statistics are used to quickly identify obvious abnormal indicators and determine the first fault information. This layer has a short response time (<1 second) and is suitable for real-time alarms, but it can only detect obvious anomalies.

[0053] (2) Second-layer machine learning detection: Unsupervised learning methods such as Isolation Forest and Autoencoder are used to discover complex nonlinear anomaly patterns. This layer has a moderate response time (1-5 seconds) and can identify anomalies that are difficult to detect by traditional statistical methods, thus determining the second fault information.

[0054] (3) Third-layer deep learning prediction: Using deep learning models such as LSTM (Long Short-Term Memory), GRU (Gated Recurrent Unit), or Transformer, future trends are predicted based on historical data. Potential faults can be predicted 1-5 minutes in advance, and the third fault information can be determined. This layer has a relatively long response time (5-10 seconds), but it can achieve proactive prevention.

[0055] (4) Alarm aggregation: Aggregate the three-layer detection results, remove duplicate alarms, merge related alarms, and avoid alarm storms.

[0056] This embodiment integrates statistical rules, machine learning, and deep learning three-layer recognition logic to extract and aggregate fault information, taking into account both simple explicit faults and complex coupled hidden faults. The fault recognition coverage is wider and the recognition accuracy is higher. The output fault information synchronously covers the fault type, cause, handling plan and related components, with high information completeness, which makes it easy for operation and maintenance personnel to directly carry out fault location and repair work.

[0057] In some optional implementations of this embodiment, the propagation path of the fault is determined by mining the association rules between multi-dimensional monitoring indicators based on the fault information, including: determining the association rules between multi-dimensional monitoring indicators through a relationship mining algorithm; constructing a directed acyclic graph of fault propagation based on the association rules; and determining the propagation path of the fault based on the fault information and the directed acyclic graph.

[0058] This embodiment provides a method for determining fault propagation paths, and the specific implementation steps are as follows: Step 1: Use the relationship mining algorithm to calculate the time series data of multi-dimensional monitoring indicators, and mine the strong correlation rules between the monitoring indicators in terms of time series transmission and numerical linkage. Filter out random fluctuation correlations without causal relationship, and retain the correlation relationships of indicators with fault transmission characteristics.

[0059] Step 2: Construct a Directed Acyclic Graph (DAG) for fault propagation based on the association rules of the mined indicators; use the abnormal events of various monitoring indicators as nodes in the graph, draw directed edges according to the causal relationship of the occurrence of abnormality in the indicators within the association rules, constrain the graph to not have a closed loop, and intuitively represent the fault propagation logic between indicators.

[0060] Step 3: Combining the complete fault information identified in the previous steps, traverse the connected links of the corresponding fault nodes in the directed acyclic graph of fault propagation, sort out the complete chain from the root cause abnormal indicators to the downstream affected indicators, and finally determine the complete propagation path corresponding to this fault.

[0061] This embodiment uses a relationship mining algorithm to quantify the correlation between indicators, builds a structured fault propagation DAG based on association rules to clearly present the causal transmission logic of indicators, and then combines fault information to accurately match links to obtain the fault propagation path. It can distinguish between false indicator fluctuations and real fault transmission relationships, quickly trace the root cause of the fault, completely restore the entire process of fault spread, and significantly shorten the time spent on tracing the source of maintenance faults.

[0062] Further reference Figure 3 This illustrates a flow 300 of another embodiment of the server testing method. Flow 300 of this server testing method includes the following steps: Step 301: Determine the second fault information from the feature vector using a machine learning model.

[0063] In this embodiment, the system extracts historical monitoring data from the time series database, combines it with real-time monitoring data, and generates multi-dimensional feature vectors through feature engineering, including statistical features, time series features, frequency domain features, etc.

[0064] Machine learning models excel at handling nonlinear relationships, feature interactions, and feature importance analysis. They can identify key feature combinations that lead to faults and obtain secondary fault information.

[0065] Step 302: Determine the third fault information from the feature vector using a deep learning model.

[0066] In this embodiment, the deep learning model excels at capturing long-term dependencies, periodic patterns, and trend changes in time series, and can predict the trend of indicator changes over a future period of time to obtain third fault information.

[0067] Step 303: The second fault information and the third fault information are fused to obtain fused fault information.

[0068] In this embodiment, the ensemble method is used to fuse the prediction results of the two models, that is, the results are fused by weighted averaging or voting mechanism to obtain fused fault information, and the weights can be dynamically adjusted according to historical performance.

[0069] The system not only outputs the probability of a failure occurring, but also provides confidence intervals to quantify the uncertainty of the prediction and help in deciding whether to take preventive measures.

[0070] Step 304: Determine the target prevention action based on the fused fault information and propagation path, and execute the target prevention action.

[0071] In this embodiment, the system abstracts hardware components, software services, anomaly indicators, and fault events into nodes based on server component dependencies, monitoring indicator time-series relationships, historical fault records, and expert rules. It also abstracts the potential impact relationships of faults into directed edges, constructing a directed acyclic graph (DAG) for fault propagation. Furthermore, the system calculates the conditional probabilities between nodes based on historical fault data, forming a Bayesian network to calculate the probability of the current anomaly propagating to downstream components or fault events. This predicts possible propagation paths, affected scope, and risk levels, and generates preventative strategies such as load migration, resource expansion, rate limiting and degradation, and test suspension.

[0072] Based on the predicted failure probability, confidence interval, and failure propagation path, combined with preset risk thresholds, the strategy engine decides whether preventative actions are needed and what preventative measures to take. Depending on the failure type and propagation path, the system recommends appropriate preventative measures, such as reducing system load, switching to backup components, increasing resource allocation, adjusting configuration parameters, and triggering load balancing.

[0073] The recovery executor automatically performs preventative actions based on the policy engine's decisions, achieving proactive prevention without manual intervention.

[0074] Step 305: Monitor the changes in system state after the target prevention action is executed to determine the prevention effect.

[0075] In this embodiment, the system establishes a preventive measure effectiveness evaluation model, monitors system state changes after preventive measures are implemented, evaluates the preventive effect, and continuously optimizes the preventive strategy.

[0076] Step 306: Adjust the network parameters of the machine learning model and the deep learning model based on the prevention effect.

[0077] In this embodiment, the prevention effect is fed back to the fault detection model (e.g., machine learning model, deep learning model), and incremental learning techniques are used to update the model parameters to continuously improve prediction accuracy and prevention success rate.

[0078] In this embodiment, a fault prediction model can provide early warning of potential faults 1-5 minutes in advance, achieving a fault prevention success rate of over 70%. Compared to traditional methods that can only passively respond to faults, this application can proactively predict and prevent faults through multi-dimensional monitoring and proactive prevention. This early warning and proactive prevention significantly reduce the system failure rate.

[0079] Further reference Figure 4 This illustrates a flow 400 of yet another embodiment of the server testing method. Flow 400 of the server testing method includes the following steps: Step 401: Integrate code information, log information, stack trace information, and assertion information to construct the context of the test failure scenario.

[0080] In this embodiment, the system collects logs from multiple sources, including operating system logs, application logs, test framework logs, and error logs.

[0081] Use standard test framework parsers (e.g., Pytest, Allure) to extract structured information, including test case names, execution results, assertion information, etc.

[0082] Extracting an Abstract Syntax Tree (AST) from source code allows us to obtain code context information, function call chains, variable dependencies, and more, helping us understand the code location and context in which errors occur.

[0083] Extract stack trace information from the exception log to locate the faulty call chain and understand the error propagation path.

[0084] By integrating code information, log information, stack traces, and assertion information, a complete context for test failure scenarios can be constructed.

[0085] Step 402: Determine the fault semantics based on the context using a large language model.

[0086] In this embodiment, a pre-trained large language model is used to convert text and code information into vector representations, generating semantic embeddings. Leveraging the semantic understanding capabilities and attention mechanisms of the large language model, key information fragments are identified to understand the semantics of faults.

[0087] Step 403: Query the set of candidate historical cases that match the fault semantics in the constructed fault knowledge graph.

[0088] In this embodiment, historical cases similar to the current fault are queried in the constructed fault knowledge graph. The knowledge graph contains entities and relationships such as fault type, fault cause, solution, and related components. After the current test fails or a fault occurs, the log characteristics, abnormal indicators, error messages, involved components, stack information, etc. of the current fault are matched with the existing historical cases in the knowledge graph to find similar faults and their known root causes and solutions.

[0089] The fault knowledge graph is a knowledge network automatically constructed from historical test data. It contains at least one of the following entities: fault type, fault cause, solution, and related components.

[0090] Step 404: Use a graph neural network to perform relational reasoning on the candidate historical case set to obtain the cause of the current failure.

[0091] In this embodiment, a Graph Neural Network (GNN) is used to perform reasoning on a knowledge graph. Based on the representation of entities and relationships, it identifies the historical events most similar to the current fault. The knowledge graph query first recalls a candidate range, and then the GNN performs deep relationship reasoning and similarity calculation within the candidate range. Finally, the results of both are used together for candidate root cause ranking.

[0092] Based on similarity, confidence, and historical test success rate, candidate root causes are ranked, and the most likely cause of failure is output.

[0093] Step 405: In response to the detection that the current fault cause is not in the fault knowledge graph, update the fault knowledge graph based on the current fault cause and its associated fault type, solution and related components.

[0094] In this embodiment, newly discovered failure modes, root causes, and solutions are added to the knowledge graph in the form of entity-relationships to support incremental learning and continuously optimize the accuracy of analysis.

[0095] In this embodiment, a large language model and knowledge graph are combined for test log analysis to automatically extract multi-source information, construct a complete context graph of test failure scenarios, and use graph neural networks for knowledge graph reasoning to achieve automated root cause localization.

[0096] It supports incremental learning mechanisms, automatically updating the knowledge graph and model parameters after each analysis of new test failure cases, using continuous learning techniques to avoid catastrophic forgetting, and supporting feedback from domain experts to continuously optimize the accuracy of analysis.

[0097] Further reference Figure 5 This illustrates a flow 500 of another embodiment of the server testing method. Flow 500 of the server testing method includes the following steps: Step 501: Based on the server status, determine the test case information using a pre-trained policy learner.

[0098] In this embodiment, the system continuously monitors the server status, including key indicators such as system load, temperature, error rate, test coverage, and historical test results, and constructs a status feature vector.

[0099] Test case generation and execution are modeled as a Markov Decision Process (MDP), and the optimal test strategy is learned using the Proximal Policy Optimization (PPO) algorithm. The state space can include the current state of the server, the action space can include test type, test intensity, test scope, etc., and the reward function can be based on test coverage, the number of defects found, and execution efficiency.

[0100] Based on the current server state, the strategy learner decides what type of test cases should be generated, what the test intensity should be, what the test scope should be, and what the test priority should be.

[0101] Step 502: Based on the test case information, generate test candidate cases using a genetic algorithm.

[0102] In this embodiment, the test case generator employs various techniques to generate candidate test cases. For example, the Genetic Algorithm (GA) evolves test cases through selection, crossover, and mutation operations to adapt to the server state.

[0103] Step 503: Mutate the candidate test cases to generate multiple test cases.

[0104] In this embodiment, existing test cases are mutated to generate new test scenarios and discover boundary conditions.

[0105] Step 504: Prioritize the multiple test cases.

[0106] In this embodiment, based on code coverage, historical test results, and server status, high-risk code areas are identified, test cases are prioritized, and high-risk, high-value test cases are executed first.

[0107] Step 505: Allocate test resources to each test case based on its priority, resource requirements, and current server load.

[0108] In this embodiment, the execution scheduler intelligently allocates test resources and dynamically adjusts the number of concurrent tests based on the priority of the test cases, resource requirements, and the current server load, so as to avoid the test from causing too much burden on the system.

[0109] By dynamically generating and optimizing test cases using reinforcement learning, and adaptively adjusting testing strategies based on server status, testing efficiency and coverage are improved. Through adaptive test case generation and execution, testing efficiency is increased by over 60%, and test coverage by over 40%. Compared to traditional methods that require manual test case writing, this application can automatically generate test cases based on server status and historical data, significantly improving testing efficiency.

[0110] Step 506: Execute multiple test cases based on test resources to obtain test results.

[0111] In this embodiment, after the test agent executes the test cases, it collects the test results, which may include whether the test passed, code coverage, error information found, execution time, etc.

[0112] Step 507: Adjust the network parameters of the policy learner based on the test results.

[0113] In this embodiment, a reward signal is calculated based on the test results. The reward function takes into account test coverage (the higher the coverage, the greater the reward), the number of defects found (the more defects found, the greater the reward), and execution efficiency (the shorter the execution time, the greater the reward).

[0114] The reward signal is passed to the policy learner, and the testing policy is updated using a reinforcement learning algorithm, enabling the system to learn more effective testing methods and continuously optimize the testing policy.

[0115] This solution collects multi-dimensional execution feedback from test cases as the basis for optimization. It constructs a composite reward function that takes into account code coverage, defect detection rate, and execution time to generate quantified reward signals, and uses reinforcement learning to iteratively update the test strategy in a closed loop. On the one hand, it can comprehensively quantify the quality of test cases, defect detection capabilities, and operational efficiency, forming a clear and distinguishable optimization direction, guiding the agent to continuously generate high-coverage, high-defect-detection, and low-time-consumption high-quality test cases. On the other hand, it enables autonomous iterative optimization of the test strategy without the need for continuous manual adjustment of test case generation rules, continuously improving the overall test sufficiency, defect detection capability, and test execution efficiency, reducing redundant and inefficient test tasks, and reducing test resource consumption.

[0116] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a server testing apparatus, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0117] like Figure 6As shown, the server testing device 600 of this embodiment includes a data processing unit 601, a detection unit 602, and an analysis unit 603. The data processing unit 601 is configured to extract features and fuse data based on multi-dimensional monitoring indicators to obtain feature vectors; the detection unit 602 is configured to determine fault information based on the feature vectors using a pre-trained fault detection model; and the analysis unit 603 is configured to determine the fault propagation path based on the fault information by mining the correlation rules between multi-dimensional monitoring indicators.

[0118] In this embodiment, the specific processing of the data processing unit 601, detection unit 602, and analysis unit 603 of the server testing device 600 can be referred to Figure 2 Steps 201, 202, and 203 in the corresponding embodiment.

[0119] In some optional implementations of this embodiment, the multi-dimensional monitoring indicators include at least one of the following: hardware monitoring indicators, software monitoring indicators, network monitoring indicators, environmental monitoring indicators, and test monitoring indicators; and the data processing unit 601 is further configured to: preprocess the multi-dimensional monitoring indicators to obtain monitoring data, wherein the preprocessing includes at least one of the following methods: normalization, time alignment, and missing value handling; and to extract features and fuse data from the monitoring data using a principal component analysis algorithm to obtain a feature vector.

[0120] In some optional implementations of this embodiment, the fault information includes at least one of the following: fault type, fault cause, solution, and related components; and the detection unit 602 is further configured to: determine first fault information from the feature vector through statistical rules; determine second fault information from the feature vector through a machine learning model; determine third fault information from the feature vector through a deep learning model; and aggregate the first fault information, the second fault information, and the third fault information to obtain fault information.

[0121] In some optional implementations of this embodiment, the device 600 further includes a prevention unit (not shown in the figures), configured to: fuse the second fault information and the third fault information to obtain fused fault information; determine a target prevention action based on the fused fault information and the propagation path; and execute the target prevention action.

[0122] In some optional implementations of this embodiment, the prevention unit is further configured to: monitor the changes in system state after the target prevention action is executed, determine the prevention effect, and adjust the network parameters of the machine learning model and the deep learning model based on the prevention effect.

[0123] In some optional implementations of this embodiment, the analysis unit 603 is further configured to: determine the association rules between multi-dimensional monitoring indicators through a relationship mining algorithm; construct a directed acyclic graph of fault propagation based on the association rules; and determine the fault propagation path based on the fault information and the directed acyclic graph.

[0124] In some optional implementations of this embodiment, the device 600 further includes an inference unit (not shown in the figures), configured to: fuse code information, log information, stack information, and assertion information to construct a context of the test failure scenario; determine the fault semantics based on the context using a large language model; query a set of candidate historical cases that match the fault semantics in the constructed fault knowledge graph, wherein the fault knowledge graph is a knowledge network automatically constructed from historical test data, and the fault knowledge graph contains at least one of the following entities: fault type, fault cause, solution, and related components; and perform relational inference on the set of candidate historical cases using a graph neural network to obtain the current fault cause.

[0125] In some optional implementations of this embodiment, the inference unit is further configured to: update the fault knowledge graph based on the current fault cause and its associated fault type, solution and related components in response to detecting that the current fault cause is not in the fault knowledge graph.

[0126] In some optional implementations of this embodiment, the apparatus 600 further includes an automatic testing unit (not shown in the figures), configured to: determine test case information based on the server state using a pre-trained strategy learner, wherein the test case information includes at least one of the following: test case type, test intensity, test scope, and test priority; generate test candidate cases using a genetic algorithm based on the test case information; and mutate the test candidate cases to generate multiple test cases.

[0127] In some optional implementations of this embodiment, the automatic testing unit is further configured to: prioritize multiple test cases; allocate test resources to each test case based on its priority, resource requirements, and current server load; execute multiple test cases based on the test resources to obtain test results; and adjust the network parameters of the policy learner based on the test results.

[0128] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in this disclosed technical solution all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to safeguard user personal information security and network security.

[0129] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium.

[0130] An electronic device includes: one or more processors; and a storage device having stored one or more computer programs thereon, which, when executed by the one or more processors, cause the one or more processors to implement the method described in process 200, 300, 400, or 500.

[0131] A computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in process 200, 300, 400, or 500.

[0132] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0133] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of the electronic device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0134] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of displays, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0135] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as road planning methods. For example, in some embodiments, the road planning method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the road planning method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the road planning method by any other suitable means (e.g., by means of firmware).

[0136] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0137] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0138] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or electronic device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or electronic devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0139] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including voice input, speech input, or tactile input).

[0140] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0141] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be servers in distributed systems or servers incorporating blockchain technology. Servers can also be cloud servers, or intelligent cloud computing servers or intelligent cloud hosts with artificial intelligence technology.

[0142] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0143] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A server testing method, comprising: Feature vectors are obtained by extracting features and fusing data based on multi-dimensional monitoring indicators. Based on the feature vector, fault information is determined using a pre-trained fault detection model; Based on the fault information, the propagation path of the fault is determined by mining the correlation rules between the multi-dimensional monitoring indicators.

2. The method according to claim 1, wherein, The multi-dimensional monitoring metrics include at least one of the following: hardware monitoring metrics, software monitoring metrics, network monitoring metrics, environmental monitoring metrics, and test monitoring metrics. as well as The feature vector obtained by feature extraction and data fusion based on multi-dimensional monitoring indicators includes: Monitoring data is obtained by preprocessing multi-dimensional monitoring indicators, wherein the preprocessing includes at least one of the following methods: normalization, time alignment, and missing value handling. The monitoring data is subjected to feature extraction and data fusion using principal component analysis algorithm to obtain feature vectors.

3. The method according to claim 1, wherein, The fault information includes at least one of the following: fault type, fault cause, solution, and related components; as well as The process of determining fault information based on the feature vector using a pre-trained fault detection model includes: The first fault information is determined from the feature vector using statistical rules; The second fault information is determined from the feature vector using a machine learning model; The third fault information is determined from the feature vector using a deep learning model; The first fault information, the second fault information, and the third fault information are aggregated to obtain fault information.

4. The method according to claim 3, further comprising: The second fault information and the third fault information are fused to obtain fused fault information; Based on the fused fault information and the propagation path, target prevention actions are determined; Perform the target prevention action.

5. The method according to claim 4, further comprising: Monitor the system state changes after the target prevention actions are executed to determine the prevention effect; The network parameters of the machine learning model and the deep learning model are adjusted based on the preventive effect.

6. The method according to claim 1, wherein, The step of determining the propagation path of the fault based on the fault information by mining the correlation rules between the multi-dimensional monitoring indicators includes: The association rules between the multi-dimensional monitoring indicators are determined by the relationship mining algorithm; Based on the association rules, a directed acyclic graph of fault propagation is constructed; The propagation path of the fault is determined based on the fault information and the directed acyclic graph.

7. The method according to claim 1, further comprising: By integrating code information, log information, stack traces, and assertion information, a context for test failure scenarios can be constructed. Based on the aforementioned context, fault semantics are determined using a large language model; Query the set of candidate historical cases that match the fault semantics in the constructed fault knowledge graph, wherein the fault knowledge graph is a knowledge network automatically constructed from historical test data, and the fault knowledge graph contains at least one of the following entities: fault type, fault cause, solution, and related components; The current cause of the failure is obtained by performing relational reasoning on the candidate historical case set using a graph neural network.

8. The method according to claim 7, further comprising: In response to detecting that the current fault cause is not in the fault knowledge graph, the fault knowledge graph is updated based on the current fault cause and its associated fault type, solution and related components.

9. The method according to claim 1, further comprising: Based on the server status, test case information is determined through a pre-trained policy learner, wherein the test case information includes at least one of the following: test case type, test intensity, test scope, and test priority; Based on the test case information, test candidate cases are generated using a genetic algorithm; The candidate test cases are mutated to generate multiple test cases.

10. The method of claim 9, further comprising: Prioritize the multiple test cases; Allocate test resources to each test case based on its priority, resource requirements, and current server load. Execute the multiple test cases based on the test resources to obtain test results; Adjust the network parameters of the policy learner based on the test results.

11. A server testing apparatus, comprising: The data processing unit is configured to perform feature extraction and data fusion based on multi-dimensional monitoring indicators to obtain feature vectors; The detection unit is configured to determine fault information based on the feature vector using a pre-trained fault detection model; The analysis unit is configured to determine the propagation path of the fault by mining the correlation rules between the multi-dimensional monitoring indicators based on the fault information.

12. An electronic device, comprising: One or more processors; Storage device, on which one or more computer programs are stored, When the one or more computer programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-10.

13. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-10.

14. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-10.