Software performance anomaly test method and device based on graph attention network and medium

CN120523698APending Publication Date: 2025-08-22AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510594610.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

The prior art cannot effectively identify the differences in multivariate software performance detection in different test scenarios, resulting in low accuracy and compatibility of abnormal detection.

Method used

The graph-attention network is adopted to analyze the variable relationship through normalization processing and graph-attention network, and combine gating coefficient calculation and long-term memory network codec to generate an adaptive fusion feature performance test matrix sequence to perform abnormal detection.

Benefits of technology

It improves the accuracy and compatibility of software performance abnormality testing, and can better identify the differences in variable characterization in different test scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120523698A_ABST
    Figure CN120523698A_ABST
Patent Text Reader

Abstract

The invention discloses a software performance anomaly test method and device based on a graph attention network and a medium. The method comprises the steps of obtaining a to-be-tested multivariable performance data matrix sequence of target software; carrying out normalization processing on the multivariable performance data matrix sequence to be tested, and carrying out relation analysis processing on different variables through a graph attention network to obtain a variable relation feature vector corresponding to each variable; a self-adaptive fusion feature performance test matrix sequence is calculated through a gating coefficient calculation method in combination with the relation feature vectors of the variables; and inputting the adaptive fusion feature performance test matrix sequence into a long short-term memory network codec for processing to generate a reconstruction test matrix sequence, and performing anomaly judgment through an anomaly detection judgment method to obtain a software performance anomaly test result. The problem that the difference of variable characterization in different test scenes cannot be identified is solved, and the accuracy of the software performance exception test result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a software performance anomaly testing method, device and medium based on a graph attention network. Background Art

[0002] Software performance testing applies stress to the tested system in a specific manner according to a specific testing strategy to verify whether the system can meet user requirements after it is launched. It is a primary means of ensuring software reliability. Software performance anomaly detection can detect anomalies that occur during performance testing. In actual software performance testing, performance measurement indicators often include multiple variables.

[0003] In the process of realizing the present invention, the inventors found that the existing technology has the following defects: At present, for anomaly detection of multivariate time series, existing methods often use deep learning methods to greatly improve the feature representation ability of time series data and learn the dependencies between variables. However, in actual engineering applications, the phenomenon representations of these variable indicators in different performance test scenarios are different. For example, in the fatigue test scenario, the number of transactions processed per second, response delay and central processing unit utilization are all stable, while in the step test scenario, the response delay and central processing unit utilization are stable, but the number of transactions processed per second changes with time and increases in a step-by-step manner. Therefore, the traditional multivariate anomaly detection method cannot identify the differences in variable representations under different test scenarios, which reduces the accuracy of anomaly detection and the compatibility and generalization of the detection method. Summary of the Invention

[0004] The present invention provides a software performance anomaly testing method, device and medium based on a graph attention network to improve the accuracy of anomaly detection and the compatibility and generalization of the detection method.

[0005] According to one aspect of the present invention, a method for software performance anomaly testing based on a graph attention network is provided, which includes:

[0006] Obtaining a matrix sequence of multivariate performance data to be tested of the target software;

[0007] Wherein, each variable in the multivariable performance data matrix sequence to be tested corresponds to a performance data matrix sequence within a preset time period;

[0008] Normalizing the multivariate performance data matrix sequence to be tested, and performing relationship analysis between different variables through a pre-set graph attention network to obtain a variable relationship feature vector corresponding to each variable;

[0009] By using a preset gating coefficient calculation method and combining the variable relationship eigenvectors, an adaptive fusion feature performance test matrix sequence is calculated;

[0010] Among them, each column of the adaptive feature fusion performance test matrix sequence represents the adaptive fusion features corresponding to each variable at different times;

[0011] The adaptive fusion feature performance test matrix sequence is input into a pre-built long short-term memory network codec for processing to generate a reconstructed test matrix sequence, and anomaly judgment is performed through a pre-set anomaly detection judgment method to obtain a software performance anomaly test result.

[0012] According to another aspect of the present invention, a software performance anomaly testing device based on a graph attention network is provided, comprising:

[0013] A module for acquiring a matrix sequence of multivariable performance data to be tested, used for acquiring a matrix sequence of multivariable performance data to be tested of the target software;

[0014] Wherein, each variable in the multivariable performance data matrix sequence to be tested corresponds to a performance data matrix sequence within a preset time period;

[0015] a variable relationship eigenvector determination module, configured to normalize the multivariable performance data matrix sequence to be tested, and perform relationship analysis between different variables through a pre-set graph attention network to obtain a variable relationship eigenvector corresponding to each variable;

[0016] An adaptive fusion feature performance test matrix sequence calculation module is used to calculate an adaptive fusion feature performance test matrix sequence by using a preset gating coefficient calculation method and combining the variable relationship eigenvectors;

[0017] Among them, each column of the adaptive feature fusion performance test matrix sequence represents the adaptive fusion features corresponding to each variable at different times;

