An XGBoost-based routing algorithm key failure point identification method
The XGBoost-based fault point identification system solves the problem that routing algorithms in space-based networks struggle to identify critical fault points under space radiation conditions, achieving efficient and accurate fault point prediction and improving the reliability of the routing mechanism.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
- Filing Date
- 2022-10-19
- Publication Date
- 2026-06-09
Smart Images

Figure CN115630367B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of software hardening and trusted software, specifically relating to a method for identifying key fault points in a routing algorithm based on XGBoost. Background Technology
[0002] Routers, as a crucial component of space-based mobile communication networks, function to connect different networks. By selecting efficient and fast transmission paths, they improve communication speed, reduce data transmission load on the network system, conserve network resources, and enhance communication efficiency, thereby maximizing the system's benefits. The strategy and routing algorithm for selecting the optimal transmission path are key technologies for routers. Routing algorithms determine the best path to the destination node. They are divided into static and dynamic routing algorithms. Dynamic routing algorithms can adapt well to changes in network topology or link status and are commonly used in large and complex network environments, improving network performance and aiding in flow control. As a critical program for network system operation, dynamic routing algorithms require high-level reliability technologies to strengthen them and reduce failure rates. However, modern microprocessors and memory devices have been proven to be highly susceptible to soft errors caused by strong interference such as solar radiation, leading to network failures and data corruption.
[0003] In the radiation environment of space, space radiation or high-energy particle impacts can interfere with hardware components of computer systems, such as semiconductor digital circuits. This phenomenon is called single-event effect. Specific manifestations include single-event upsets (SEUs). SEUs are transient faults caused by high-energy charged particles bombarding sensitive nodes of microelectronic devices (microprocessors, semiconductor memories, power transistors, etc.), resulting in a unit flip on these logical bits. This is also known as a soft error. Transient faults triggered by soft errors can have a significant impact on the software running on the computer hardware, such as causing programs to enter infinite loops, crash, or produce incorrect output.
[0004] Identifying critical failure points in applications can be achieved through software fault injection. Exhaustive fault injection techniques can identify almost all critical failure points in a program, but this incurs immeasurable overhead. To reduce the overhead of fault injection, existing research mostly employs fault pruning or error propagation modeling methods. For example, Li et al. from the University of British Columbia constructed a three-level model, TRIDENT, based on research into error propagation patterns in programs, predicting the overall SDC probability and the SDC probability of individual instructions for a given program without fault injection. Xin Fu et al. from the University of Florida studied the time-varying behavior of microarchitectural components during runtime, using code structure-based and runtime event-based methods to predict program reliability. Fritz et al. from Northeastern University proposed a fault injection method, PCFI (program counter (PC) guided fault injection), which leverages the predictability of fault injection results based on the program counter's influence on instructions to reduce the number of fault injection activities, shortening the time of fault injection activities by 22% without sacrificing accuracy. B. Nie et al. from the College of William & Mary proposed a systematic approach to progressively prune the fault site space. This approach prunes fault points by identifying dynamic instruction commonality between code blocks in a thread set, subsets of loop iterations in representative threads, and subsets of target register bit locations, thereby reducing the number of fault injections required. While this method reduces the overhead of fault injection, the process is difficult to automate and lacks analysis of application characteristics.
[0005] Critical failure points can be predicted by analyzing the SDC (Silent Data Corruption) vulnerability of a program. Silent Data Corruption (SDC) errors are one of the most dangerous types of soft errors, and the location of the failure leading to an SDC error is considered a critical failure point. Machine learning-based SDC vulnerability prediction methods train a model by extracting relevant features from the target program, thereby identifying critical failure points. For example, Lu et al. from the University of British Columbia proposed an empirical model, SDCTune, which first extracts the compile-time static features of instructions in the program, and then uses decision regression trees and program analysis methods to predict the SDC vulnerability of instructions in the program. YANG et al. from Southeast University proposed a support vector machine-based method, PVInsiden, which trains a detector through machine learning and can identify instructions with high SDC vulnerability. Machine learning-based methods can generally predict instruction vulnerability relatively accurately. However, existing machine learning-based SDC prediction methods rarely work for specific applications. Existing research does not consider application-specific features in feature extraction, therefore the prediction results are not targeted.
[0006] In summary, current methods widely employ fault injection to identify critical program failure points, with most improvements using fault pruning or error propagation modeling. While these methods reduce overhead, they struggle to automate the process. Furthermore, machine learning-based program vulnerability prediction (SDC) methods are ill-suited for directly analyzing the execution characteristics of specific applications, and their input feature extraction lacks specificity, making them poorly applied to routing mechanisms in space-based networks. Summary of the Invention
[0007] The technical problem solved by this invention is to address the shortcomings of the existing technology by analyzing the execution process of the target routing algorithm and establishing a fault model; providing a method for extracting the inherent characteristics of program instruction execution and the unique characteristics of the target routing algorithm; and proposing a key fault point identification method based on XGBoost, which can automatically identify key fault points of the target routing algorithm without the need for exhaustive fault injection, and can thus be used to guide efficient routing soft hardening strategies. In particular, for faults caused by soft errors in the routing mechanism due to space radiation, this invention can improve the reliability of the routing mechanism.
[0008] The technical solution to achieve the objective of this invention is: a method for identifying key failure points in a routing algorithm based on XGBoost, which can effectively predict key failure points in routing programs affected by single-event upsets under radiated environments, including the following steps:
[0009] Step 1: Divide the target routing algorithm into different execution stages, analyze the output results of each stage, and establish a preliminary fault model;
[0010] Step 2: Conduct random fault injection experiments on the routing algorithm source code, and extract fault point features based on the fault injection information;
[0011] Step 3: Improve the target routing algorithm fault model based on the fault point characteristics, and construct a sample dataset by combining the program output results;
[0012] Step 4: Construct and train a critical fault point prediction model for the routing algorithm based on XGBoost to predict the fault types caused by soft errors at the source program fault points.
[0013] Step 5: Based on the model prediction results, automatically classify the fault types caused by soft errors in the source program of the routing algorithm and identify key fault points.
[0014] A critical fault point identification system for XGBoost-based routing algorithm, the system comprising:
[0015] The first module is used to divide the different execution stages of the target routing algorithm, analyze the output results of each stage of the program, and establish a preliminary fault model.
[0016] The second module is used to conduct random fault injection experiments on the routing algorithm source program and extract fault point features by combining fault injection information.
[0017] The third module is used to improve the target routing algorithm fault model based on the characteristics of the fault points and to construct a sample dataset by combining the program output results.
[0018] The fourth module is used to build and train a critical fault point prediction model for the routing algorithm based on XGBoost, and to predict the fault types caused by soft errors at fault points in the source program.
[0019] The fifth module is used to automatically classify the types of faults caused by soft errors in the source program of the routing algorithm based on the model prediction results, and to identify key fault points.
[0020] Compared with the prior art, the significant advantages of this invention are:
[0021] 1) The construction of the fault model incorporates the unique features of the target routing algorithm, making the fault model more targeted.
[0022] 2) By constructing a fault model to extract the fault point features of the target routing algorithm, the trained fault type prediction model has a higher prediction accuracy than other methods.
[0023] 3) A method for identifying key fault points in routing algorithms based on XGBoost is proposed. Compared with exhaustive fault injection, this method can reduce the number of fault injections to identify key fault points in the program and improve the reliability of evaluating target routing algorithms.
[0024] The present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description
[0025] Figure 1 is a flowchart of the critical fault point identification method based on XGBoost of the present invention.
[0026] Figure 2 shows a comparison of the time consumption of the method of the present invention and the random fault injection experiment.
[0027] Figure 3 shows the experimental results comparing the performance of the method of the present invention with other methods. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0029] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0030] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0031] In one embodiment, combined Figure 1 This invention provides a method for identifying critical fault points in a routing algorithm based on XGBoost. It includes the following steps:
[0032] Step 1: Divide the target routing algorithm into different execution stages, analyze the output results of each stage, and initially establish a fault model. The specific implementation method is as follows:
[0033] Step 1.1: According to the execution flow of the dynamic routing protocol, the target routing algorithm is logically divided into four stages: collecting dynamic topology information, constructing the target network, updating routing information, and forming a routing table.
[0034] Phase of collecting dynamic topology information:
[0035] Step 1.2: Collect dynamic topology information; nodes send status information to each other; the connection weights between directly connected nodes are... ;
[0036] Target network construction phase:
[0037] Step 1.3: Construct the target network, which is a graph model. This indicates that the set of nodes in the network is described as follows: The set describing the edges is Edges represent links between nodes. The target network is constructed using an adjacency matrix and a weight matrix. Given a two-dimensional matrix containing connection information from the graph, for the model ,structure adjacency matrix Its element generation method is as shown in equation (1):
[0038]
[0039] In equation (1), This represents the adjacency matrix of the target network. Represents nodes in the network and nodes The connection status, For describing the set of edges The element in the node, if the node and nodes If the elements are connected, the corresponding state value is 1; otherwise, the corresponding state value is 0. Further, a weight matrix is constructed. This is a two-dimensional matrix containing the connection weights between nodes, constructed based on the dynamic topology information collected in the first phase. 1-th order matrix Its element generation method is as shown in equation (2):
[0040]
[0041] In equation (2), Further represented as nodes after adding connection weights and nodes The connection state is such that if node i and node j are connected, the corresponding value is the weight. If they are the same node, the corresponding value is 0; if node i and node j are not connected, the coefficient is ∞.
[0042] Update routing information phase:
[0043] Step 1.4: Update routing information and run the shortest path algorithm Dijkstra's algorithm, based on the weight matrix generated during the target network construction phase. The path metric between nodes is determined by the connection weights. Given a set of nodes, calculate the shortest path between nodes in a network. any node The shortest path to the remaining nodes is expressed as equation (3):
[0044]
[0045] In equation (3), Represents a node With network node set The set of shortest paths to the remaining nodes, and the elements in the set. Representing nodes respectively With the remaining nodes ( The shortest path between ( );
[0046] The routing table formation phase:
[0047] Step 1.5: A routing table is created. Based on the updated routing information phase, the shortest path between nodes is calculated, generating routing information for the transmission path from the current node to other nodes in the network. For each node... The routing table contains a set of routes from itself to nodes. The path and next-hop information of the remaining nodes in the equation are expressed as equation (4):
[0048]
[0049] In equation (4), Represents a node The resulting routing table contains a set of shortest paths. and the next hop node ;
[0050] Step 1.6: Introduce transient faults during the execution of the target routing algorithm. Based on the collected runtime information, construct a fault model for the target routing algorithm. Considering the different stages of the target routing algorithm where single-event effects occur, and the impact of faults on the output results, a preliminary fault model for the target routing algorithm is constructed. Represented as equation (5):
[0051]
[0052] In equation (5), Indicates the locations in the program affected by radiation, respectively by and This indicates the different stages of the target routing algorithm corresponding to the fault location. , This indicates the specific fault point in the corresponding stage. This represents the impact of a fault on the output of each stage, initially expressed as: (Incorrect output) and (The output is correct);
[0053] Step 2: Conduct random fault injection experiments on the routing algorithm source code, and extract relevant features of the fault points based on the fault injection information. The specific implementation method is as follows:
[0054] Based on the impact of the single-event effect on memory units, its manifestation during program execution is analyzed. Transient faults are introduced at the instruction level, and the instruction sequence dynamically executed at each stage of the target routing algorithm is examined. The first of the included The fault point is represented by the following instruction, as shown in equation (6):
[0055]
[0056] In equation (6), Representation phase The first stage of a certain period One instruction, This indicates the instruction type of the instruction. The storage unit representing the operands of an instruction, specifically the register or memory involved in the instruction operation. This indicates that a bit flip occurs in the corresponding memory cell at the 1st... The first bit, i.e., the first bit of the instruction operand register. Bit or a memory address According to the method of representing the fault point Extract the following information: Fault point characteristics (Instruction type) (Flip position) (Flip direction) (Storage unit name), the algorithm for constructing the fault point feature vector is as follows:
[0057] Step 2.1, construct the instruction type for the target routing algorithm fault point as shown in equation (7). ;
[0058]
[0059] Based on the set of static instructions contained in the source program, there are 8 types: add, cmp, leave, mov, pop, store, test, and xor. When a soft error occurs at the fault point, the corresponding instruction type takes a value of 1; otherwise, it takes a value of 0, corresponding to the fault point in equation (4). In ;
[0060] Step 2.2, construct the storage cell type characteristics of the fault point as shown in equation (8). ;
[0061]
[0062] in, This indicates the register name corresponding to the instruction operand being a register. This refers to the memory address corresponding to an instruction operand that is a memory unit. Corresponding to the fault point in equation (4) In ;
[0063] Step 2.3, construct the flip-bit feature of the fault point as shown in equation (9). ;
[0064]
[0065] Among them, the flipped bit feature From the position of the flip bit and flip direction constitute, For the storage unit's first Bit flipping occurs when the instruction operand's storage location is a register in the communication interface. This represents the total number of bits in the register. The bit flip direction at which a unit flip occurs is divided into 0→1 and 1→0. When the flip direction is 1→0, the value of this feature is 1; otherwise, it is 0, corresponding to the fault point in equation (4). In .
[0066] Step 3: Improve and refine the target routing algorithm fault model based on the fault point characteristics, and construct a sample dataset by combining the program output results. The specific implementation method is as follows:
[0067] The reconstructed fault model based on the fault point characteristics is shown in equation (10):
[0068]
[0069] In equation (10), the fault model It consists of a set of fault points and a set of corresponding fault types. The set of fault points is determined by different stages of the target routing algorithm. Characteristics of fault points in stages The Cartesian product is obtained, This is a set of fault types that occur when a unit flips at a fault point. Based on the impact of soft errors on the program output, the fault types are divided into three categories: error, masked, and sdc (Silent Data Corruption). Error represents explicit faults such as program crashes or hangs without output; masked represents potential faults such as soft errors being masked in the program and having no impact on the output; and sdc (Silent Data Corruption) represents implicit faults such as program output inconsistent with the golden output.
[0070] Step 4: Construct and train a critical fault point prediction model for the routing algorithm based on XGBoost, and automatically classify the fault types caused by soft errors at the source program fault points. The specific implementation method is as follows:
[0071] Step 4.1: Construct the feature vector of fault points in the target routing algorithm based on the fault model;
[0072] Step 4.1.1, based on the fault model established in Step 3 From fault point information Construct the location features of the target routing algorithm failure points as shown in equation (12). :
[0073]
[0074] in, , and Corresponding to In and ;
[0075] Step 4.1.2, based on the fault model established in Step 3 The fault point is located in the execution phase. Further specific, as shown in equation (13):
[0076]
[0077] Among them, using express It includes four stages. The number of instructions contained in each stage;
[0078] Step 4.1.3: Traverse the sample dataset and calculate the output results of the program after fault injection. The element in the text defines the tag. m is the total number of samples in the dataset. Indicates the first The label value of each sample represents the fault type corresponding to that fault point sample; Represented as equation (14):
[0079]
[0080] Step 4.1.4, calculate according to equations (13) to (14) respectively. The impact of each stage on the program output Let set , According to the sample dataset Value division and , and They represent and The number of samples in the sample dataset; for the first sample in the sample dataset From each sample, the corresponding execution stage is obtained. and the total number of instructions contained in this stage. Let the impact of the fault location on the program output be... The calculation method is shown in equation (15):
[0081]
[0082] in, and Based on the label values of the entire sample dataset The number of samples contained in each partition. For the stage Each stage after segmentation includes label values. The number of samples; This represents the number of instructions contained in the instruction sequence of this stage. This represents the total number of instructions contained in the executable program of the routing algorithm.
[0083] Step 4.1.5: Construct the fault point feature vector according to equations (12) and (15). , expressed as equation (16):
[0084]
[0085] in, The location characteristics of the fault point This describes the impact of the fault location on the program output.
[0086] Step 4.2: Construct and train a fault type prediction model based on XGBoost (eXtreme Gradient Boosting);
[0087] Step 4.2.1: Based on the feature vectors constructed in step 5.1, construct the dataset shown in equation (18). ,in Indicates the first Feature vectors of training samples , Indicates the first Label values of training samples :
[0088]
[0089] Step 4.2.2: Predict the type of failure caused by a soft error at the fault point according to equation (19);
[0090] For the feature vector of the fault point Using sample labels respectively The values are 0 and Two classification decision trees are built with a value of 1, and the corresponding prediction function is: and , The calculation method is shown in equation (19):
[0091]
[0092] Among them, feature vectors are selected sequentially. The feature values, Represents the dataset The set of samples that meet the value of this feature. For the remaining sample set, Describes any sample in the set. and They represent and The label value corresponding to this sample and The average number of occurrences, and These represent the number of times each occurrence occurs;
[0093] Step 4.2.3, calculate the probability of fault type sdc according to equation (20);
[0094] Based on the two established classification decision trees, the samples... The predicted values are respectively and Then the sample The probability of belonging to SDC As shown in equation (20):
[0095]
[0096] Step 4.2.4: Train an XGBoost-based fault type prediction model based on the prediction function;
[0097] XGBoost (eXtreme Gradient Boosting) improves weak classifiers by fitting residuals, calculating residuals for each label value category. and The second round of training begins, with the inputs labeled 1 as follows: , Obtain the prediction function for the second round. By continuously fitting the residuals, the final prediction model is obtained, as shown in equation (21):
[0098]
[0099] in, For the first The prediction function obtained from rounds of training The number of iterations; the predicted probability. For the model to input feature vectors The prediction result is The probability of;
[0100] Step 5: Based on the model prediction results, automatically classify the fault types caused by soft errors at the source program fault points and identify key fault points. The specific implementation method is as follows:
[0101] Step 5.1: Based on the fault prediction results, automatically classify the fault types caused by soft errors at the source program fault points, identify key fault points, and the identification function is shown in equation (22):
[0102]
[0103] Among them, according to the fault point representation method in the fault model in step 3 , for One of the fault points, For the fault point in step 4.2.3 The predicted probability of SDC (Special Damage Contribution) caused by the fault type during program execution; based on the prediction function obtained in step 4.2.3. Calculate the probability of a failure when the target routing algorithm experiences a unit flip;
[0104] Step 5.2, according to The value is used to determine whether it is a critical fault point. When the value is greater than the threshold, it will be identified as a critical fault point.
[0105] In one embodiment, a critical fault point identification system based on the XGBoost routing algorithm is provided, the system comprising:
[0106] The first module is used to divide the different execution stages of the target routing algorithm, analyze the output results of each stage of the program, and establish a preliminary fault model.
[0107] The second module is used to conduct random fault injection experiments on the routing algorithm source program and extract fault point features by combining fault injection information.
[0108] The third module is used to improve the target routing algorithm fault model based on the characteristics of the fault points and to construct a sample dataset by combining the program output results.
[0109] The fourth module is used to build and train a critical fault point prediction model for the routing algorithm based on XGBoost, and to predict the fault types caused by soft errors at fault points in the source program.
[0110] The fifth module is used to automatically classify the types of faults caused by soft errors in the source program of the routing algorithm based on the model prediction results, and to identify key fault points.
[0111] Specific limitations regarding the XGBoost-based routing algorithm critical fault point identification system can be found in the limitations of the XGBoost-based routing algorithm critical fault point identification method described above, and will not be repeated here. Each module in the aforementioned XGBoost-based routing algorithm critical fault point identification system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0112] In one embodiment, a computer device is provided, 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 perform the following steps:
[0113] Step 1: Divide the target routing algorithm into different execution stages, analyze the output results of each stage, and establish a preliminary fault model;
[0114] Step 2: Conduct random fault injection experiments on the routing algorithm source code, and extract fault point features based on the fault injection information;
[0115] Step 3: Improve the target routing algorithm fault model based on the fault point characteristics, and construct a sample dataset by combining the program output results;
[0116] Step 4: Construct and train a critical fault point prediction model for the routing algorithm based on XGBoost to predict the fault types caused by soft errors at the source program fault points.
[0117] Step 5: Based on the model prediction results, automatically classify the fault types caused by soft errors in the source program of the routing algorithm and identify key fault points.
[0118] For specific limitations on each step, please refer to the limitations on the key fault point identification method of the XGBoost-based routing algorithm mentioned above, which will not be repeated here.
[0119] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0120] Step 1: Divide the target routing algorithm into different execution stages, analyze the output results of each stage, and establish a preliminary fault model;
[0121] Step 2: Conduct random fault injection experiments on the routing algorithm source code, and extract fault point features based on the fault injection information;
[0122] Step 3: Improve the target routing algorithm fault model based on the fault point characteristics, and construct a sample dataset by combining the program output results;
[0123] Step 4: Construct and train a critical fault point prediction model for the routing algorithm based on XGBoost to predict the fault types caused by soft errors at the source program fault points.
[0124] Step 5: Based on the model prediction results, automatically classify the fault types caused by soft errors in the source program of the routing algorithm and identify key fault points.
[0125] For specific limitations on each step, please refer to the limitations on the key fault point identification method of the XGBoost-based routing algorithm mentioned above, which will not be repeated here.
[0126] After training the fault type prediction model, the method of the present invention can automatically predict the program fault type corresponding to the soft error that occurs at the fault point in the program, without the need for a large amount of fault injection time. As shown in Figure 2, the time taken by the method of the present invention to predict the fault type is much shorter than that of the random fault injection experiment.
[0127] The performance metrics of the critical failure point prediction model are quantified using accuracy, recall, F1 score, and precision, and compared with Support Vector Machine (SVM) and Random Forest, such as... Figure 3 As shown, the method of the present invention is superior to other methods.
[0128] In summary, the main idea of the critical fault point identification method based on XGBoost proposed in this invention is to accurately assess the resilience of routing programs to soft errors. Since exhaustively listing fault points requires a lot of resources and time, we extract features that can characterize the program's resilience. Using these heuristic features, we drive a machine learning-based model to reveal the relationship between the resilience of fault points and the features, providing effective support for achieving efficient detection and hardening methods.
[0129] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention without departing from its spirit and scope should be included within the protection scope of the present invention.
Claims
1. An XGBoost-based routing algorithm critical failure point identification method, characterized in that, Includes the following steps: Step 1: Divide the target routing algorithm into different execution stages, analyze the output results of each stage, and establish a preliminary fault model; Step 2: Conduct random fault injection experiments on the routing algorithm source code, and extract fault point features based on the fault injection information; Step 3: Improve the target routing algorithm fault model based on the fault point characteristics, and construct a sample dataset by combining the program output results; Step 4: Construct and train a critical fault point prediction model for the routing algorithm based on XGBoost to predict the fault types caused by soft errors at the source program fault points. Step 5: Based on the model prediction results, automatically classify the fault types caused by soft errors in the routing algorithm source program and identify key fault points; The method for constructing the preliminary fault model in step 1 is as follows: Step 1.1: Based on the execution flow of the dynamic routing protocol, the target routing algorithm is logically divided into four stages: collecting dynamic topology information, constructing the target network, updating routing information, and forming a routing table. Phase of collecting dynamic topology information: Step 1.2, collect dynamic topology information, nodes send state information to each other, the connection weight between directly connected nodes is ; Target network construction phase: Step 1.3, constructing the target network, which is represented by a graph model where the set of nodes in the network is described as , M is the number of nodes, and the set of edges is described as , where the edges represent the links between the nodes. The target network is constructed using an adjacency matrix and a weight matrix, where the adjacency matrix is a two-dimensional matrix containing the connection information in the graph, and for the model , an adjacency matrix of order is constructed whose elements are generated in the following manner: In the formula, This represents the adjacency matrix of the target network. Represents nodes in the network and nodes The connection status, For describing the set of edges The element in the node, if the node and nodes If connected, the corresponding state value is... The value is 1, otherwise the corresponding state value is... The value is 0; further, construct the weight matrix. This is a two-dimensional matrix containing the connection weights between nodes, constructed based on the dynamic topology information collected in the first phase. 1-th order matrix Its elements are generated in the following way: In the formula, Further represented as nodes after adding connection weights and nodes The connection state, if node i and node j are connected, then the corresponding value For weight If they are the same node, then the corresponding value The value is 0; if node i and node j are not connected, then the corresponding value is... =∞; Update routing information phase: Step 1.4: Update routing information and run the shortest path algorithm Dijkstra's algorithm, based on the weight matrix generated during the target network construction phase. The path metric between nodes is determined by the connection weights. Given a set of nodes, calculate the shortest path between nodes in a network. any node The shortest path to the remaining nodes is expressed as follows: In the formula, Represents a node With network node set The set of shortest paths to the remaining nodes, and the elements in the set. Representing nodes respectively With the other nodes The shortest path between; The routing table formation phase: Step 1.5: A routing table is created. Based on the shortest paths between nodes calculated during the routing information update phase, routing information is generated for the transmission paths from the current node to other nodes in the network. For each node... The routing table contains a set of routes from itself to nodes. The path and next-hop information of the remaining nodes are represented as follows: In the formula, Represents a node The resulting routing table contains a set of shortest paths. and the next hop node ; Step 1.6: Introduce transient faults during the execution of the target routing algorithm. Based on the collected runtime information, construct a fault model for the target routing algorithm. Considering the different stages of the target routing algorithm where single-event effects occur, and the impact of faults on the output results, a preliminary fault model for the target routing algorithm is constructed. Represented as: In the formula, Indicates the locations in the program affected by radiation, respectively by and This indicates the different stages of the target routing algorithm corresponding to the fault location. , This indicates the specific fault point in the corresponding stage. This indicates the impact of a fault on the output at each stage, initially represented as an error in the output result. And the output is correct ; Step 4 involves constructing a key failure point prediction model. The model building process includes two stages: feature vector construction and prediction model construction. The specific steps are as follows: Step 4.1: Construct the feature vector of fault points in the target routing algorithm based on the fault model; Step 4.2, construct and train a fault type prediction model based on XGBoost; specifically including: Step 4.2.1: Based on the feature vectors constructed in Step 4.1, construct the dataset as shown in the following formula. : in, Indicates the first Feature vectors of training samples , Indicates the first Label values of training samples ; Step 4.2.2: Predict the type of failure caused by a soft error at the fault point according to the following formula; For the feature vector of the fault point Using sample labels respectively The values are 0 and Two classification decision trees are built with a value of 1, and the corresponding prediction function is: and , The calculation method is shown in the following formula: Among them, feature vectors are selected sequentially. The feature values, Represents the dataset The set of samples that meet the value of this feature. For the remaining sample set, Describes any sample in the set. and They represent and The label value corresponding to this sample and The average number of occurrences, and These represent the number of times each occurrence occurs; Step 4.2.3: Calculate the probability of fault type SDC according to the following formula; Based on the two established classification decision trees, the samples... The predicted values are respectively and Then the sample The probability of belonging to SDC for: Step 4.2.4: Train an XGBoost-based fault type prediction model based on the prediction function; XGBoost improves weak classifiers by fitting residuals, calculating residuals for each label value and category. and The second round of training begins, with the inputs labeled 1 as follows: , Obtain the prediction function for the second round. By continuously fitting the residuals, the final prediction model is obtained, as shown in the following equation: in, For the first The prediction function obtained from rounds of training The number of iterations; the predicted probability. For the model to input feature vectors The prediction result is The probability of.
2. The method for identifying key fault points in the XGBoost-based routing algorithm according to claim 1, characterized in that, The fault point features in step 2 correspond to the fault model initially constructed in step 1. In The feature extraction method is as follows: Introducing transient faults at the instruction level, the sequence of instructions dynamically executed for each stage of the target routing algorithm. The first of the included The characteristic representation method of the fault point is as follows: In the formula, Representation phase The first stage of a certain period One instruction, This indicates the instruction type of the instruction. The storage unit representing the operands of an instruction, specifically the register or memory involved in the instruction operation. This indicates that a bit flip occurs in the corresponding memory cell at the 1st... The first bit, i.e., the first bit of the instruction operand register. Bit or a memory address According to the method of representing the fault point Extract the following information: Fault point characteristics Flip position , Storage unit name The algorithm for constructing the feature vector of the fault point is as follows: Step 2.1, construct the instruction type for the target routing algorithm fault point as shown in the following formula. ; Based on the static instruction set contained in the source program, there are eight types: add, cmp, leave, mov, pop, store, test, and xor. When a soft error occurs at a fault point, the corresponding instruction type takes a value of 1; otherwise, it takes a value of 0, corresponding to the fault point in the formula in step 1.
5. In ; Step 2.2, construct the storage unit type characteristics of the fault point as shown in the following formula. ; in, This indicates the register name corresponding to the instruction operand being a register. This refers to the memory address corresponding to an instruction operand that is a memory unit. Corresponding to the fault point in the formula in step 1.5 In ; Step 2.3: Construct the flip-bit feature of the fault point as shown in the following formula. ; Among them, the flipped bit feature From the position of the flip bit and flip direction constitute, For the storage unit's first Bit flipping occurs when the instruction operand's storage location is a register in the communication interface. This represents the total number of bits in the register. The bit flip direction at which a unit flip occurs is divided into 0→1 and 1→0. When the flip direction is 1→0, this feature value is 1; otherwise, it is 0, corresponding to the fault point in the formula in step 1.
5. In .
3. The method for identifying key fault points in the XGBoost-based routing algorithm according to claim 2, characterized in that, The improved fault model based on the fault point characteristics in step 3 is shown in the following formula: In the formula, the fault model It consists of a set of fault points and a set of corresponding fault types. The set of fault points... Different stages of the target routing algorithm Characteristics of fault points in stages The Cartesian product is obtained; This is a set of fault types when a unit flip occurs at a fault point. Based on the impact of soft errors on the program output, the fault types are divided into three categories: error, masked, and sdc. Error represents explicit faults such as program crashes or hangs without output; masked represents potential faults such as soft errors being masked in the program and having no impact on the output; and silent data corruption (sdc) represents implicit faults such as program output inconsistent with normal output. The data is classified according to the different fault types to construct a sample dataset.
4. The method for identifying key fault points in the XGBoost-based routing algorithm according to claim 1, characterized in that, Step 4.1 specifically includes: Step 4.1.1, based on the fault model established in Step 3 From fault point information Construct the target routing algorithm fault location features as shown in the following formula. : in, , and Corresponding to In and ; Step 4.1.2, based on the fault model established in Step 3 The fault point is located in the execution phase. This can be further expressed as follows: Among them, using express It includes four stages. The number of instructions contained in each stage; Step 4.1.3: Traverse the sample dataset and calculate the output results of the program after fault injection. The element in the text defines the tag. m is the total number of samples in the dataset. Indicates the first The label value of each sample represents the fault type corresponding to that fault point sample; Represented as: Step 4.1.4: Calculate according to the formulas in Steps 4.1.2 to 4.1.3 respectively. The impact of each stage on the program output Let set , According to the sample dataset Value division: when At that time ,when At that time , and They represent and The number of samples in the sample dataset; for the first sample in the sample dataset From each sample, the corresponding execution stage is obtained. and the total number of instructions contained in this stage. Let the stage where the fault point is located affect the program output as follows: The calculation method is shown in the following formula: in, and Based on the label values of the entire sample dataset The number of samples contained in each partition. For the stage Each stage after segmentation includes label values. The number of samples; This represents the number of instructions contained in the instruction sequence of this stage. This represents the total number of instructions contained in the executable program of the routing algorithm. Step 4.1.5: Construct the fault point feature vector based on the formulas in Steps 4.1.1 and 4.1.
4. , is represented as: in, The location characteristics of the fault point This describes the impact of the fault location on the program output.
5. The method for identifying key fault points in the XGBoost-based routing algorithm according to claim 1, characterized in that, Step 5 involves identifying key fault points based on the prediction results. The specific steps are as follows: Step 5.1: Based on the fault prediction results, automatically classify the fault types caused by soft errors at the source program fault points, identify key fault points, and use the following identification function: Among them, according to the fault point representation method in the fault model in step 3 , for One of the fault points, For the fault point in step 4.2.3 The predicted probability of SDC (Special Damage Control) caused by the type of fault during program execution; Step 5.2, according to The value is used to determine whether it is a critical fault point. When the value is greater than the preset threshold, it will be identified as a critical fault point.
6. A critical fault point identification system for XGBoost-based routing algorithm based on the identification method according to any one of claims 1 to 5, characterized in that, The system includes: The first module is used to divide the different execution stages of the target routing algorithm, analyze the output results of each stage of the program, and establish a preliminary fault model. The second module is used to conduct random fault injection experiments on the routing algorithm source program and extract fault point features by combining fault injection information. The third module is used to improve the target routing algorithm fault model based on the characteristics of the fault points and to construct a sample dataset by combining the program output results. The fourth module is used to build and train a critical fault point prediction model for the routing algorithm based on XGBoost, and to predict the fault types caused by soft errors at fault points in the source program. The fifth module is used to automatically classify the types of faults caused by soft errors in the source program of the routing algorithm based on the model prediction results, and to identify key fault points.
7. A computer 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 steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.