Common cause failure risk analysis method and system based on software structure coupling network
By constructing a software structure coupling network, calculating the complexity and coupling strength of nodes, determining early warning nodes in layers, and using subgraph slicing to construct a fault tree model, the problem of excessively large scope and low accuracy of software common cause failure analysis in existing technologies is solved, and efficient and accurate common cause failure analysis and defense strategy generation are achieved.
Patent Information
- Application Number
- CN202511735497.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-11-25
AI Technical Summary
Existing technologies struggle to effectively narrow down the analysis scope when analyzing common-cause failures in software, resulting in excessively large and complex fault trees. Furthermore, they rely on subjective judgment, which reduces the accuracy of the analysis.
By statically analyzing the software source code, a software structure coupling network is constructed, the complexity and coupling strength of the nodes are calculated, potential risk values are determined, nodes are divided into layers, early warning nodes are used to determine the analysis scope, and a fault tree model is constructed through subgraph slicing operations to perform common cause failure analysis.
It effectively narrows the scope of analysis, reduces the difficulty of analysis, improves the accuracy of common cause failure analysis, can extract key software components for isolation and centralization, and generate a list of software common cause failure defense strategies.
Smart Images

Figure CN121233455B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of software engineering and reliability analysis, in particular to a common cause failure risk analysis method and system based on software structure coupling network. BACKGROUND
[0002] Common cause failure is a common failure mode, which refers to the simultaneous failure of multiple modules due to the same cause. Common cause failure is easy to cause system failure, making it an important concern in many safety-critical fields. In the nuclear industry, common cause failure in digital instrumentation technology is an important problem that cannot be ignored, and finding a solution to common cause failure has become a key aspect of obtaining a nuclear safety license. Current methods for analyzing common cause failure mainly focus on the independence and diversity of equipment from the hardware and system perspectives.
[0003] With the widespread introduction of digital technology into safety-critical systems, it is becoming increasingly difficult to ensure the reliability of future safety-critical systems from only the system perspective. Safety experts have recognized that software common cause failure will increasingly become an important factor in system failure. As the complexity and nonlinearity of software architecture increase, software failure problems are expected to become more serious. Since complex software exhibits node aggregation and power-law distribution in complex networks, a small number of functional units have a disproportionately large number of inputs / outputs. This undoubtedly leads to a significant increase in the potential risk of emergency software failure, highlighting the problem of software failure. On the other hand, as software systems become more layered, the widespread sharing of underlying software functions is also growing, leading to a significant increase in factors contributing to software failure.
[0004] In the prior art, current software common cause failure analysis techniques mainly focus on software fault tree analysis and software FMEA. These methods can sort out the causal chain of software failure to find common causes, but they have several outstanding problems when dealing with complex and multi-level software. First, they fail to effectively narrow the scope of analysis, resulting in a software fault tree or table that is too large and complex, increasing the difficulty of analysis. Second, these methods rely heavily on subjective judgment and professional knowledge, which can lead to the omission of critical common cause paths, thereby reducing the accuracy of common cause failure analysis. Therefore, it is necessary to use an effective method to analyze the common cause failure risk in software systems. SUMMARY
[0005] Therefore, the purpose of the present application is to provide a common cause failure risk analysis method and system based on software structure coupling network to solve the above problems in the prior art.
[0006] In a first aspect, the present application provides a common cause failure risk analysis method based on software structure coupling network, which comprises:
[0007] performing static analysis on software source code, and calculating complexity and coupling strength of nodes in a network to construct a software structure coupling network;
[0008] calculating potential risk values of failure of each node in the software structure coupling network, layering each node based on its own role, and determining a warning node in the software structure coupling network according to the potential risk values of failure of each node;
[0009] determining a common cause failure analysis range of the software structure coupling network based on the warning node;
[0010] performing a subgraph slicing operation on the common cause failure analysis range to isolate and concentrate key software components for common cause failure analysis in the software structure coupling network to obtain a common cause failure analysis subgraph;
[0011] constructing a software fault tree model based on the common cause failure analysis subgraph, and performing software common cause failure analysis based on the software fault tree model to obtain a list of software common cause failure defense strategies.
[0012] Compared with the prior art, the present application has the beneficial effect that: by layering the interface and determining the warning node based on the potential risk values of failure, the analysis range can be effectively reduced, and the common cause failure analysis range can be determined through the warning node, and the common cause failure analysis subgraph can be obtained through the subgraph slicing operation to obtain the software fault tree model, so that the analysis difficulty can be effectively reduced and the accuracy of the common cause failure analysis can be improved after reducing the analysis range.
[0013] Further, the step of calculating the potential risk values of failure of each node in the software structure coupling network comprises:
[0014] establishing a comprehensive expression based on the complexity and the coupling strength, and calculating the potential risk values of failure of each node in the software structure coupling network according to the comprehensive expression, wherein the calculation expression of the potential risk values of failure is:
[0015] ;
[0016] In the formula, represents a potential risk quantitative index, represents the potential risk value of failure of a node, , , represent two different nodes, , represent a positive number corresponding to a complexity influence weight and a positive number corresponding to a coupling strength influence weight, represents the complexity of a node, representing complexity, representing nodes of out-degree pointing nodes, representing nodes coupling strength between nodes , representing nodes in-edge weight, representing nodes potential risk value of failure.
[0017] Further, the step of hierarchizing each of the nodes based on their own role and determining early-warning nodes in the software structure coupling network according to the potential risk value of failure of each of the nodes comprises:
[0018] dividing each of the nodes into high-level nodes and low-level nodes according to their role in the system;
[0019] sorting the low-level nodes dependent on two or more high-level nodes according to the potential risk value of failure, and extracting the low-level nodes in a preset value range in the sorting as high-risk common cause of failure of the high-level nodes to obtain early-warning nodes.
[0020] Further, the step of determining the common cause failure analysis range of the software structure coupling network based on the early-warning nodes comprises:
[0021] including each of the nodes, the early-warning nodes dependent on each of the nodes, and the intermediate nodes on the node path from each of the nodes to the early-warning nodes into an analysis node set of common cause failure;
[0022] constituting each of the nodes in the node set and the directed edges between each of the nodes into a sub-network, and taking the sub-network as the common cause failure analysis range.
[0023] Further, the step of performing software common cause failure analysis based on the software fault tree model comprises:
[0024] determining several top events causing common cause failure from subgraph slice high-level nodes based on the software fault tree model, and taking several of the top events as tree nodes to identify associated low-level nodes;
[0025] evaluating the complexity and coupling degree of the low-level nodes to determine whether the bottom-level nodes serve as intermediate nodes, and connecting the bottom-level nodes to the top events through logical gates;
[0026] Mark common cause nodes and establish the relationship between the common cause nodes and other fault tree nodes to trace back step by step to all common causes that led to the top event.
[0027] Secondly, the present invention also provides a common cause failure risk analysis system based on a software structure coupled network, the system comprising:
[0028] The building module is used to perform static analysis of the software source code and calculate the complexity and coupling strength of the nodes in the network in order to construct the software structure coupling network.
[0029] The calculation module is used to calculate the potential failure risk value of each node in the software structure coupling network, to stratify each node based on its own function, and to determine the early warning node in the software structure coupling network according to the potential failure risk value of each node.
[0030] The determination module is used to determine the scope of common cause failure analysis of the software structure coupling network based on the early warning node;
[0031] The execution module is used to perform a subgraph slicing operation on the common cause failure analysis range to isolate and concentrate the key software components used for common cause failure analysis in the software structure coupling network to obtain a common cause failure analysis subgraph.
[0032] The analysis module is used to construct a software fault tree model based on the common cause failure analysis subgraph, and to perform software common cause failure analysis based on the software fault tree model to obtain a list of software common cause failure defense strategies.
[0033] Furthermore, the computing module includes:
[0034] A computational unit is established to generate a comprehensive expression based on complexity and coupling strength, and to calculate the potential risk value of failure of each node in the software structure coupling network based on the comprehensive expression.
[0035] A partitioning unit is used to divide the nodes into high-level nodes and low-level nodes according to their roles in the system.
[0036] The sorting and extraction unit is used to sort the low-level nodes that depend on two or more high-level nodes according to the potential risk value of failure, and extract the low-level nodes in the sorted list that fall within a preset value range as high-risk common causes of failure of the high-level nodes, so as to obtain early warning nodes.
[0037] Furthermore, the determining module includes:
[0038] The inclusion unit is used to include each of the nodes, the early warning nodes that each of the nodes depends on, and the intermediate nodes on the node path from each of the nodes to the early warning nodes into the analysis node set of common cause failure.
[0039] A construction unit is used to form a subnetwork from each of the nodes in the node set and the directed edges between each of the nodes, and to use the subnetwork as the scope of the common cause failure analysis.
[0040] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described common cause failure risk analysis method based on software structure coupled network.
[0041] Fourthly, the present invention also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described common-cause failure risk analysis method based on a software structure coupled network. Attached Figure Description
[0042] Figure 1 This is a flowchart of the common cause failure risk analysis method based on software structure coupled network in the first embodiment of the present invention;
[0043] Figure 2 This is a flowchart illustrating the construction process of the software structure coupling network model in the first embodiment of the present invention.
[0044] Figure 3 This is a diagram illustrating the process of determining the scope of common cause failure analysis in the first embodiment of the present invention;
[0045] Figure 4 This is a schematic diagram of the common cause failure analysis process based on software structure coupling network in the first embodiment of the present invention;
[0046] Figure 5 This is a schematic diagram of obtaining the common cause failure analysis sub-graph of Tcas software in the first embodiment of the present invention;
[0047] Figure 6 This is a structural block diagram of the common cause failure risk analysis system based on software structure coupling network in the second embodiment of the present invention;
[0048] Figure 7 This is a structural block diagram of the electronic device in the third embodiment of the present invention.
[0049] Explanation of key component symbols:
[0050] 10. Construction Module; 20. Calculation Module; 30. Determination Module; 40. Execution Module; 50. Analysis Module;
[0051] 60. Bus; 61. Processor; 62. Memory; 63. Communication interface.
[0052] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation
[0053] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0054] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0056] Example 1
[0057] Please see Figure 1 The figure shows a common cause failure risk analysis method based on software structure coupled network in the first embodiment of the present invention, the method including steps S1 to S5:
[0058] S1. Static analysis of the software source code is performed, and the complexity and coupling strength of the nodes in the network are calculated to construct the software structure coupling network.
[0059] Understandably, static analysis of software source code yields an Abstract Syntax Tree (AST), Control Flow Graph (CFG), and Program Dependency Graph (PDG). The AST identifies the entity information of all functions and variables in the source code, providing complete node data for constructing the software structure coupling network. Scanning the AST function nodes uncovers call dependencies, identifying the calling function / variable nodes and information transmission direction. Analyzing the branch nodes in the CFG determines the control structure within functions, identifies control condition nodes, and uses the PDG to perform contextual retrieval on conditional statements to uncover hidden control dependencies.
[0060] Extract code complexity metrics from software nodes, including code size, cyclomatic complexity, and code nesting depth. These metrics are then combined to represent the overall node complexity and used as node weights. The complexity is denoted as The expression is:
[0061] ;
[0062] In the formula, Indicates to Take the natural logarithm. Represents function nodes The corresponding code nesting depth, Represents function nodes The corresponding total number of lines of code Represents function nodes The corresponding cyclomatic complexity of the code; where the code size This indicates the total number of lines of code. Cyclic complexity, as a metric for measuring program code complexity, is calculated from the control flow graph (CFG) of node functions. M represents the number of edges in the control flow graph. This represents the number of nodes in the control flow graph. The nesting depth CND is extracted from the AST and represents the number of nesting levels on the path from the starting point of the code to the deepest control structure.
[0063] Extracting software coupling relationships between software nodes and coupling frequency Including control coupling Data coupling Coupling with the call The software coupling relationships between software nodes are comprehensively represented as coupling strength and used as the weights of directed edges. , The coupling strength between them is denoted as The expression is:
[0064] ;
[0065] In the formula, Represents a node To the node The coupling strength between them This indicates the control coupling strength coefficient. This indicates the control of the coupling frequency. Indicates data coupling, Indicates the data coupling frequency. This indicates the coupling strength coefficient. This indicates the call coupling frequency; control coupling is obtained by analyzing the code's CFG. When the control function and the data of the controlled flow belong to different function modules in the control dependency relationship, a directed control coupling dependency edge is constructed between these two function nodes. For each such edge formed, the control coupling frequency is... Increment by 1. Data coupling is obtained by analyzing the data flow graph of the code. When the data function and data flow data in the data dependency relationship belong to different function modules, a directed data coupling dependency edge is created between the corresponding function nodes. The data coupling frequency is increased with each newly added edge. The call coupling relationship is determined based on the call information between functions. If function A calls function B, a directed call dependency edge is established between the corresponding nodes of the two functions. Each time a call relationship occurs, the call coupling frequency increases. Increment by 1. This controls the coupling strength coefficient. Set to 4, data coupling The strength coefficient is set to 2.5, and the coupling strength coefficient is called. Set to 1;
[0066] Construct a software structure coupling network model. For the construction process, please refer to [link / reference]. Figure 2 Software structure coupled networks can be represented by quadruples. To represent. Node set It is the set of all functions and global variables in the software system, while E is the set of all directed coupling edges. Represents the set of node weights. This represents the edge weight matrix. Node weights reflect the inherent complexity of a node, while the coupling between nodes represents the coupling strength within the SCN. Edge weights primarily consider the type and frequency of coupling relationships.
[0067] S2, calculate the potential failure risk value of each node in the software structure coupling network, divide each node into layers based on its own function, and determine the early warning node in the network according to the potential failure risk value of each node.
[0068] Specifically, step S2 includes steps S21 to S23:
[0069] S21. Establish a comprehensive expression based on complexity and coupling strength, and calculate the potential risk value of failure of each node in the software structure coupling network according to the comprehensive expression.
[0070] Understandably, the potential risk quantification index for nodes in a network is denoted as... The potential risks posed by node failures are jointly determined by the node's failure occurrence capability and its failure propagation capability. We use complexity to represent the node's failure occurrence capability and coupling strength to represent its failure propagation capability, establishing a comprehensive expression to reflect the potential risks posed by nodes to software failures. (Node) The potential risk value of failure is denoted as The calculation expression is:
[0071] ;
[0072] In the formula, Indicates a quantitative indicator of potential risk. Represents a node The potential risk value of failure, , These represent two different nodes. , This represents a positive number indicating how complexity affects the weight, and a positive number indicating how coupling strength affects the weight. Represents the complexity of a node. Representing complexity, Represents a node The set of nodes whose out-degree points to. Represents a node To the node The coupling strength between them Represents a node The weight of the incoming edge, Represents a node The potential risk value of failure; among which, , , Represents a node The set of all incoming edges, Represents a node An element in the set of all incoming edges.
[0073] S22, according to the role of each node in the system, they are divided into high-level nodes and low-level nodes;
[0074] It's important to explain that two hierarchical relationships are constructed based on the software structure coupling network to clarify the coupling factors related to common causes of software failure and to narrow the analytical perspective in a targeted manner. Nodes in the network are divided into high-level nodes and low-level nodes according to their role in the system. High-level nodes are directly related to the interface level of the core software functional requirements and are the main entry points for system-level function calls. Low-level nodes focus on the specific implementation of algorithms, low-level functional support, or act as intermediary nodes for information transmission and logical control. In the software structure coupling network, high-level nodes are manually identified based on requirements and design documents. All nodes remaining after the high-level nodes are selected are considered low-level nodes.
[0075] S23, sort the low-level nodes that depend on two or more high-level nodes according to the potential risk value of failure, and extract the low-level nodes in the sorted list that fall within a preset value range as high-risk common causes of failure of the high-level nodes, so as to obtain early warning nodes.
[0076] It is understandable that the early warning nodes in the software structure coupling network are obtained by combining the two hierarchical relationships between high-level nodes and low-level nodes with the potential risk value of failure. It is worth noting that the early warning node is defined as: in the software structure coupling network, after sorting the low-level nodes that depend on two or more high-level nodes in descending order of PRI (priority), the top 30% of the nodes are selected.
[0077] S3, determine the scope of common cause failure analysis of the software structure coupling network based on the early warning node;
[0078] Specifically, step S3 includes steps S31 to S32:
[0079] S31, each of the nodes, the early warning nodes that each of the nodes depends on, and the intermediate nodes on the node path from each of the nodes to the early warning nodes are included in the analysis node set of common cause failure.
[0080] S32, construct a subnetwork from each node in the node set and the directed edges between each node, and use the subnetwork as the scope of the common cause failure analysis.
[0081] It is understandable that all high-level nodes, early warning nodes that high-level nodes "depend" on, intermediate nodes on the path from high-level nodes to early warning nodes, and edges existing between all the aforementioned nodes are included in the analysis scope of common cause failure. For the process of determining the scope of common cause failure, please refer to [link to relevant documentation]. Figure 3 The meaning of "dependency" is: in a coupled software network, if node A can reach node B through depth-first traversal, then node A is said to depend on node B.
[0082] S4, perform a subgraph slicing operation on the common cause failure analysis range to isolate and centralize the key software components used for common cause failure analysis in the network to obtain a common cause failure analysis subgraph;
[0083] Understandably, based on the scope of software common cause failure analysis, the software structural coupling network is sliced using a common cause failure subgraph slicing algorithm to obtain all common cause failure analysis subgraphs. The common cause failure analysis process is as follows: Figure 4 As shown;
[0084] The specific process is as follows: find the node set DepSet of the depth-first traversal tree for each high-level node; store the nodes that are contained in two or more DepSet sets in the set AllDepSet; store the intermediate nodes on the path that can reach the high-level node in the preorder depth-first traversal tree of each node in the AllDepSet set in the AllDepSet set; separate the nodes contained in the AllDepSet set and the edges between the nodes from the scope of the software common cause failure analysis to obtain the complete common cause failure analysis subgraph.
[0085] S5. Construct a software fault tree model based on the common cause failure analysis subgraph, and perform software common cause failure analysis based on the software fault tree model to obtain a list of software common cause failure defense strategies.
[0086] Specifically, step S5 includes steps S51 to S53:
[0087] S51, Based on the software fault tree model, determine several top events from the high-level nodes of the subgraph slice that lead to common cause failure, and use the several top events as tree nodes to identify associated low-level nodes;
[0088] S52, evaluate the complexity and coupling of the low-level nodes to determine whether the low-level nodes are to be used as intermediate nodes, and connect the low-level nodes to the top event through logic gates;
[0089] S53, mark common cause nodes and establish the relationship between the common cause nodes and other fault tree nodes to gradually trace back to all common causes that led to the top event;
[0090] Understandably, the process involves analyzing high-level nodes in a subgraph slice to identify multiple top events that contribute to common software failures. These top events are then used as tree nodes to identify associated low-level nodes within the subgraph slice. The complexity or coupling of these low-level nodes is assessed, and their suitability as intermediate nodes in the tree is determined. Appropriate logic gates are then used to connect them to the top events. If a low-level node is identified as a common cause, it is labeled, and its relationship with other nodes in the software fault tree is established. This process is repeated progressively until all common causes leading to the occurrence of multiple top events are identified. These underlying basic events are called bottom events. The logic gates in the fault tree are then transformed using Boolean algebra principles, and Boolean expressions are used to calculate the probability of occurrence of the top events in the fault tree.
[0091] It is worth noting that potential common-cause failure risks are analyzed, corresponding common-cause failure defense strategies are proposed, and a list of software common-cause failure defense strategies is formed. Software fault tree analysis is performed on each sub-plot, and the software common-cause failure mode and defense analysis table is filled out with reference to the software common-cause failure general failure mode library and the software common-cause failure manifestation library. The table contains five items that need to be filled out; please refer to Table 1.
[0092] Table 1
[0093]
[0094] Based on the actual situation of the software project, the key items required are extracted, and finally an integrated list of software common cause failure defense strategies is generated.
[0095] In practical implementation, the software system of the Traffic Collision Avoidance System (TCAS) in the aviation field is used as the analysis object. The implementation object information is shown in Table 2 below:
[0096] Table 2
[0097]
[0098] Implementation Step 1: Analyze the Tcas source code, extract the node information of the Tcas software, and construct the software structure coupling network;
[0099] Step 1.1: Extract the graph structure from Tcas by converting the information in the code text into CSV format to represent the graph structure. This example uses the open-source tool Joern to parse the source code, obtaining the AST, CFG, and PDG of the Tcas source code, and then extracting node and edge information, saving them in Node.csv and Edge.csv respectively.
[0100] Step 1.2: Retrieve the functions and global variables from the Tcas source code in Node.csv, along with the corresponding code size, cyclomatic complexity, and nesting depth. Typical node information is shown in Table 3 below:
[0101] Table 3
[0102]
[0103] The complexity of each software node is calculated sequentially using the code complexity index of TCAS software nodes. Taking the TCAS_Pos_Trans node as an example, the NCD calculated according to the node complexity formula is 44.9318;
[0104] Extract the software coupling relationships (control coupling, data coupling, and call coupling) and coupling frequency between Tcas software nodes from Edge.csv. Typical edge information is shown in Table 4.
[0105] Table 4
[0106]
[0107] Based on the coupling relationships and coupling frequencies between Tcas software nodes, the coupling strength of the edges between software nodes is calculated sequentially according to the coupling strength formula between nodes; thus, the network node and edge data can be obtained, and a software structure coupling network model can be established to obtain the software structure coupling network model file.
[0108] Implementation Step 2: Quantify the potential risk indicators of nodes in Tcas, perform hierarchical operations on the Tcas software structure coupling network, and determine the scope of common cause failure analysis in Tcas;
[0109] Step 2.1: Obtain the potential risk index (PRI) for all nodes in the Tcas software structure coupled network model. The PRI value is calculated by combining the node's own complexity (NCD) and the coupling strength (Cou) of its surrounding nodes. The calculation process uses the formula for calculating the potential risk value of failure. Typical PRI data calculation results in the embodiment are shown in Table 5:
[0110] Table 5
[0111]
[0112] Step 2.2: Classify the nodes in the Tcas software structure coupling network and construct two levels: high-level nodes and low-level nodes;
[0113] Step 2.3: Based on the rules for obtaining early warning nodes, the early warning nodes in the Tcas software structure coupling network are obtained, as shown in Table 6:
[0114] Table 6
[0115]
[0116] Step 2.4: Based on the early warning nodes and in accordance with the confirmation rules for the scope of common cause failure analysis, obtain the scope of common cause failure analysis for the Tcas software structural coupling network.
[0117] Implementation Step 3: Slice the Tcas software structural coupling network using the common cause failure subgraph slicing algorithm to obtain 6 Tcas software common cause failure analysis subgraph slices. One of the Tcas subgraph slices is shown below. Figure 4 As shown, the high-level nodes of this subgraph are SAV_partitionInit and ACAS_Main.
[0118] Implementation Step 4: Based on the common cause failure analysis subgraph of Tcas software, a software fault tree analysis model is constructed from top to bottom using the deductive method to quantitatively model and analyze potential risks;
[0119] Step 4.1: Perform fault tree modeling on the subgraph slices containing the high-level nodes SAV_partitionInit and ACAS_Main in the embodiment. SAV_partitionInit and ACAS_Main, as high-level nodes, are two top events of common cause failure in Tcas software.
[0120] Step 4.2: ACAS_Main acts as a tree node, and its associated lower-level nodes are acas_init, createXPDRTransPort, codeToStr, acas_task_realtime_tclock, acas_init_strap_data, and createXPDRReceivePort. SAV_partitionInit acts as a tree node, and its associated lower-level nodes are createXPDRTransPort, acas_task_realtime_tclock, acas_init_strap_data, and createXPDRReceivePort.
[0121] Step 4.3: codeToStr and acas_task_realtime_tclock, as low-level nodes with high potential common cause failure risk, are high-risk common causes of failure in SAV_partitionInit and ACAS_Main nodes. Using codeToStr and acas_task_realtime_tclock as intermediate nodes in the fault tree, and referencing the call relationships between nodes, a logical OR gate is used to connect them to the top event.
[0122] Step 4.4: In the subgraph slice containing the high-level nodes SAV_partitionInit and ACAS_Main, ACAS_Main directly calls acas_init, and indirectly calls codeToStr and acas_task_realtime_tclock through acas_init. SAV_partitionInit directly calls acas_task_realtime_tclock and calls codeToStr through acas_task_realtime_tclock. Logic gates are used to establish the relationship between the common cause nodes codeToStr and acas_task_realtime_tclock and other nodes in the software fault tree.
[0123] Step 4.5: Trace the basic events that triggered the failure of intermediate nodes. These are the base events of the software fault tree, and they are the common causes of all the top events. The base events and their occurrence rates are shown in Table 7.
[0124] Table 7
[0125]
[0126] Step 4.6: Transform the logic gates in the TCAS common-cause failure fault tree model according to Boolean algebra principles, and use Boolean expressions to calculate the probability of occurrence of the top event in the fault tree, performing quantitative analysis of common-cause failures in TCAS software. For example, calculate the occurrence rate of the top event in the fault tree containing high-level nodes SAV_partitionInit and ACAS_Main, obtaining the failure probability of the top event respectively. Then, sequentially process the bottom events using... , , , This indicates that the failure rates for the corresponding bottom events are respectively , , , ;
[0127] Failure probability of the top event ACAS_Main in the fault tree for:
[0128] ;
[0129] In the formula, The standard symbols for scientific notation;
[0130] The failure probability P(S) of the fault tree top event SAV_partitionInit is:
[0131] ;
[0132] Step 5: Perform common cause failure analysis on Tcas to obtain a common cause failure mode defense analysis table and a list of common cause failure defense strategies for Tcas software.
[0133] Step 5.1: Perform common cause failure analysis on the six Tcas common cause failure fault tree models. The Tcas software common cause failure analysis sub-graph is shown below. Figure 5 As shown, fill in the software common cause failure mode and defense analysis table corresponding to each common cause failure mode. The software common cause failure mode and defense analysis table for the high-level nodes SAV_partitionInit and ACAS_Main in the embodiment is shown in Table 8:
[0134] Table 8
[0135]
[0136] Step 5.2: Integrate the six TCAS software common cause failure mode and defense analysis tables, and extract them into a list of TCAS software common cause failure defense strategies, as shown in Table 9:
[0137] Table 9
[0138]
[0139] In summary, the common cause failure risk analysis method based on software structure coupling network in the above embodiments of the present invention can effectively narrow the analysis scope by determining the early warning node through the layering of docking points and the potential risk value of failure. The early warning node can determine the analysis scope of common cause failure, and the software fault tree model can be obtained by obtaining the common cause timeliness analysis subgraph through subgraph slicing operation. After narrowing the analysis scope, the analysis can be carried out through the model, which can effectively reduce the analysis difficulty and improve the accuracy of common cause failure analysis.
[0140] Example 2
[0141] This invention also proposes a common-cause failure risk analysis system based on software structure coupled networks. Please refer to [link to relevant documentation]. Figure 6 The figure shows a common cause failure risk analysis system based on software structure coupled network according to the second embodiment of the present invention. The system includes:
[0142] Module 10 is used to perform static analysis of the software source code and calculate the complexity and coupling strength of the nodes in the network to construct the software structure coupling network.
[0143] The calculation module 20 is used to calculate the potential failure risk value of each node in the software structure coupling network, to stratify each node based on its own function, and to determine the early warning node in the software structure coupling network according to the potential failure risk value of each node.
[0144] The determination module 30 is used to determine the common cause failure analysis range of the software structure coupling network based on the early warning node;
[0145] The execution module 40 is used to perform a subgraph slicing operation on the common cause failure analysis range to isolate and concentrate the key software components used for common cause failure analysis in the software structure coupling network to obtain a common cause failure analysis subgraph.
[0146] Analysis module 50 is used to construct a software fault tree model based on the common cause failure analysis subgraph, and to perform software common cause failure analysis based on the software fault tree model to obtain a list of software common cause failure defense strategies.
[0147] In some alternative embodiments, the computing module 20 includes:
[0148] A computational unit is established to generate a comprehensive expression based on complexity and coupling strength, and to calculate the potential failure risk value of each node in the software structure coupling network according to the comprehensive expression. The expression for calculating the potential failure risk value is as follows:
[0149] ;
[0150] In the formula, Indicates a quantitative indicator of potential risk. Represents a node The potential risk value of failure, , These represent two different nodes. , This represents a positive number indicating how complexity affects the weight, and a positive number indicating how coupling strength affects the weight. Represents the complexity of a node. Representing complexity, Represents a node The set of nodes whose out-degree points to. Represents a node To the node The coupling strength between them Represents a node The weight of the incoming edge, Represents a node The potential risk value of failure;
[0151] A partitioning unit is used to divide the nodes into high-level nodes and low-level nodes according to their roles in the system.
[0152] The sorting and extraction unit is used to sort the low-level nodes that depend on two or more high-level nodes according to the potential risk value of failure, and extract the low-level nodes in the sorted list that fall within a preset value range as high-risk common causes of failure of the high-level nodes, so as to obtain early warning nodes.
[0153] In some alternative embodiments, the determining module 30 includes:
[0154] The inclusion unit is used to include each of the nodes, the early warning nodes that each of the nodes depends on, and the intermediate nodes on the node path from each of the nodes to the early warning nodes into the analysis node set of common cause failure.
[0155] A construction unit is used to form a subnetwork from each of the nodes in the node set and the directed edges between each of the nodes, and to use the subnetwork as the scope of the common cause failure analysis.
[0156] In some alternative embodiments, the analysis module 50 includes:
[0157] The determining unit is configured to determine, based on the software fault tree model, several top events that cause common cause failure from high-level nodes of subgraph slices, and use the several top events as tree nodes to identify associated low-level nodes;
[0158] An evaluation unit is used to evaluate the complexity and coupling of the low-level nodes to determine whether the low-level nodes are used as intermediate nodes, and to connect the low-level nodes to the top event through logic gates.
[0159] A tagging unit is used to tag common cause nodes and establish the relationship between the common cause nodes and other fault tree nodes in order to trace back step by step to all common causes that led to the top event.
[0160] The functions or operation steps implemented by the above modules and units are largely the same as those in the above method embodiments, and will not be repeated here.
[0161] The common cause failure risk analysis system based on software structure coupled network provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0162] Example 3
[0163] The third embodiment of the present invention also proposes an electronic device, please refer to [link / reference]. Figure 7The image shows an electronic device according to a third embodiment of the present invention.
[0164] The electronic device may include a processor 61 and a memory 62 storing computer program instructions.
[0165] Specifically, the processor 61 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the present application.
[0166] The memory 62 may include a large-capacity storage device for data or instructions. For example, and not limitingly, the memory 62 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 62 may include removable or non-removable (or fixed) media. Where appropriate, the memory 62 may be internal or external to a data processing device. In a particular embodiment, the memory 62 is non-volatile memory. In a particular embodiment, the memory 62 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0167] The memory 62 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 61.
[0168] The processor 61 reads and executes the computer program instructions stored in the memory 62 to implement the common cause failure risk analysis method based on software structure coupling network in the first embodiment described above.
[0169] In some embodiments, the electronic device may further include a communication interface 63 and a bus 60. For example, Figure 7 As shown, the processor 61, memory 62, and communication interface 63 are connected through bus 60 and complete communication with each other.
[0170] The communication interface 63 is used to enable communication between the various modules, devices, units, and / or equipment in this application. The communication interface 63 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.
[0171] Bus 60 includes hardware, software, or both, that couples components of a device together. Bus 60 includes, but is not limited to, at least one of the following: data bus, address bus, control bus, expansion bus, and local bus. For example, and not as a limitation, bus 60 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 60 may include one or more buses. Although this application describes and illustrates a specific bus, this application considers any suitable bus or interconnection.
[0172] The electronic device can acquire a common cause failure risk analysis system based on software structure coupled network and execute the common cause failure risk analysis method based on software structure coupled network in this embodiment.
[0173] Furthermore, in conjunction with the common-cause failure risk analysis method based on software structure coupled networks in Embodiment 1 above, this application can provide a storage medium for implementation. This storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement the common-cause failure risk analysis method based on software structure coupled networks in Embodiment 1 above.
[0174] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0175] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
[0176] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0177] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A common-cause failure risk analysis method based on software structure coupled networks, characterized in that, The method includes: Static analysis is performed on the software source code, and the complexity and coupling strength of the nodes in the network are calculated to construct the software structure coupling network. The steps of calculating the potential failure risk value of each node in the software structure coupling network include: calculating the potential failure risk value of each node in the software structure coupling network; stratifying each node based on its own function; and determining early warning nodes in the software structure coupling network based on the potential failure risk value of each node. A comprehensive expression is established based on complexity and coupling strength. The potential failure risk value of each node in the software structure coupling network is then calculated based on this comprehensive expression. The expression for calculating the potential failure risk value is as follows: ; In the formula, Indicates a quantitative indicator of potential risk. Represents a node The potential risk value of failure, , These represent two different nodes. , This represents a positive number indicating how complexity affects the weight, and a positive number indicating how coupling strength affects the weight. Represents the complexity of a node. Representing complexity, Represents a node The set of nodes whose out-degree points to. Represents a node To the node The coupling strength between them Represents a node The weight of the incoming edge, Represents a node The potential risk value of failure; The scope of common cause failure analysis of the software structure coupling network is determined based on the early warning nodes; A subgraph slicing operation is performed on the common cause failure analysis scope to isolate and concentrate the key software components used for common cause failure analysis in the software structure coupling network to obtain a common cause failure analysis subgraph; A software fault tree model is constructed based on the common cause failure analysis subgraph, and software common cause failure analysis is performed based on the software fault tree model to obtain a list of software common cause failure defense strategies.
2. The common cause failure risk analysis method based on software structure coupled network according to claim 1, characterized in that, The step of stratifying the nodes based on their individual functions and determining the early warning nodes in the software structure coupling network according to the potential failure risk value of each node includes: Nodes are divided into high-level nodes and low-level nodes according to their roles in the system. The low-level nodes that depend on two or more high-level nodes are sorted according to the potential risk value of failure, and the low-level nodes in the sorted list with a preset value range are extracted as high-risk common causes of failure of the high-level nodes, so as to obtain early warning nodes.
3. The common-cause failure risk analysis method based on software structure coupled network according to claim 1, characterized in that, The step of determining the common cause failure analysis scope of the software structure coupling network based on the early warning node includes: Each of the nodes, the early warning nodes that each node depends on, and the intermediate nodes on the node path from each node to the early warning node are included in the analysis node set for common cause failure. The nodes in the node set and the directed edges between the nodes form a subnetwork, and the subnetwork is used as the scope of the common cause failure analysis.
4. The common cause failure risk analysis method based on software structure coupled network according to claim 1, characterized in that, The steps for performing software common cause failure analysis based on the software fault tree model include: Based on the software fault tree model, several top events leading to common cause failure are determined from the high-level nodes of the subgraph slice, and these top events are used as tree nodes to identify associated low-level nodes. The complexity and coupling of the low-level nodes are evaluated to determine whether the low-level nodes should be used as intermediate nodes, and the low-level nodes are connected to the top event through logic gates. Mark common cause nodes and establish the relationship between the common cause nodes and other fault tree nodes to trace back step by step to all common causes that led to the top event.
5. A common-cause failure risk analysis system based on software structure coupled network, characterized in that, The system includes: The building module is used to perform static analysis of the software source code and calculate the complexity and coupling strength of the nodes in the network in order to construct the software structure coupling network. The calculation module is used to calculate the potential failure risk value of each node in the software structure coupling network, to stratify each node based on its own function, and to determine the early warning node in the software structure coupling network according to the potential failure risk value of each node. The computing module includes: A computational unit is established to generate a comprehensive expression based on complexity and coupling strength, and to calculate the potential failure risk value of each node in the software structure coupling network according to the comprehensive expression. The expression for calculating the potential failure risk value is as follows: ; In the formula, Indicates a quantitative indicator of potential risk. Represents a node The potential risk value of failure, , These represent two different nodes. , This represents a positive number indicating how complexity affects the weight, and a positive number indicating how coupling strength affects the weight. Represents the complexity of a node. Representing complexity, Represents a node The set of nodes whose out-degree points to. Represents a node To the node The coupling strength between them Represents a node The weight of the incoming edge, Represents a node The potential risk value of failure; The determination module is used to determine the scope of common cause failure analysis of the software structure coupling network based on the early warning node; The execution module is used to perform a subgraph slicing operation on the common cause failure analysis range to isolate and concentrate the key software components used for common cause failure analysis in the software structure coupling network to obtain a common cause failure analysis subgraph. The analysis module is used to construct a software fault tree model based on the common cause failure analysis subgraph, and to perform software common cause failure analysis based on the software fault tree model to obtain a list of software common cause failure defense strategies.
6. The common cause failure risk analysis system based on software structure coupled network according to claim 5, characterized in that, The computing module includes: A partitioning unit is used to divide the nodes into high-level nodes and low-level nodes according to their roles in the system. The sorting and extraction unit is used to sort the low-level nodes that depend on two or more high-level nodes according to the potential risk value of failure, and extract the low-level nodes in the sorted list that fall within a preset value range as high-risk common causes of failure of the high-level nodes, so as to obtain early warning nodes.
7. The common-cause failure risk analysis system based on software structure coupled network according to claim 5, characterized in that, The determining module includes: The inclusion unit is used to include each of the nodes, the early warning nodes that each of the nodes depends on, and the intermediate nodes on the node path from each of the nodes to the early warning nodes into the analysis node set of common cause failure. A construction unit is used to form a subnetwork from each of the nodes in the node set and the directed edges between each of the nodes, and to use the subnetwork as the scope of the common cause failure analysis.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the common cause failure risk analysis method based on software structure coupled network as described in any one of claims 1 to 4.
9. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the common cause failure risk analysis method based on software structure coupled network as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Failure chain quantitative analysis and risk assessment method and system based on multi-level security model
CN120706882A
Software development automation test case generation system based on artificial intelligence
CN120929376A