[0018] The software performance abnormality test result determination module is used to input the adaptive fusion feature performance test matrix sequence into a pre-built long short-term memory network codec for processing, generate a reconstructed test matrix sequence, and perform abnormality judgment through a pre-set abnormality detection and judgment method to obtain the software performance abnormality test result.

[0019] According to another aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the software performance anomaly testing method based on a graph attention network according to any embodiment of the present invention is implemented.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the software performance anomaly testing method based on a graph attention network according to any embodiment of the present invention when executed.

[0021] The technical solution of the embodiment of the present invention is to obtain a matrix sequence of multivariable performance data to be tested of the target software; normalize the matrix sequence of multivariable performance data to be tested, and perform relationship analysis between different variables through a pre-set graph attention network to obtain a variable relationship feature vector corresponding to each variable; calculate an adaptive fusion feature performance test matrix sequence through a pre-set gating coefficient calculation method and in combination with each of the variable relationship feature vectors; input the adaptive fusion feature performance test matrix sequence into a pre-built long short-term memory network codec for processing to generate a reconstructed test matrix sequence, and perform anomaly judgment through a pre-set anomaly detection judgment method to obtain a software performance anomaly test result. This solves the problem of being unable to identify the differences in variable representations under different test scenarios, improves the accuracy of software performance anomaly test results, and improves the compatibility and generalization of software performance testing methods.

