Method for establishing software fault propagation model
By establishing a software fault propagation model and using complex network theory to describe the network topology of the software system, the system failure problem caused by software fault propagation in complex software systems is solved, and in-depth research and analysis of the software fault propagation laws is achieved, the probability of fault propagation is reduced, and the stability and security of the software system are improved.
Patent Information
- Application Number
- CN202411472912.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-03-18
AI Technical Summary
Software failures in complex software systems are propagated, resulting in the impact of the initial failure being amplified, causing partial or complete failure of the system. How to take effective measures immediately to reduce losses when a failure occurs has become an urgent problem.
By using complex network theory to establish a software network topology model and combining the actual influencing factors of software failure propagation, a software failure propagation model is defined and established. This model abstracts the functions in the software system into network nodes, and calls relationships as edges. It uses directed edges and edge weights to represent the call relationships and closeness between functions, thereby characterizing the propagation rules of software failures.
This method can not only help understand the interaction laws between the internal structure and components of large and complex software systems, but also measure the uncertainty of complex software systems failures, analyze the laws of software failure propagation, reduce the probability of software failure propagation, and improve the stability and security of the software system.
Smart Images

Figure CN119645827A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software safety, and in particular to a method for establishing a software fault propagation model. Background Art
[0002] In recent years, the pace of information technology construction has accelerated, and software systems have been widely used in various fields of society. Their complexity and scale have increased dramatically, and large-scale complex software systems have continued to emerge. Once a complex software system fails, it will cause huge losses. How the failure of a non-critical component causes the failure of other (critical) components and even the system to fail, and how software faults in complex software systems propagate and cause system failures have become current research hotspots.
[0003] Complex software systems have the characteristics of large scale, spatial distribution, complexity and uncertainty. According to scholars' research, complex software systems are composed of a large number of components (real or virtual) that interact with each other. They will show emergent behavior characteristics: the behavior of the entire system cannot be predicted by understanding a single component. At the same time, these systems have strong adaptability and can withstand the impact of interference within an appropriate range. However, under various complex conditions, when the system suffers from large-scale failures, the system becomes very fragile. In fact, in complex software systems, small interference can also trigger cascading failures and produce large-scale consequences. In complex software systems, software failures can spread. One or more software components have software failures and then generate incorrect data or states. Software failures are spread to other components through calls and dependencies, which in turn cause other components to continue to execute in abnormal states. In this way, failures are propagated in the software until the system cannot be executed or the execution is completed and an incorrect result is generated, which eventually leads to partial or complete failure of the system. This phenomenon is called "cascading phenomenon".
[0004] As a pure logic product, the quality control of complex software systems is difficult to reach the hardware level. In addition, the scale of software is getting larger and larger, and the functions it implements are increasing. Software failures are propagative. Therefore, the impact of initial software failures will be amplified through the existence of coupling relationships between system nodes and even between systems. Therefore, some sudden minor failures may be fatal to complex software systems. It can be seen that such disasters have obviously posed a serious threat to human society. When a failure occurs, accurate and effective measures should be taken immediately to reduce the scope of the failure as much as possible, shorten the duration of the failure, and minimize the losses caused by the failure. Ensuring the safe and stable operation of the system is an urgent problem to be solved. This requires the establishment of a software fault propagation model to control or avoid cascading failures caused by attacks on complex software systems. Based on the purpose of reducing or avoiding the occurrence of cascading failures, from the perspective of software security and reliability, it is of great theoretical and practical significance to study its formation mechanism, prevention and control.
[0005] Therefore, how to provide a method that can immediately take effective measures to reduce the losses caused by applause when a fault occurs is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0006] In order to overcome the defects of the prior art and solve the problem of cascading software fault propagation, the present application provides a method for establishing a software fault propagation model, including:
[0007] Step S1: using complex network theory to describe the software network topology structure to establish a software network topology model;
[0008] Step S2: Based on the software network topology model and the actual influencing factors of software fault propagation, define the concept and representation form of establishing the software fault propagation model;
[0009] Step S3: Establishing a software fault propagation model according to the concepts and representations of the software network topology model and the software fault propagation model.
[0010] In some specific embodiments, step S1 includes: using functions as nodes, calling relationships as edges, and using directed edges and edge weights to represent the calling relationships and closeness between functions to establish the software network topology model.
[0011] In some specific embodiments, step S2 includes: establishing a software fault propagation model based on the function state, function fault degree, function fault degree threshold, function fault tolerance rate, function fault intensity and function fault tolerance of the software network topology model at a certain moment, combined with the concept of the software fault propagation model.
[0012] In some specific embodiments, each function within the software system is abstracted as a node in a network topology structure, all nodes constitute a set, any function in the set is represented by a node in the set, each node in the set corresponds to a function in the software source code, and there is a one-to-one relationship between each node in the set and the function.
[0013] In some specific embodiments, the state of the function includes: a normal state and a faulty state. The reasons for the function failure include: the function itself has errors or defects, thereby causing a software failure, and / or the function is in a normal state, and at a certain moment the function calls a faulty function. Since the function fault tolerance of this function is less than the software fault intensity of the fault function it calls, the function is infected and becomes a faulty function.
[0014] In some specific embodiments, the state of the function also includes: a fuzzy state, an intermediate state between a normal state and a fault state, used to describe the degree of damage to the function caused by a fault at a certain moment.
[0015] In some specific embodiments, the function fault degree threshold is used to distinguish between a normal state, a fuzzy state and a fault state of the function.
[0016] Beneficial effects of the above technical solution:
[0017] The method for establishing a software fault propagation model provided by the present invention, compared with the existing technology, can not only better help us understand the internal structure of large and complex software systems, analyze the interaction laws and dynamic processes between its internal components, but also measure the uncertainty of complex software system faults, characterize the propagation of software faults, and thus support us to conduct in-depth research on the fault propagation laws of large and complex software systems. Through in-depth research and understanding of the fault behavior and fault propagation mechanism of complex software systems, analyzing the vulnerability of complex software systems, and giving suggestions for improving the resistance of complex software, the purpose of reducing the probability of software fault propagation in complex software systems is finally achieved. The model provided by this application can also help software developers understand software structure, improve software performance, and open up new directions and paths. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A flowchart of a method for establishing a software fault propagation model provided by an embodiment of the present invention;
[0020] Figure 2 A node fault state diagram of a method for establishing a software fault propagation model provided by an embodiment of the present invention;
[0021] Figure 3 A schematic diagram of the structure of a system for establishing a software fault propagation model provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0023] Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar symbols throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0024] Embodiment 1
[0025] An embodiment of the present invention provides a method for establishing a software fault propagation model, referring to Figure 1 As shown, including:
[0026] Step S1: Use complex network theory to describe the software network topology structure to establish a software network topology model.
[0027] In a specific embodiment of the present invention, step S1 includes: using functions as nodes, calling relationships as edges, and using directed edges and edge weights to represent the calling relationships and closeness between functions to establish the software network topology model.
[0028] Specifically, each function in the software system is abstracted as a node in the network topology structure, denoted as node V, where V represents the set of all nodes (functions), and a function i is represented by node V. i To indicate that node V i ∈V, function j uses node V j To indicate that node V j ∈V, any element in node V corresponds to a function in the complex software source code, and there is a one-to-one relationship between node V and function i.
[0029] Furthermore, directed edges are used to describe the interaction between functions. In complex software systems, there are certain interaction relationships between functions, such as calling relationships, dependency relationships, etc., and the interaction relationship between functions is directional. Function i calls function j, but function j does not necessarily call function i. In this case, it is obviously more accurate and appropriate to use directed edges to describe the interaction relationship between functions. Directed edges are denoted as E, and E represents the set of directed edges (interaction relationships between functions). Each element in the set E is an ordered pair, for example: <V i ,V j >∈E, if and only if there is an action relationship between function i and function j, V i and V j This ordered pair belongs to the directed edge set E, recorded as: <V i ,V j >∈E, that is, function i points to function j, denoted as: V i →V j .
[0030] Furthermore, edge weights are used to represent the closeness between functions. Edge weights are referred to as weights and are denoted as: W. The value range of W is 0 to 1. For example, function i calls function j, so there is a directed edge E between them and <V i ,V j >∈E, the weight between them is recorded as W ij , because function i calls function j, so the weight W ij =1 / w i , where w i represents the out-degree of function i, that is, the total number of other functions called by function i. If function i calls 5 different functions in total, then 5 is the out-degree of function i, that is, w i =5. The larger the out-degree value of function i is, the more other functions this function calls. This means that function i is closely connected with many other functions. Function i occupies an important position among all functions in a complex software system. When function i calls function j among the many functions that act on it, the probability that function i calls function j is 1 / w. i , so the closeness between function i and function j is W ij =1 / w i .
[0031] Furthermore, we define an adjacency matrix to store the interaction relationship between functions. We define a V×V adjacency matrix A, denoted by A=[a ij ], used to store the interaction relationship between nodes. If the node V i (Function i) calls node V j (function j), then a ij =1, otherwise a ij =0.
[0032] Step S2: Based on the software network topology model and the actual influencing factors of software fault propagation, define the concept and representation form of establishing the software fault propagation model.
[0033] In a specific embodiment of the present invention, step S2 includes: establishing a software fault propagation model based on the function state, function fault degree, function fault degree threshold, function fault tolerance rate, function fault intensity and function fault tolerance of the software network topology model at a certain moment, combined with the concept of the software fault propagation model.
[0034] In a specific embodiment of the present invention, each function within the software system is abstracted as a node in a network topology structure, all nodes constitute a set, any function in the set is represented by a node in the set, each node in the set corresponds to a function in the software source code, and there is a one-to-one relationship between each node in the set and the function.
[0035] In a specific embodiment of the present invention, the state of the function includes: a normal state and a fault state, and the reasons for the function failure include: the function itself has errors or defects, thereby causing a software failure, and / or this function is in a normal state, and at a certain moment this function calls a fault function. Since the function fault tolerance capability of this function is less than the software fault intensity of the fault function it calls, this function is infected into a fault function.
[0036] In a specific embodiment of the present invention, the state of the function further includes: a fuzzy state, an intermediate state between a normal state and a fault state, used to describe the degree of damage to the function caused by a fault at a certain moment.
[0037] In a specific embodiment of the present invention, the function fault degree threshold is used to distinguish between a normal state, a fuzzy state and a fault state of the function.
[0038] Furthermore, we define the function state at a certain moment and the function (node) state at a certain moment. The function state is a dynamic variable that changes with time. This study divides the function (node V) in a complex software system into two states: (1) normal state N (normal), which means that the function has no software failure and is still in normal operation. At this time, the function will not infect other functions and will not cause the software system to fail. (2) fault state F (false), which means that the function (node) V has failed and cannot run normally at this moment, nor can it call its neighbor functions. There are two reasons for function failure: first, the function itself has errors or defects that cause software failures. Second, the function is in a normal state. At a certain moment, the function calls a faulty function. Since the function fault tolerance of the function is less than the software fault intensity of the faulty function it calls, the function is infected and becomes a faulty function. We use the state set Q = {0,1} to represent the current state of the function. The normal state is 0 and the faulty state is 1. The state variable of the function at a certain moment is M. i (t) indicates that (M i (t)∈Q), then:
[0039]
[0040] The state of a function at a certain moment is determined by the state of the function itself in the previous second and the states of the neighboring functions it calls.
[0041] Furthermore, the fault degree of a function (node) at a certain moment is defined. In the operation of a complex software system, in addition to the two definite states of normal state and fault state, a function (node) also has a fuzzy state, that is, an intermediate state between a completely normal state and a completely faulty state. Therefore, the normal state and the faulty state cannot completely and accurately describe the state of the function at this moment. Therefore, the concept of the fault degree of a function at a certain moment is introduced to accurately describe the state of the function at this moment, and at the same time, it can also accurately describe the boundary between the normal state and the faulty state of the function. The fault degree of a function (node) at a certain moment, that is, the degree of damage to the function caused by the fault at a certain moment, is denoted as A(t), and the function V i The fault severity at time t is A i (t).
[0042] Furthermore, the function fault degree threshold is defined. In order to accurately distinguish the function's completely normal state, intermediate state, and complete fault state, the function fault degree threshold is introduced, denoted as δ, δ∈(0,1), that is, the value of δ is between 0 and 1. It is defined above that 0 is the function's completely normal state, and 1 is the function's complete fault state. When function i (node V i ) The fault degree value at time t is 0, that is, A i When (t) is 0, we believe that function i is in a completely normal state, referred to as the normal state. i ) The fault degree value at time t is greater than 0 and less than the function fault degree threshold δ, that is, 0≤A i (t)<δ, we believe that although function i has a software failure at this time, function i can still maintain normal operation through its own fault tolerance adjustment. We believe that function i is still in a normal state but not completely normal. Therefore, we call the state of function i at this moment the intermediate state. When function i (node V i ) When the fault degree value at time t is greater than the function fault degree threshold δ, that is, A i (t)≥δ, we believe that at this time, even if function i is adjusted by its own fault tolerance, it still cannot operate normally. Function i cannot operate normally or fails at this moment. We call the state of function i at this moment the fault state. The node fault state is as follows Figure 2 shown.
[0043] Furthermore, the function (node) fault tolerance rate is defined as the probability of instability caused by the function to itself during the operation of the complex software system, that is, the proportion of the function in the maximum fault tolerance level, denoted as β, β = F / 8, F is the function fault tolerance defined above, 8 is the function's maximum fault tolerance level, and the fault tolerance rate of function i is denoted as β i , so β i =F i / 8, F iis the fault tolerance of function i (node). The higher the fault tolerance of function i, that is, β i The larger the value of , the smaller the influence of the neighbor fault function on function i. Conversely, the greater the influence of the neighbor fault function on function i.
[0044] Further, we define the function fault degree threshold δ and the function fault tolerance rate β. Here we define the function fault degree threshold δ to be equal to the function fault tolerance rate β mentioned above, that is, δ=β=F / 8, because when the function fault degree is greater than the function fault degree threshold, the function cannot run normally and is in a faulty state. When the function fault degree is greater than the function fault tolerance rate, it means that the function fault tolerance value has reached the maximum, and the function will be in an unstable state, that is, a faulty state, and cannot run normally. Therefore, the function fault degree threshold and the function fault tolerance rate have the same meaning in a sense, and the two can be equivalent.
[0045] Furthermore, we define software fault intensity, which is the degree of influence of software faults on normal complex software systems, denoted as r. Since the occurrence of software faults is closely related to software errors and software defects, and software errors and software defects are collectively referred to as software vulnerabilities, this paper will define software fault intensity based on the classification strategy and level of software vulnerabilities.
[0046] So far, internationally influential computer security organizations and companies have analyzed and classified software vulnerabilities. Since this study is based on the open source code of a complex software system, it analyzes software failures and software failure propagation through software errors and software defects. Therefore, after comprehensive consideration, the vulnerability classification strategy of Fortify Software is adopted in determining the intensity of software failures.
[0047] According to the research on software vulnerability classification, the software fault intensity r is divided into 8 levels, that is, r∈[1,8]. The greater the software fault intensity, the larger the corresponding r value is, which means that the greater the degree of damage of the software fault is, the greater the possibility that the fault affects other functions, and thus the greater the possibility of causing software system failure.
[0048] Furthermore, we define function fault tolerance, which is also called node fault tolerance. In real life, the complex software systems we use all have certain fault tolerance, and the fault tolerance of complex software systems comes from the fault tolerance of each function within them. The function fault tolerance of each part together constitutes the fault tolerance of the entire system. Here we define function fault tolerance as: the ability of each function (node) to handle faults in a complex software system, denoted as F. In order to match the strength of software faults, we set the function fault tolerance to 8 levels, so F∈[1,8]. The greater the function fault tolerance, the greater the corresponding F value, indicating that the function is less affected by other fault functions, and the probability of this function being infected by other fault functions into faults is smaller.
[0049] Furthermore, the software fault propagation probability is defined. Function i (node V i ) Failure degree A i (t) and the function i (node V i ) and the number of fault functions in the neighbor functions of function i and the fault degree, so the specific rules are as follows:
[0050]
[0051] b i =(b i1 ,b i2 ,b i3 ···b in ···b iV )(1.5)
[0052]
[0053] Among them, b i is the neighbor matrix of function i, which is a matrix with one row and V columns, that is, the value of the i-th row vector in the adjacency matrix A established above. If function i (node V i ) has an action relationship with function j, that is, function i calls function j, regardless of whether function j calls function i, then function i's neighbor matrix b ij The value of b is 1, otherwise, ij The value is 0. i It is the fault degree value matrix of all functions at time t-1. This matrix is a V-row 1-column matrix, which is used to represent the fault degree value of each function at time t-1.
[0054] In each time interval, the probability that function i calls any function in the neighbor function is 1 / w i Without loss of generality, assume that each fault function has probability 1 / w iThe fault is passed to the function i that calls it. However, the probability that function i can be infected and become a fault function is related to the number of functions in the neighboring functions it calls that are in a faulty state. The probability that function i is infected and becomes a fault function increases with the increase in the number of functions in the neighboring functions that are in a faulty state. The fault tolerance rate of normal function i is β i , so the probability of failure of function i is 1-β i , 1 / w i ×(1-β i ) is the probability that a fault function in the neighboring functions of function i propagates the fault to function i and puts function i in a faulty state, so the probability that all fault functions in the neighboring functions of function i propagate the fault to function i and put function i in a faulty state is Among them, sum i (t) represents the total number of functions in the fault state among the neighbor functions of function i at time t, sum i (t) can be obtained through the neighbor matrix b of function i i The state variables M(t) of each neighbor function of function i at time t are calculated.
[0055] At time t, function i (node V i ) calls the fault function j (node V j ), then the probability that function i is infected by fault function j depends on the state of function j at time t.
[0056] When function j is in a normal state at time t, then when function i calls function j at time t, function i will not be infected and the infection rate is zero.
[0057] When function j is in a fault state at time t, that is, M j (t) is 1, function i calls function j at time t, and the probability of function i being infected depends on: the fault level of fault function j at time t, the fault tolerance of function i, the fault level of function it at time it, and the closeness between function i and function j.
[0058] The probability of function i being infected by fault function j at time t is related to the fault degree of function it. When the fault degree value of function i at time t is greater than 1, that is, the fault degree value of function i at time t is greater than the function fault degree threshold, so function i is in a faulty state at time t and cannot run normally, nor can it call fault function j. Then, at time t, function i calls fault function j and the fault degree value of function i is greater than 1. This situation obviously no longer exists. In summary, the probability of function i being infected by fault function j at time t is proportional to the fault degree value of function it. When the fault degree of function i at time t is A iThe larger (t) is, the smaller the distance to the function fault level threshold is. Therefore, function i is in the susceptible period at this time, and the greater the probability that function i is infected by fault function j. Conversely, the smaller the probability that function i is infected by fault function j at time t is.
[0059] At time t, when function i calls fault function j, whether function i can be infected and cause software failure, thus seriously affecting other subsequent functions that call and depend on function i, when the fault tolerance is F i The function i call has failed with fault severity r j When the function j is , the probability of function i being infected is defined as follows:
[0060] When j ≥F i Whether function i can be infected by fault function j depends on the closeness between the two functions and the fault degree of function i at this time.
[0061] When j <F i When , whether function i can be infected by fault function j depends on the closeness between the two functions, the fault degree of function i at this time, and the ratio of the fault intensity of function j to the fault tolerance of function i.
[0062] At time t, function i calls function j, and the probability that function i is infected by function j is recorded as K i (t), K i The specific rules for (t) are as follows:
[0063]
[0064] Furthermore, the degree of software fault propagation infection is defined.
[0065] In conclusion, when function i (node V i ) calls function j at time t (node V j ), the fault degree H of function i being infected by function j i (t) is:
[0066] H i (t) = K i (t)×r j (1.8)
[0067] The degree of failure of function i being infected by function j is equal to the probability K of function i being infected at time t i (t) and the fault degree value r propagated by fault function j j The product of .
[0068] Step S3: Establishing a software fault propagation model according to the concepts and representations of the software network topology model and the software fault propagation model.
[0069] (1) The software structure network topology of real open source software is performed. The total number of software nodes is recorded as N, and the adjacency matrix of the software network nodes is obtained, recorded as A. Function i (node V i ) is the row vector of the i-th row in the adjacency matrix A, denoted by b i = {b ij ∈A|j∈(1,2,3,···,N)}, the out-degree value of each function is w, function i (node V i ) has an out-degree value of w i .
[0070] (2) Model the software fault propagation of the generated complex software network. The initialization time is t = 0, the number of fault functions I(t) = 0, the function fault level threshold δ, the fault level of the function at time t A(t) = 0, and the state of the function at time t M(t) = 0.
[0071] (3) At time t=m, n functions (nodes) in the complex software network are selected to apply a software fault with a software fault intensity of r. Then, at time m, these functions have software faults, and their corresponding function state variables are all 1, and the neighbor matrices of this function in the adjacency matrix are all set to 0, and the matrix b is also set to 0. At the next moment, if a normal function calls this fault function, then this fault function will propagate the software fault with a software fault intensity of r to the normal function that calls it.
[0072] (4) At time t=m+1, all functions are traversed, and based on the function's own out-degree information and the state variables of its neighbor functions, it is determined whether the function calls the fault function.
[0073] (5) If the normal function i does not call the fault function j, then the function will evolve according to rule (1.3) and execute step (7).
[0074] (6) If a normal function i calls a faulty function j that has a software fault, then this function will evolve according to rules (1.3) and (1.7), and the probability K of the function being infected by the faulty function j into a faulty state is calculated. i (m+1), and then calculate the fault degree H of the normal function i infected by the fault function according to rule (1.8) i (m+1), and finally calculate the fault degree of normal function i at this time according to rule (1.4).
[0075] (7) Determine whether function i has failed and whether it has been infected into a fault function.
[0076] (8) If function i is still a normal function and is still in a normal state, execute step (10).
[0077] (9) If function i is infected and becomes a fault function that cannot run normally, then the number of fault functions I(t) = I(t) + 1, and the function state variable corresponding to this function is set to 1, the neighbor matrix of this function in the adjacency matrix is set to 0, and the matrix is also set to 0. Finally, the function fault degree A of this function is calculated. i (m+1) is assigned to the software fault intensity r, which is r i =A i (m+1), the next moment, if a normal function calls this fault function, then this fault function will set the software fault intensity to r i A software fault is propagated to the normal function that called it.
[0078] (10) Let i=i+1, and determine whether all functions have been traversed. If all functions have been traversed, that is, i>N, then let t=t+1, otherwise execute step (4).
[0079] (11) Determine whether the number of propagation has been completed T times, that is, t>T. If completed, terminate the program; otherwise, repeat step (4).
[0080] The symbols in the above steps are defined as follows:
[0081] I: represents the number of fault functions in a complex software system, that is, the number of fault nodes.
[0082] I(t): represents the number of fault functions in the complex software system at time t.
[0083] Experiments have shown that the software fault propagation model can well simulate the dynamic behavior of software fault propagation, analyze the vulnerability of complex software systems, and give suggestions for improving the resistance of complex software, ultimately achieving the goal of reducing the probability of software fault propagation in complex software systems.
[0084] This application proposes a new network modeling method, which takes functions as nodes and call relationships as edges, and uses directed edges and edge weights to express the call relationships and closeness between functions. At the same time, it introduces concepts such as the function state at a certain moment, the function failure degree at a certain moment, the function failure degree threshold, the function fault tolerance rate, as well as the software fault intensity and function fault tolerance capability, to establish a method for a software fault propagation model.
[0085] Embodiment 2
[0086] An embodiment of the present invention provides a system for establishing a software fault propagation model, referring to Figure 3 As shown, including:
[0087] Topology model building module 10: used to describe the software network topology structure using complex network theory to build a software network topology model;
[0088] Concept definition module 20: used to define the concept and representation form of establishing the software fault propagation model according to the software network topology model combined with the actual influencing factors of software fault propagation;
[0089] Fault model building module 30: used to build a software fault propagation model according to the concepts and representation forms of the software network topology model and the software fault propagation model.
[0090] In a specific embodiment of the present invention, the topology model building module is used to: use functions as nodes, call relationships as edges, and use directed edges and edge weights to represent the call relationships and closeness between functions to build the software network topology model.
[0091] In a specific embodiment of the present invention, the concept definition module is used to establish a software fault propagation model based on the function state, function fault degree, function fault degree threshold, function fault tolerance rate, function fault intensity and function fault tolerance of the software network topology model at a certain moment, combined with the concept of the software fault propagation model.
[0092] The system for establishing a software fault propagation model provided by the present invention can not only better help us understand the internal structure of large and complex software systems, analyze the interaction laws and dynamic processes between its internal components, but also measure the uncertainty of complex software system faults, characterize the propagation of software faults, and thus support us to conduct in-depth research on the fault propagation laws of large and complex software systems. By conducting in-depth research and understanding of the fault behavior and fault propagation mechanism of complex software systems, analyzing the vulnerability of complex software systems, and giving suggestions for improving the resistance of complex software, the purpose of reducing the probability of software fault propagation in complex software systems is finally achieved. The model can also help software developers understand software structure and improve software performance, opening up new directions and paths.
[0093] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0094] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referenced to each other. The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps of the functions specified in one or more boxes. Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention. Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0095] The method and device provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
[0096] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", "one specific embodiment" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for establishing a software fault propagation model, characterized in that: include: Step S1: using complex network theory to describe the software network topology structure to establish a software network topology model; Step S2: Based on the software network topology model and the actual influencing factors of software fault propagation, define the concept and representation form of establishing the software fault propagation model; Step S3: Establishing a software fault propagation model according to the concepts and representations of the software network topology model and the software fault propagation model.
2. The method for establishing a software fault propagation model according to claim 1, characterized in that: Step S1 includes: using functions as nodes, calling relationships as edges, and using directed edges and edge weights to represent the calling relationships and closeness between functions to establish the software network topology model.
3. The method for establishing a software fault propagation model according to claim 1, characterized in that: Step S2 includes: establishing a software fault propagation model based on the function state, function fault degree, function fault degree threshold, function fault tolerance rate, function fault intensity and function fault tolerance of the software network topology model at a certain moment, combined with the concept of the software fault propagation model.
4. The method for establishing a software fault propagation model according to claim 2, characterized in that: Each function within the software system is abstracted as a node in the network topology structure. All nodes constitute a set. Any function in the set is represented by a node in the set. Each node in the set corresponds to a function in the software source code. There is a one-to-one relationship between each node in the set and the function.
5. The method for establishing a software fault propagation model according to claim 3, characterized in that: The states of the function include: a normal state and a faulty state. The reasons for the function's failure include: errors or defects in the function itself causing a software failure, and / or the function is in a normal state, and at a certain moment the function calls a faulty function. Since the function's fault tolerance is less than the software fault intensity of the faulty function it calls, the function is infected and becomes a faulty function.
6. The method for establishing a software fault propagation model according to claim 5, characterized in that: The state of the function also includes: a fuzzy state, an intermediate state between a normal state and a fault state, which is used to describe the degree of damage to the function caused by a fault at a certain moment.
7. The method for establishing a software fault propagation model according to claim 5, characterized in that: The function fault degree threshold is used to distinguish between a normal state, a fuzzy state and a fault state of the function.