A software system aging prediction method and system
By constructing a software system network model and combining the generator, discriminator and long-short-term memory network, the aging characteristics within and between nodes are extracted, which solves the problem of insufficient single failure mode prediction in the existing technology and improves the aging prediction of distributed software systems. accuracy.
Patent Information
- Application Number
- CN202210262973.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-17
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-03-17
AI Technical Summary
The existing technology mainly only considers a single failure mode when predicting the aging of distributed software systems, and fails to effectively comprehensively consider the coupling effect of the two modes of internal resource consumption and external aging propagation, resulting in insufficient prediction accuracy.
Construct a software system network model, extract the internal aging characteristics of the node itself and the aging propagation characteristics between nodes, combine the generator, discriminator and long short-term memory network for prediction, and output the aging prediction value.
By comprehensively considering the coupling effects of the two modes of internal resource consumption and external aging propagation, the accuracy of aging prediction is improved, and the aging effects caused by the internal aging phenomenon of the software system and the interaction between nodes can be more accurately described.
Smart Images

Figure CN114691459B
Abstract
Description
Technical Field
[0001] The present application relates to the field of software technology, and more specifically, to a method and system for predicting software system aging. Background Art
[0002] At present, the impact of aging failures on large-scale distributed software systems is reflected in the following three aspects: First, with the increase in the number of software in distributed software systems, the number of potential defects also increases synchronously, resulting in the acceleration of the accumulation of error states during software operation and a significant reduction in the time required for system performance degradation; second, the function that calls the aging defect code may exist in any node in the distributed software system, so that the aging of a single node can be widely spread along the software interaction path; third, the aging of the software system can be formed by the coupling of two modes: internal resource consumption and external propagation, resulting in a significant increase in the probability of aging. With the increasing complexity of the current distributed software system architecture and functional modules, multi-mode coupled aging failures will be an important factor affecting its system performance indicators and service capabilities.
[0003] There are two main approaches to the study of software system aging: one is to manually model and analyze the aging process by assuming the system's operating state and failure distribution; the other is to learn aging characteristics and predict aging trends through machine learning models. However, most current studies only consider the prediction of a single failure mode. Summary of the invention
[0004] In response to at least one defect or improvement need in the prior art, the present invention provides a software system aging prediction method and system, which comprehensively considers the coupling effect of two failure modes, internal resource consumption and external aging propagation, during the aging prediction process, thereby improving the accuracy of aging prediction.
[0005] To achieve the above object, according to one aspect of the present invention, a method for predicting software system aging is provided, comprising:
[0006] Construct a network model of the software system, regard the processing units in the software system as nodes of the network model, obtain the resource consumption information of the processing units and use the resource consumption information as node attributes, and construct edges and edge attributes based on the relationship between processing units;
[0007] Node attributes are used to extract the internal aging characteristics of the node itself, and the aging propagation characteristics between nodes are extracted based on the node edges and edge attributes;
[0008] The node's internal aging features and the inter-node aging propagation features are combined and input into the trained prediction model to output the aging prediction value.
[0009] Furthermore, the resource consumption information of the processing unit includes consumption information of CPU, memory, disk and network resources inside the node.
[0010] Furthermore, constructing node edges and edge attributes according to the relationship between processing units includes: collecting call relationships and call frequencies between processing units, determining edges according to the call relationships, and using the call frequencies as edge attributes.
[0011] Furthermore, the inter-node aging propagation characteristic APC(N i ) is calculated as follows:
[0012]
[0013] APC(N i ) is node N i The inter-node aging propagation characteristics, APC(N j ) is node N j The inter-node aging propagation characteristics, For node N i The internal aging characteristics of the node itself, N j Yes and N i The jth node that has a relationship with N is i The total number of nodes with relationships, C D (N i ) is node N i The degree centrality of i,j N j With N i The edge attributes between .
[0014] Furthermore, the calculation formula of degree centrality is:
[0015]
[0016] g is the total number of nodes in the network model.
[0017] Furthermore, before the node's internal aging features and the inter-node aging propagation features are combined and input into the trained prediction model, feature normalization is performed first. For each feature, the normalization calculation formula is:
[0018]
[0019] x is the feature to be normalized, min is the minimum value of x, max is the maximum value of x, and x* is the normalized value of x.
[0020] Furthermore, the step of combining the node's internal aging features and the inter-node aging propagation features and inputting them into the trained prediction model includes:
[0021] A total of n feature values of the node's internal aging characteristics and inter-node aging propagation characteristics at m test intervals are obtained respectively to form a time series of n-dimensional data that is input into the trained prediction model.
[0022] Further, the prediction model includes a generator, a discriminator, and a long short-term memory network;
[0023] The generator is used to extract the distribution feature information matrix of the time series of n-dimensional data and transmit it to the long short-term memory network and the discriminator respectively;
[0024] The long short-term memory network is used to output an aging prediction result matrix according to the distribution feature information matrix;
[0025] The discriminator is used to calculate the probability distribution difference between the distribution feature information matrix and the aging prediction result matrix, and use the probability distribution difference as the objective function of the discriminator.
[0026] According to a second aspect of the present invention, there is provided a software system aging prediction system, comprising:
[0027] A modeling module is used to build a network model of the software system, regard the processing units in the software system as nodes of the network model, obtain resource consumption information of the processing units and use the resource consumption information as node attributes, and build edges and edge attributes according to the relationship between the processing units;
[0028] The feature extraction module is used to extract the internal aging features of the node itself by using the node attributes, and to extract the aging propagation features between nodes according to the node edges and edge attributes;
[0029] The prediction output module is used to combine the node's internal aging features and the inter-node aging propagation features into the trained prediction model and output the aging prediction value.
[0030] In general, the above technical scheme conceived by the present invention can achieve the following beneficial effects compared with the prior art: When extracting features, the present invention mainly considers two aspects: one is the aging of a single node caused by the activation of internal defects in the node; the other is the catalytic effect of the complex interaction relationship between nodes in the distributed software system on the propagation of aging. Therefore, the extracted features include two types: the internal aging features of the node itself and the aging propagation features between nodes. The internal aging features of the node itself are mainly extracted based on the system resource consumption information and are mainly used to describe the aging phenomenon inside the software system, while the aging propagation features between nodes are mainly used to describe the aging effects caused by the interaction between nodes. By combining the two types of features for aging prediction, the accuracy of aging prediction is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 Schematic diagram of the principle of the software system aging prediction method according to an embodiment of the present invention;
[0033] Figure 2 is a schematic diagram of a network model of an embodiment of the present invention;
[0034] Figure 3 is a schematic diagram of internal aging characteristics of a node itself according to an embodiment of the present invention;
[0035] Figure 4 Schematic diagram of the prediction model network structure of an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0037] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. 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 limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0038] In addition, in order to avoid obscuring the understanding of the present invention by the skilled person, well-known or widely used techniques, elements, structures and processes may not be described or shown in detail. Although the drawings represent exemplary embodiments of the present invention, the drawings are not necessarily drawn to scale, and certain features may be enlarged or omitted to better illustrate and explain the present invention.
[0039] A method for predicting software system aging according to an embodiment of the present invention is as follows: Figure 1 As shown, the steps include:
[0040] S101, constructing a network model of the software system, treating the processing units in the software system as nodes of the network model, obtaining resource consumption information of the processing units and using the resource consumption information as node attributes, and constructing edges and edge attributes according to the relationship between the processing units;
[0041] S102, extracting the internal aging characteristics of the node itself by using the node attributes, and extracting the aging propagation characteristics between nodes according to the node edges and edge attributes;
[0042] S103, combining the node's internal aging features and the inter-node aging propagation features into the trained prediction model, and outputting an aging prediction value.
[0043] The preferred implementation method of S101 is described in detail below.
[0044] In software systems, especially distributed software systems, the distribution of connections between nodes is usually extremely uneven. A few nodes in the system have a large number of connections, while most nodes have only a small number of connections, which has a typical scale-free network structure. In addition, there are significant differences in the frequency and direction of interactions between nodes in the system, showing obvious connection complexity. At the same time, the performance indicators of each node in the system undergo complex changes over time, showing strong dynamic characteristics. Therefore, in the embodiment of the present invention, the processing unit is regarded as a node of the network model. The meaning of the processing unit in this patent is the smallest unit that requires aging prediction. The processing unit can be defined according to the prediction needs. Databases, services, and software that implements a certain function can all be regarded as processing units. Node attributes are used to record the resource consumption information of each processing unit, and the attributes of the directed edges record related information such as the call frequency between nodes. Figure 2 shown.
[0045] In the embodiment of the present invention, the network model nodes and the relationships between the nodes are defined as:
[0046] node=(C CPU , C Memory , C Disk , C Network ) (3)
[0047] e=(node1,node2,f) (4)
[0048] Among them, C CPU , C Memory , C Disk , C Network , is a collection of information about the consumption of CPU, memory, disk, and network resources within a node, that is, a node attribute; in the relationship e, node1 and node2 indicate two nodes that interact and have a relationship, specifically indicating a call relationship between the two nodes; f is an edge attribute, specifically the frequency of the call.
[0049] The preferred implementation method of S102 is described in detail below.
[0050] (1) Feature selection
[0051] When selecting candidate features, the embodiment of the present invention mainly considers two aspects: one is the aging of a single node caused by the activation of internal defects in the node; the other is the catalytic effect of the complex interaction between nodes in the distributed software system on the propagation of aging. Therefore, the features to be selected include two types, among which the "internal aging features of the node itself", that is, the "system resource consumption features", are mainly used to describe the aging phenomenon inside the software system, while the "aging propagation features" are mainly used to describe the aging effects caused by the interaction between nodes.
[0052] ① System resource consumption characteristics (internal aging characteristics of the node itself)
[0053] A method for extracting system resource consumption characteristics based on resource consumption information is predefined. After the resource consumption information of the node is acquired, the system resource consumption characteristics of each node can be calculated according to the predefined method.
[0054] Furthermore, in order to more comprehensively cover various index parameters of aging prediction, the embodiment of the present invention intends to analyze the possible impact of aging on the CPU, memory, hard disk and network from three dimensions: system performance degradation, service quality degradation and running speed reduction, and select candidate features for aging prediction, such as Figure 3 Specifically, the system resource consumption characteristics may include CPU available load, CPU available threads, RAM occupancy rate, etc., and the specific extraction method may be the reciprocal of CPU available load, the reciprocal of CPU available threads, RAM occupancy rate, etc., which are normalized and then added together. However, the system resource consumption characteristics and the extraction method thereof may be adjusted as needed and are not limited to the above technical solution.
[0055] ② Characteristics of aging propagation between nodes
[0056] From the perspective of complex network topology, the more other nodes a single software node calls, the higher the probability that the node activates the aging state of other nodes, that is, the stronger the ability to propagate aging; similarly, if a single software node is called more by other nodes, the error state accumulated by the node is more likely to be activated and age. Therefore, the propagation of aging is closely related to the number and frequency of connections between software nodes and the probability of node failure itself.
[0057] The aging propagation feature of the embodiment of the present invention needs to use the degree centrality C D (Degree Centrality) concept. For a network model with g nodes, i The total number of nodes with relationships is expressed as N, as shown in formula (5).
[0058]
[0059] The division by g-1 in the denominator eliminates the impact of changes in network size on degree centrality.
[0060] The node N i The aging propagation characteristics between nodes are denoted as APC(N i ), software node N i The aging propagation characteristics of D The impact of C D The larger the value, the more other nodes that have call relationships with the node. i The aging of the node itself will affect more other nodes through cascading propagation. Similarly, the aging of other nodes connected to it is more likely to cause the aging of node N. i Aging; therefore, through the recursive method, node N i The aging propagation characteristic APC can be defined by formula (6).
[0061]
[0062] in, For node N i The internal aging characteristics of the node itself, N j Yes and N i The jth node with a relationship, then For N i The set of nodes that have a relationship. The ability of a node’s own aging to affect other nodes under cascading propagation is calculated. Calculated with N i The aging of all nodes with interactive relationships is i The influence of i,j It further demonstrates the stimulating and promoting effect of the frequency of interactions between nodes on aging. The two together characterize the propagation of aging caused by the mutual calling relationship between nodes.
[0063] (2) Feature Normalization
[0064] Before the node's internal aging features and the inter-node aging propagation features are combined and input into the trained prediction model, feature normalization is performed. Data normalization is to scale the data so that it falls into a smaller specific interval, thereby eliminating the unit limitation of the data and facilitating weighted analysis of features of different magnitudes.
[0065] Furthermore, for each feature, the normalization calculation formula is:
[0066]
[0067] x is the feature to be normalized, min is the minimum value of x, max is the maximum value of x, and x* is the normalized value of x.
[0068] The preferred implementation method of S103 is described in detail below.
[0069] In the process of predicting the aging of distributed software systems with multiple fault modes coupled, the correlation between multiple eigenvalue indicators and the differences in the physical hardware of different nodes usually have a certain impact on the prediction results. To this end, the prediction model of the embodiment of the present invention adopts a combination of LSTM network (long short-term memory network) and GAN network, and the prediction model includes a generator, a discriminator and an LSTM network. On the basis of fully considering the time series changes of multiple eigenvalues, LSTM is used to train and predict the time series data, and the game between the generator and the discriminator in the generative adversarial network (GAN) is used to enhance the robustness of the model. Through the organic combination of LSTM and GAN, the model automatically learns the weights of multiple features in the time series data, thereby improving the accuracy of the aging prediction of the distributed software system. The network topology of the prediction model to be adopted in the embodiment of the present invention is as follows: Figure 4 shown.
[0070] (2) Prediction model network training process
[0071] The prediction model constructed in the embodiment of the present invention is intended to take the following training steps:
[0072] ① Collect data on n indicators related to resource consumption and aging propagation characteristics of distributed software systems at m test intervals of different nodes to form a normalized n-dimensional time series of indicator data.
[0073] ② The generator G extracts the distribution feature information matrix of the n-dimensional indicator data and transmits it to the LSTM neural network layer and the discriminator respectively.
[0074] ③ Divide the data distribution feature matrix according to the feature dimensions, and pass them into the LSTM neural network layer to predict the aging indicators of k dimensions, and output the aging prediction result matrix.
[0075] ④The discriminator is used to receive the distribution feature information matrix output by the generator and the aging prediction result matrix output by the LSTM network, calculate the probability distribution difference between the distribution feature information matrix and the aging prediction result matrix, and use the probability distribution difference as the objective function of the discriminator.
[0076] Furthermore, JS divergence (Jensen-Shannon) was used to evaluate the probability distribution difference between the distribution feature information matrix and the aging prediction result matrix.
[0077] ⑤According to the gradient value of the objective function, the model parameters are updated through the back propagation algorithm. At the same time, the updated prediction results of LSTM will be passed into the discriminator again, and the distribution difference between it and the real data will be calculated.
[0078] ⑥ Under the action of the discriminator, the prediction model can continuously optimize the prediction results of the model aging index until the model prediction results reach the set termination conditions (such as training rounds or early stopping times, etc.), then stop model training.
[0079] It should be noted that although the operations of the methods of the embodiments of this specification are described in a specific order in the above-mentioned embodiments, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flowchart can change the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.
[0080] A software system aging prediction system according to an embodiment of the present invention includes:
[0081] A modeling module is used to build a network model of the software system, regard the processing units in the software system as nodes of the network model, obtain resource consumption information of the processing units and use the resource consumption information as node attributes, and build edges and edge attributes according to the relationship between the processing units;
[0082] The feature extraction module is used to extract the internal aging features of the node itself by using the node attributes, and to extract the aging propagation features between nodes according to the node edges and edge attributes;
[0083] The prediction output module is used to combine the node's internal aging characteristics and the aging propagation characteristics between nodes into the trained prediction model and output the aging prediction value.
[0084] For the specific definition of the software system aging prediction system, please refer to the definition of the software system aging prediction method above, which will not be repeated here. Each module in the above-mentioned software system aging prediction system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0085] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0086] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for predicting software system aging, characterized in that: include: Construct a network model of the software system, regard the processing units in the software system as nodes of the network model, obtain the resource consumption information of the processing units and use the resource consumption information as node attributes, and construct edges and edge attributes based on the relationship between processing units; The constructing node edges and edge attributes according to the relationship between the processing units includes: collecting the call relationship and call frequency between the processing units, determining the edge according to the call relationship, and using the call frequency as the edge attribute; Node attributes are used to extract the internal aging characteristics of the node itself, and the aging propagation characteristics between nodes are extracted based on the node edges and edge attributes; The node's internal aging characteristics and the inter-node aging propagation characteristics are combined and input into the prediction model, and the prediction model outputs the aging prediction value; Among them, the inter-node aging propagation characteristic APC (N i ) is calculated as follows: APC(N i ) is node N i The inter-node aging propagation characteristics, APC(N j ) is node N j The inter-node aging propagation characteristics, For node N i The internal aging characteristics of the node itself, N j Yes and N i The jth node with relationship N is related to N i The total number of nodes with relationships, C D (N i ) is node N i The degree centrality of i,j N j With N i The edge attributes between .
2. A method for predicting software system aging according to claim 1, characterized in that: The resource consumption information of the processing unit includes the consumption information of the CPU, memory, disk and network resources inside the node.
3. A method for predicting software system aging according to claim 1, characterized in that: The calculation formula of degree centrality is: g is the total number of nodes in the network model.
4. A method for predicting software system aging according to claim 1, characterized in that: Before inputting the node's internal aging features and the inter-node aging propagation features into the trained prediction model, feature normalization is performed first. For each feature, the normalization calculation formula is: x is the feature to be normalized, min is the minimum value of x, max is the maximum value of x, and x * is the normalized value of x.
5. A method for predicting software system aging as claimed in claim 1, characterized in that: The step of inputting the node's internal aging features and the inter-node aging propagation features into the trained prediction model comprises: A total of n feature values of the node's internal aging characteristics and inter-node aging propagation characteristics at m test intervals are obtained respectively to form a time series of n-dimensional data that is input into the trained prediction model.
6. A method for predicting software system aging as claimed in claim 5, characterized in that: The prediction model includes a generator, a discriminator, and a long short-term memory network; The generator is used to extract the distribution feature information matrix of the time series of n-dimensional data and transmit it to the long short-term memory network and the discriminator respectively; The long short-term memory network is used to output an aging prediction result matrix according to the distribution feature information matrix; The discriminator is used to calculate the probability distribution difference between the distribution feature information matrix and the aging prediction result matrix, and use the probability distribution difference as the objective function of the discriminator.
7. A software system aging prediction system, characterized in that: include: A modeling module is used to build a network model of the software system, regard the processing units in the software system as nodes of the network model, obtain resource consumption information of the processing units and use the resource consumption information as node attributes, and build edges and edge attributes according to the relationship between the processing units; The constructing node edges and edge attributes according to the relationship between the processing units includes: collecting the call relationship and call frequency between the processing units, determining the edge according to the call relationship, and using the call frequency as the edge attribute; The feature extraction module is used to extract the internal aging features of the node itself by using the node attributes, and to extract the aging propagation features between nodes according to the node edges and edge attributes; The prediction output module is used to input the node's internal aging characteristics and the inter-node aging propagation characteristics into the trained prediction model and output the aging prediction value; among them, the inter-node aging propagation characteristics APC (N i ) is calculated as follows: APC(N i ) is node N i The inter-node aging propagation characteristics, APC(N j ) is node N j The inter-node aging propagation characteristics, For node N i The internal aging characteristics of the node itself, N j is the jth node with a relationship to Ni, and N is the node with N i The total number of nodes with relationships, C D (N i ) is node N i The degree centrality of i,j N j With N i The edge attributes between .