[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 This is a flowchart of a software performance anomaly testing method based on a graph attention network according to the first embodiment of the present invention;

[0025] Figure 2 This is a detailed flow chart of a software performance anomaly testing method based on a graph attention network according to the second embodiment of the present invention;

[0026] Figure 3 2 is a schematic diagram of a software performance anomaly testing device based on a graph attention network according to a third embodiment of the present invention;

[0027] Figure 4It is a structural diagram of an electronic device provided according to the fourth embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "target", "current", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Example 1

[0031] Figure 1 A flowchart of a software performance anomaly testing method based on a graph attention network is provided for the first embodiment of the present invention. This embodiment is applicable to situations where software performance anomaly judgment is performed on multivariate performance data. The method can be performed by a software performance anomaly testing device based on a graph attention network, and the software performance anomaly testing device based on a graph attention network can be implemented in the form of hardware and / or software.

[0032] Correspondingly, such as Figure 1 As shown, the method includes:

[0033] S110 , obtaining a matrix sequence of multivariate performance data to be tested of the target software.

[0034] Wherein, each variable in the multivariable performance data matrix sequence to be tested corresponds to a performance data matrix sequence within a preset time period.

[0035] The multivariable performance data matrix sequence to be tested may be composed of performance data matrix sequences corresponding to different variables.

[0036] Specifically, the variables may be request latency, request throughput, CPU load, number of transactions processed per second, or response time.

[0037] For example, it is assumed that the variables may include request latency, request throughput, CPU load rate, number of transactions processed per second, and response time. Each of these five variables corresponds to a performance data matrix sequence. Specifically, for the performance data matrix sequence of variable i within the preset time period T, the performance data matrix sequence is It can be understood that the matrix sequence of the multivariate performance data to be tested is X T Represents the matrix sequence of multivariate performance data to be tested.

[0038] S120 , normalizing the multivariate performance data matrix sequence to be tested, and performing relationship analysis between different variables through a pre-set graph attention network to obtain a variable relationship feature vector corresponding to each variable.

[0039] Optionally, the normalization process of the multivariable performance data matrix sequence to be tested includes: normalizing the performance data matrix sequence to be tested corresponding to each variable Normalization is performed using a pre-set normalization method to obtain a normalized matrix sequence of each performance data to be tested Among them, X T Represents the matrix sequence of multivariate performance data to be tested, where n represents n variables, T represents a preset time period, and the preset time period includes multiple t moments; represents the performance data matrix sequence of variable i within the preset time period T, where The normalization method is in, Indicates that variable i obtains the parameter value in the normalized matrix sequence of the performance data to be tested at time t; Represents the parameter value in the performance data matrix sequence to be tested of variable i at time t; represents the mean value of variable i within the preset time period T; represents the standard deviation of variable i within the preset time period T; represents the normalized matrix sequence of the performance data to be tested of variable i within the preset time period T, where

[0040]

[0041] In this embodiment, it is necessary to perform normalization processing on the performance data matrix sequences of different variables within the preset time period T. Specifically, the normalization processing method To process the sequences separately, we can get the normalized sequences

[0042] The advantage of this setting is that by normalizing the matrix sequence of the multivariable performance data to be tested, it is possible to facilitate feature extraction of the variables and eliminate the influence of the dimensions and units of the variables themselves.

[0043] Optionally, the relationship analysis between different variables is performed through a pre-set graph attention network to obtain the variable relationship feature vector corresponding to each variable, including: normalizing the matrix sequence according to each performance data to be tested Processing formula through graph attention network Perform relationship analysis on different variables to obtain the variable relationship feature vector corresponding to each variable Among them, the graph attention network processing formula uses the m-head attention mechanism to obtain the variable relationship feature vector corresponding to the variable i passing through the l-layer graph attention network; among them, Represents the relationship label between the m-head attention variable i and variable j at layer l, Indicates that variable j obtains the parameter value in the normalized matrix sequence of the performance data to be tested at time t; A ij represents the adjacency matrix between variable i and variable j; || represents vector concatenation; σ represents the graph attention network activation function; W lm Represents the trainable parameter matrix of the m-head attention of layer l; is the variable relationship feature vector corresponding to the variable j of the l-1th layer graph attention network; M represents the total number of heads of the attention mechanism.

[0044] In this embodiment, the relationship between multiple variables can be modeled as an undirected graph G = (V, A, R), where V represents the normalized matrix sequence of the performance data to be tested of variable i within the preset time period T. in, Represents the adjacency matrix between n variables.

[0045] Specifically, if there is a relationship between variables i and j, for example, the system throughput is related to the request latency, then A ij =1, otherwise A ij = 0. R represents the relationship label between different variables. If there is a relationship between variable i and variable j, that is, A ij =1, then let

[0046] Furthermore, a graph attention network is constructed and the performance data to be tested are normalized into a matrix sequence Processing formula through graph attention network Perform relationship analysis on different variables to obtain the variable relationship feature vector corresponding to each variable Since the graph attention network includes multi-layer graph attention networks and multi-head attention mechanisms, it is necessary to perform relationship analysis and processing on different variables in different head attention mechanisms and different layer graph attention networks.

[0047] in, is the variable relationship feature vector corresponding to the variable i of the l-th layer graph attention network, and the variable relationship feature vector corresponding to each of the n variables can be further obtained, which is

[0048] S130 , calculating an adaptive fusion feature performance test matrix sequence by using a preset gating coefficient calculation method and combining the variable relationship feature vectors.

[0049] Among them, each column of the adaptive feature fusion performance test matrix sequence represents the adaptive fusion features corresponding to each variable at different times.

[0050] The gating coefficient calculation method may be a method for calculating gating coefficients corresponding to different variables. The adaptive fusion feature performance test matrix sequence may be a fusion feature obtained by fusing the gating coefficients and the variable relationship feature vector.

[0051] Optionally, the adaptive fusion feature performance test matrix sequence is calculated by using a preset gating coefficient calculation method and combining the variable relationship eigenvectors, including: calculating the gating coefficient corresponding to each variable by using a preset gating coefficient calculation method and combining the variable relationship eigenvectors; wherein the gating coefficient calculation method is Among them, β i Indicates the gating coefficient corresponding to variable i, W i represents the trainable parameter matrix, b i Represents a trainable parameter vector; according to the gating coefficient corresponding to each variable and the characteristic vector of the relationship between the variables, an adaptive fusion feature performance test matrix sequence is calculated.

[0052] Optionally, the adaptive fusion feature performance test matrix sequence is calculated based on the gating coefficients corresponding to each variable and the characteristic vectors of the relationship between the variables, including: according to the gating coefficients corresponding to each variable and the characteristic vectors of the relationship between the variables, a pre-set fusion feature calculation method is used to calculate the adaptive fusion feature performance test matrix sequence. To obtain the adaptive fusion feature performance test matrix sequence corresponding to each variable in, Represents the adaptive fusion feature performance test matrix sequence corresponding to variable i; ⊙ represents vector dot product; the adaptive fusion feature performance test matrix sequences corresponding to each variable are merged to obtain the adaptive fusion feature performance test matrix sequence F T .

[0053] In this embodiment, first obtain the trainable parameter matrix and trainable parameter vector corresponding to different variables, for example, the variable i corresponds to W i and b i , and then through the formula To calculate the gating coefficient corresponding to variable i, we can similarly calculate the gating coefficients corresponding to different variables. The gating coefficient can represent the importance of each variable feature in different test scenarios.

[0054] Furthermore, for variable i, we can further use the formula Calculate the adaptive fusion feature performance test matrix sequence. Specifically,

[0055] You can Assign to f t i , that is Therefore, we can further Simplified to:

[0056] Correspondingly, the adaptive fusion feature performance test matrix sequence corresponding to different variables can be solved, and then the adaptive fusion feature performance test matrix sequence F can be obtained by combining them. T .

[0057] The advantage of this setting is that the gating coefficients corresponding to different variables can be calculated to reflect the importance of different variable characteristics in different test scenarios, which can further improve the accuracy of software performance anomaly test results.

[0058] S140: Input the adaptive fusion feature performance test matrix sequence into a pre-built long short-term memory network codec for processing to generate a reconstructed test matrix sequence, and perform anomaly judgment through a pre-set anomaly detection and judgment method to obtain a software performance anomaly test result.

[0059] In this embodiment, after the graph attention network extracts the variable features and the gating mechanism performs adaptive feature fusion between the variables, a sequence of adaptive fusion feature performance test matrices containing n variables within time T is obtained. As the input of the encoder in the long short-term memory network based encoder-decoder, each column of the matrix sequence Each represents the adaptively fused feature representation of the obtained variable i (e.g., any one of request latency, request throughput, CPU load, number of transactions per second, or response time). Finally, a decoder based on a long short-term memory network is used to generate a reconstructed test sequence in reverse order. This reconstructed test matrix sequence is then compared with the original test sequence to further identify abnormal software performance test results.

[0060] The technical solution of the embodiment of the present invention is to obtain a matrix sequence of multivariable performance data to be tested of the target software; normalize the matrix sequence of multivariable performance data to be tested, and perform relationship analysis on different variables through a pre-set graph attention network to obtain a variable relationship feature vector corresponding to each variable; calculate an adaptive fusion feature performance test matrix sequence by a pre-set gating coefficient calculation method and in combination with each of the variable relationship feature vectors; input the adaptive fusion feature performance test matrix sequence into a pre-built long short-term memory network codec for processing to generate a reconstructed test matrix sequence, and perform anomaly judgment through a pre-set anomaly detection judgment method to obtain a software performance anomaly test result. This solves the problem of being unable to identify the differences in variable representations under different test scenarios. By calculating the gating coefficients corresponding to different variables, the importance of different variable features under different test scenarios can be reflected. This can further improve the accuracy of the software performance anomaly test results and improve the compatibility and generalization of the software performance testing method.

[0061] Example 2

[0062] Figure 2 A detailed flowchart of a software performance anomaly testing method based on a graph attention network is provided for the second embodiment of the present invention. This embodiment is based on the above embodiments and is refined. In this embodiment, the software performance anomaly test results obtained by performing anomaly judgment using the pre-set anomaly detection and judgment method are further refined.

[0063] Correspondingly, such as Figure 2 As shown, the method includes:

[0064] S210: Obtain a matrix sequence of multivariable performance data to be tested of the target software.

[0065] S220 , normalizing the multivariate performance data matrix sequence to be tested, and performing relationship analysis between different variables through a pre-set graph attention network to obtain a variable relationship feature vector corresponding to each variable.

[0066] S230 , calculating an adaptive fusion feature performance test matrix sequence by using a preset gating coefficient calculation method and combining the variable relationship feature vectors.

[0067] S240: Input the adaptive fusion feature performance test matrix sequence into a pre-built long short-term memory network codec for processing to generate a reconstructed test matrix sequence.

[0068] Specifically, for the LSTM codec process, for a given For example, you can set is the hidden layer state of the LSTM encoder at time t∈{1,2,3,…,T}, where c is the number of LSTM units in the hidden layer of the encoder.

[0069] Furthermore, the output of the encoder based on the long short-term memory network unit As initialization input to the LSTM-based decoder, predict the reverse reconstructed test sequence.

[0070] Correspondingly, during the model training phase, the decoder can use f t As input, we get the state Then predict f t-1 The reconstruction result f′ t-1 In the model inference phase, the prediction result f t ′ is input into the decoder to obtain the hidden layer state and the reconstruction result f′ t-1 The model training objective function is

[0071] For example, if T = 3, the encoder of the long short-term memory network uses the input to f1, f2 and f3 at time t∈{1,2,3}, and the encoder hidden layer state corresponding to time t-1 is Further get the hidden layer state at time t Correspondingly, the hidden layer state of the LSTM decoder at the last moment t=3 is The last bit of the sequence is input by the LSTM encoder Initialization, that is

[0072] Correspondingly, the LSTM decoder uses a trainable parameter matrix and bias vector to calculate the reconstructed prediction value. and use and reconstructed predicted value f t ′ to get the next hidden layer state Furthermore, a reconstruction test matrix sequence can be generated.

[0073] S250 , calculating the reconstruction errors corresponding to different moments according to the adaptive fusion feature performance test matrix sequence and the reconstruction test matrix sequence by a preset anomaly detection and judgment method.

[0074] In this embodiment, at time t, it can be known that the adaptive fusion feature performance test matrix value of the adaptive fusion feature performance test matrix sequence is f t , the reconstructed prediction value of the reconstructed test matrix sequence is f t ′, can be calculated according to the formula e=|f t -f t ′|, to calculate the reconstruction error at time t; similarly, the reconstruction error e corresponding to other moments can be calculated.

[0075] S260 , obtaining a normal distribution of test matrix sequence samples by using a preset maximum likelihood estimation algorithm and according to the reconstruction errors corresponding to different moments.

[0076] The normal distribution of the test matrix sequence samples includes a test matrix sequence sample mean and a test matrix sequence sample variance.

[0077] In this embodiment, it can be determined that the normal distribution of the test matrix sequence samples is N(μ, ∑).

[0078] S270: Perform abnormality judgment based on the test matrix sequence sample mean, test matrix sequence sample variance, and reconstruction error to obtain software performance abnormality test results corresponding to different moments.

[0079] Optionally, the abnormality judgment is performed based on the test matrix sequence sample mean, the test matrix sequence sample variance and the reconstruction error to obtain the software performance abnormality test results corresponding to different moments, including: calculating the abnormality score by the abnormality score calculation method based on the test matrix sequence sample mean and the test matrix sequence sample variance to obtain the abnormality score corresponding to different moments; wherein the abnormality score calculation method is a t =(e t -μ) T ∑ -1 (e t -μ), where e t represents the reconstruction error corresponding to time t; μ represents the sample mean of the test matrix sequence; ∑ represents the sample variance of the test matrix sequence; a t Represents the anomaly score corresponding to time t; obtain the pre-set anomaly score threshold, perform anomaly judgment on the anomaly scores corresponding to each time, and obtain the software performance anomaly test results corresponding to different times.

[0080] In this embodiment, according to formula at =(e t -μ) T ∑ -1 (e t -μ), to calculate the anomaly score corresponding to time t, and further compare it with the anomaly score threshold. Assuming that the anomaly score threshold is λ, if a t >λ, then it can be determined that the software performance at time t is normal; if a t ≤λ, then the software performance abnormality corresponding to time t can be determined. Similarly, the normal or abnormal judgment results corresponding to different times can be obtained, and then the software performance abnormality test results corresponding to different times can be obtained.

[0081] The advantage of this setting is that the anomaly scores corresponding to different moments can be calculated by the anomaly score calculation method, thereby being able to more accurately determine the software performance anomaly test results.

[0082] The technical solution of the embodiment of the present invention is as follows: obtaining a multivariable performance data matrix sequence to be tested of the target software; normalizing the multivariable performance data matrix sequence to be tested, and performing relationship analysis between different variables through a pre-set graph attention network to obtain a variable relationship eigenvector corresponding to each variable; calculating an adaptive fusion feature performance test matrix sequence by a pre-set gating coefficient calculation method and combining each of the variable relationship eigenvectors; inputting the adaptive fusion feature performance test matrix sequence into a pre-built long short-term memory network codec for processing to generate a reconstructed test matrix sequence; calculating the reconstruction errors corresponding to different moments according to the adaptive fusion feature performance test matrix sequence and the reconstructed test matrix sequence by a pre-set anomaly detection judgment method; obtaining a normal distribution of test matrix sequence samples according to the pre-set maximum likelihood estimation algorithm and the reconstruction errors corresponding to different moments; performing anomaly judgment according to the test matrix sequence sample mean, the test matrix sequence sample variance and the reconstruction error to obtain software performance anomaly test results corresponding to different moments. Through the calculation of the anomaly score calculation method, the anomaly scores corresponding to different moments can be calculated, and then the software performance anomaly test results can be determined more accurately, which improves the compatibility and generalization of the software performance testing method.

[0083] Example 3

[0084] Figure 3This is a structural diagram of a software performance anomaly testing device based on a graph attention network provided in the third embodiment of the present invention. The software performance anomaly testing device based on a graph attention network provided in this embodiment can be implemented through software and / or hardware, and can be configured in a terminal device or server to implement a software performance anomaly testing method based on a graph attention network in the embodiment of the present invention. Figure 3 As shown, the device includes: a module for acquiring a matrix sequence of multivariable performance data to be tested 310, a module for determining a variable relationship feature vector 320, a module for calculating an adaptive fusion feature performance test matrix sequence 330, and a module for determining a software performance abnormality test result 340.

[0085] The module 310 for acquiring the matrix sequence of multivariable performance data to be tested is used to acquire the matrix sequence of multivariable performance data to be tested of the target software;

[0086] Wherein, each variable in the multivariable performance data matrix sequence to be tested corresponds to a performance data matrix sequence within a preset time period;

[0087] A variable relationship feature vector determination module 320 is configured to normalize the multivariate performance data matrix sequence to be tested, and perform relationship analysis between different variables using a pre-set graph attention network to obtain a variable relationship feature vector corresponding to each variable;

[0088] The adaptive fusion feature performance test matrix sequence calculation module 330 is used to calculate the adaptive fusion feature performance test matrix sequence by combining the variable relationship feature vectors through a preset gating coefficient calculation method;

[0089] Among them, each column of the adaptive feature fusion performance test matrix sequence represents the adaptive fusion features corresponding to each variable at different times;

[0090] The software performance abnormality test result determination module 340 is used to input the adaptive fusion feature performance test matrix sequence into a pre-built long short-term memory network codec for processing, generate a reconstructed test matrix sequence, and perform abnormality judgment through a pre-set abnormality detection judgment method to obtain the software performance abnormality test result.

[0091] The technical solution of the embodiment of the present invention is to obtain a matrix sequence of multivariable performance data to be tested of the target software; normalize the matrix sequence of multivariable performance data to be tested, and perform relationship analysis between different variables through a pre-set graph attention network to obtain a variable relationship feature vector corresponding to each variable; calculate an adaptive fusion feature performance test matrix sequence by a pre-set gating coefficient calculation method and in combination with each of the variable relationship feature vectors; input the adaptive fusion feature performance test matrix sequence into a pre-built long short-term memory network codec for processing to generate a reconstructed test matrix sequence, and perform anomaly judgment through a pre-set anomaly detection judgment method to obtain a software performance anomaly test result. This solves the problem of being unable to identify the differences in variable representations under different test scenarios, improves the accuracy of software performance anomaly test results, and improves the compatibility and generalization of software performance testing methods.

[0092] Based on the above embodiments, the variables include at least one of the following: request latency, request throughput, CPU load rate, number of transactions processed per second, and response time.

[0093] On the basis of the above embodiments, the variable relationship feature vector determination module 320 may specifically include: respectively determining the performance data matrix sequence to be tested corresponding to each variable Normalization is performed using a pre-set normalization method to obtain a normalized matrix sequence of each performance data to be tested in, X T represents a matrix sequence of multivariate performance data to be tested, wherein n represents n variables, T represents a preset time period, and the preset time period includes multiple t moments; represents the performance data matrix sequence of variable i within the preset time period T, where The normalization method is in, Indicates that variable i obtains the parameter value in the normalized matrix sequence of the performance data to be tested at time t; Represents the parameter value in the performance data matrix sequence to be tested of variable i at time t; represents the mean value of variable i within the preset time period T; represents the standard deviation of variable i within the preset time period T; represents the normalized matrix sequence of the performance data to be tested of variable i within the preset time period T, where

[0094] On the basis of the above embodiments, the variable relationship feature vector determination module 320 can be specifically used to: normalize the matrix sequence according to each performance data to be tested Processing formula through graph attention network Perform relationship analysis on different variables to obtain the variable relationship feature vector corresponding to each variable Among them, the graph attention network processing formula uses the m-head attention mechanism to obtain the variable relationship feature vector corresponding to the variable i passing through the l-layer graph attention network; among them, Represents the relationship label between the m-head attention variable i and variable j at layer l, Indicates that variable j obtains the parameter value in the normalized matrix sequence of the performance data to be tested at time t; A ij represents the adjacency matrix between variable i and variable j; || represents vector concatenation; σ represents the graph attention network activation function; W lm Represents the trainable parameter matrix of the m-head attention of layer l; is the variable relationship feature vector corresponding to the variable j of the l-1th layer graph attention network; M represents the total number of heads of the attention mechanism.

[0095] On the basis of the above embodiments, the adaptive fusion feature performance test matrix sequence calculation module 330 may specifically include: a gating coefficient calculation unit, which may be specifically used to: calculate the gating coefficient corresponding to each variable by a preset gating coefficient calculation method and in combination with each variable relationship eigenvector; wherein the gating coefficient calculation method is: Among them, β i Indicates the gating coefficient corresponding to variable i, W i represents the trainable parameter matrix, b i Represents a trainable parameter vector; the adaptive fusion feature performance test matrix sequence calculation unit can be specifically used to: calculate the adaptive fusion feature performance test matrix sequence according to the gating coefficient corresponding to each variable and the characteristic vector of the relationship between the variables.

[0096] On the basis of the above embodiments, the adaptive fusion feature performance test matrix sequence calculation unit can be specifically used to: according to the gating coefficient corresponding to each variable and the characteristic vector of each variable relationship, the fusion feature calculation method preset is used to calculate the performance test matrix sequence of the adaptive fusion feature performance test matrix sequence calculation unit. To obtain the adaptive fusion feature performance test matrix sequence corresponding to each variable in, Represents the adaptive fusion feature performance test matrix sequence corresponding to variable i; ⊙ represents vector dot product; the adaptive fusion feature performance test matrix sequences corresponding to each variable are merged to obtain the adaptive fusion feature performance test matrix sequence F T .

[0097] On the basis of the above embodiments, the software performance abnormality test result determination module 340 may specifically include: a reconstruction error calculation unit, which may be specifically used to: calculate the reconstruction errors corresponding to different moments according to the adaptive fusion feature performance test matrix sequence and the reconstructed test matrix sequence through a preset abnormality detection judgment method; a test matrix sequence sample normal distribution determination unit, which may be specifically used to: obtain the test matrix sequence sample normal distribution according to a preset maximum likelihood estimation algorithm and the reconstruction errors corresponding to different moments; wherein the test matrix sequence sample normal distribution includes the test matrix sequence sample mean and the test matrix sequence sample variance; the software performance abnormality test result determination unit may be specifically used to: perform abnormality judgment according to the test matrix sequence sample mean, the test matrix sequence sample variance and the reconstruction error, and obtain the software performance abnormality test results corresponding to different moments.

[0098] On the basis of the above embodiments, the software performance abnormality test result determination unit can be specifically used to: calculate the abnormality score according to the test matrix sequence sample mean and the test matrix sequence sample variance by the abnormality score calculation method to obtain the abnormality score corresponding to different time points; wherein the abnormality score calculation method is a t =(e t -μ) T ∑ -1 (e t -μ), where e t represents the reconstruction error corresponding to time t; μ represents the sample mean of the test matrix sequence; ∑ represents the sample variance of the test matrix sequence; a t Represents the anomaly score corresponding to time t; obtain the pre-set anomaly score threshold, perform anomaly judgment on the anomaly scores corresponding to each time, and obtain the software performance anomaly test results corresponding to different times.

[0099] The software performance anomaly testing device based on a graph attention network provided by an embodiment of the present invention can execute the software performance anomaly testing method based on a graph attention network provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0100] Example 4

[0101] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement the fourth embodiment of the present invention 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 can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0102] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0103] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0104] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the software performance anomaly testing method based on a graph attention network.

[0105] In some embodiments, the software performance anomaly testing method based on a graph attention network can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the software performance anomaly testing method based on a graph attention network described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the software performance anomaly testing method based on a graph attention network by any other appropriate means (for example, by means of firmware).

[0106] The method includes: obtaining a multivariable performance data matrix sequence to be tested of the target software; wherein each variable in the multivariable performance data matrix sequence to be tested corresponds to a performance data matrix sequence within a preset time period; normalizing the multivariable performance data matrix sequence to be tested, and performing relationship analysis processing between different variables through a preset graph attention network to obtain a variable relationship feature vector corresponding to each variable; calculating an adaptive fusion feature performance test matrix sequence through a preset gating coefficient calculation method and combining the variable relationship feature vectors; wherein each column of the adaptive feature fusion performance test matrix sequence represents the adaptive fusion feature corresponding to each variable at different times; inputting the adaptive fusion feature performance test matrix sequence into a pre-constructed long short-term memory network codec for processing to generate a reconstructed test matrix sequence, and performing anomaly judgment through a preset anomaly detection judgment method to obtain a software performance anomaly test result.

[0107] Various embodiments of the systems and techniques described 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), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0108] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0109] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0110] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the 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 acoustic input, voice input, or tactile input).

[0111] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end 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 techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0112] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0113] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0114] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

[0115] Example 5

[0116] Embodiment 5 of the present invention also provides a computer-readable storage medium, wherein the computer-readable instructions are used to execute a software performance anomaly testing method based on a graph attention network when executed by a computer processor, the method comprising: obtaining a multivariable performance data matrix sequence to be tested of the target software; wherein each variable in the multivariable performance data matrix sequence to be tested corresponds to a performance data matrix sequence within a preset time period; normalizing the multivariable performance data matrix sequence to be tested, and performing relationship analysis processing on different variables through a preset graph attention network to obtain a variable relationship feature vector corresponding to each variable; calculating an adaptive fusion feature performance test matrix sequence through a preset gating coefficient calculation method and combining each of the variable relationship feature vectors; wherein each column of the adaptive feature fusion performance test matrix sequence represents the adaptive fusion feature corresponding to each variable at different times; inputting the adaptive fusion feature performance test matrix sequence into a pre-constructed long short-term memory network codec for processing to generate a reconstructed test matrix sequence, and performing anomaly judgment through a preset anomaly detection judgment method to obtain a software performance anomaly test result.

[0117] Of course, an embodiment of the present invention provides a computer-readable storage medium whose computer-executable instructions are not limited to the method operations described above, and can also execute related operations in the software performance anomaly test based on the graph attention network provided by any embodiment of the present invention.

[0118] Through the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented with the help of software and necessary general-purpose hardware, and of course it 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 the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0119] It is worth noting that in the above-mentioned embodiment of software performance anomaly testing based on graph attention network, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0120] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A software performance anomaly testing method based on graph attention network, characterized in that: include: Obtaining a matrix sequence of multivariate performance data to be tested of the target software; Wherein, each variable in the multivariable performance data matrix sequence to be tested corresponds to a performance data matrix sequence within a preset time period; Normalizing the multivariate performance data matrix sequence to be tested, and performing relationship analysis between different variables through a pre-set graph attention network to obtain a variable relationship feature vector corresponding to each variable; By using a preset gating coefficient calculation method and combining the variable relationship eigenvectors, an adaptive fusion feature performance test matrix sequence is calculated; Among them, each column of the adaptive feature fusion performance test matrix sequence represents the adaptive fusion features corresponding to each variable at different times; The adaptive fusion feature performance test matrix sequence is input into a pre-built long short-term memory network codec for processing to generate a reconstructed test matrix sequence, and anomaly judgment is performed through a pre-set anomaly detection judgment method to obtain a software performance anomaly test result.

2. The method according to claim 1, characterized in that The variables include at least one of the following: request latency, request throughput, CPU load rate, number of transactions per second, and response time; The normalizing process of the multivariate performance data matrix sequence to be tested includes: For each variable, the corresponding performance data matrix sequence to be tested Normalization is performed using a pre-set normalization method to obtain a normalized matrix sequence of each performance data to be tested in, X T represents a matrix sequence of multivariate performance data to be tested, wherein n represents n variables, T represents a preset time period, and the preset time period includes multiple t moments; represents the performance data matrix sequence of variable i within the preset time period T, where The normalization method is in, Indicates that variable i obtains the parameter value in the normalized matrix sequence of the performance data to be tested at time t; Represents the parameter value in the performance data matrix sequence to be tested of variable i at time t; represents the mean value of variable i within the preset time period T; represents the standard deviation of variable i within the preset time period T; represents the normalized matrix sequence of the performance data to be tested of variable i within the preset time period T, where 3. The method according to claim 2, characterized in that The relationship analysis process of different variables is performed through the preset graph attention network to obtain the variable relationship feature vector corresponding to each variable, including: Normalize the matrix sequence according to the performance data to be tested Processing formula through graph attention network Perform relationship analysis on different variables to obtain the variable relationship feature vector corresponding to each variable Among them, the graph attention network processing formula uses the m-head attention mechanism to obtain the variable relationship feature vector corresponding to the variable i passing through the l-layer graph attention network; in, Represents the relationship label between the m-head attention variable i and variable j at layer l, Indicates that variable j obtains the parameter value in the normalized matrix sequence of the performance data to be tested at time t; A ij represents the adjacency matrix between variable i and variable j; || represents vector concatenation; σ represents the graph attention network activation function; W lm Represents the trainable parameter matrix of the m-head attention of layer l; is the variable relationship feature vector corresponding to the variable j of the l-1th layer graph attention network; M represents the total number of heads of the attention mechanism.

4. The method according to claim 3, characterized in that The adaptive fusion feature performance test matrix sequence is calculated by using a preset gating coefficient calculation method and combining the variable relationship feature vectors, including: Calculate the gating coefficient corresponding to each variable by using a preset gating coefficient calculation method and combining the variable relationship eigenvectors; The gate coefficient calculation method is: Among them, β i Indicates the gating coefficient corresponding to variable i, W i represents the trainable parameter matrix, b i represents a trainable parameter vector; According to the gating coefficient corresponding to each variable and the characteristic vector of the relationship between the variables, an adaptive fusion feature performance test matrix sequence is calculated.

5. The method according to claim 4, characterized in that The adaptive fusion feature performance test matrix sequence is calculated based on the gating coefficient corresponding to each variable and the variable relationship eigenvector, including: According to the gating coefficient corresponding to each variable and the characteristic vector of the relationship between the variables, the pre-set fusion feature calculation method is used to calculate the To obtain the adaptive fusion feature performance test matrix sequence corresponding to each variable in, represents the adaptive fusion feature performance test matrix sequence corresponding to variable i; ⊙ represents vector dot product; The adaptive fusion feature performance test matrix sequence corresponding to each variable is merged to obtain the adaptive fusion feature performance test matrix sequence F T .

6. The method according to claim 5, characterized in that The abnormality detection and judgment method preset by the software is used to judge the abnormality and obtain the abnormality test result of the software performance, including: According to the adaptive fusion feature performance test matrix sequence and the reconstruction test matrix sequence, the reconstruction errors corresponding to different moments are calculated by a preset anomaly detection judgment method; Through the preset maximum likelihood estimation algorithm and according to the reconstruction errors corresponding to different moments, the normal distribution of the test matrix sequence samples is obtained; Wherein, the normal distribution of the test matrix sequence samples includes the test matrix sequence sample mean and the test matrix sequence sample variance; Anomaly judgment is performed based on the sample mean, sample variance and reconstruction error of the test matrix sequence, and the software performance anomaly test results corresponding to different moments are obtained.

7. The method according to claim 6, characterized in that The abnormality judgment is performed based on the test matrix sequence sample mean, the test matrix sequence sample variance and the reconstruction error to obtain the software performance abnormality test results corresponding to different moments, including: According to the sample mean and sample variance of the test matrix sequence, the anomaly score is calculated using the anomaly score calculation method to obtain the anomaly scores corresponding to different moments; Among them, the calculation method of abnormal score is a t =(e t -μ) T ∑ -1 (e t -μ), where e t represents the reconstruction error corresponding to time t; μ represents the sample mean of the test matrix sequence; ∑ represents the sample variance of the test matrix sequence; a t represents the abnormal score corresponding to time t; Obtain a preset anomaly score threshold, perform anomaly judgment on the anomaly score corresponding to each moment, and obtain the software performance anomaly test results corresponding to different moments.

8. A software performance anomaly testing device based on graph attention network, characterized in that: include: A module for acquiring a matrix sequence of multivariable performance data to be tested, used for acquiring a matrix sequence of multivariable performance data to be tested of the target software; Wherein, each variable in the multivariable performance data matrix sequence to be tested corresponds to a performance data matrix sequence within a preset time period; a variable relationship eigenvector determination module, configured to normalize the multivariable performance data matrix sequence to be tested, and perform relationship analysis between different variables through a pre-set graph attention network to obtain a variable relationship eigenvector corresponding to each variable; An adaptive fusion feature performance test matrix sequence calculation module is used to calculate an adaptive fusion feature performance test matrix sequence by using a preset gating coefficient calculation method and combining the variable relationship eigenvectors; Among them, each column of the adaptive feature fusion performance test matrix sequence represents the adaptive fusion features corresponding to each variable at different times; The software performance abnormality test result determination module is used to input the adaptive fusion feature performance test matrix sequence into a pre-built long short-term memory network codec for processing, generate a reconstructed test matrix sequence, and perform abnormality judgment through a pre-set abnormality detection and judgment method to obtain the software performance abnormality test result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it implements a software performance anomaly testing method based on a graph attention network according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a software performance anomaly testing method based on a graph attention network according to any one of claims 1 to 7 when executed.