Parallelized cut set simplification method based on prime number compression coding
By using a parallelized prime number compression encoding method, the cut set simplification process is transformed into integer division judgment, realizing efficient parallel computation of cut set simplification. This solves the problem of low efficiency in existing cut set simplification technologies and is suitable for fault tree analysis of large-scale complex systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HARBIN ENG UNIV
- Filing Date
- 2025-12-23
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies suffer from serialized computation processes for cut set simplification, low parallel efficiency, data structures that do not match the GPU parallel architecture, and an inability to efficiently solve the problem of finding the minimum cut set in large-scale complex systems.
A parallelized prime-number-based compression coding method is adopted to convert the cut sets into equal-length binary vectors to form a two-dimensional matrix. The prime-number coding is used to generate compressed integer codes. The matrix pairs are constructed through a broadcast mechanism for integer division judgment, the cut set index list is dynamically updated, and non-minimum cut sets are eliminated to achieve fully parallelized computation.
It significantly improves the efficiency of cut set simplification, reduces computational complexity and memory usage, ensures the accuracy of results and computational stability, makes full use of the parallel computing capabilities of GPUs, and is suitable for fault tree analysis of large-scale complex systems.
Smart Images

Figure CN122019943A_ABST
Abstract
Description
Technical Field
[0001] This involves the field of fault tree analysis, and in particular, high-efficiency parallelized fault tree cut set solutions. Background Technology
[0002] In the field of system safety and reliability analysis, Fault Tree Analysis (FTA) is a classic and widely used quantitative deductive analysis method. By hierarchically modeling the system's structure, function, and failure logic, fault trees help engineers identify all the basic event combinations that lead to the system's top event (system failure state). These combinations are called cut sets. The smallest combination of events that cannot be further simplified is called the Minimal Cut Set (MCS). The solution directly reflects the system's weak points and potential risk paths, and is an important foundation for reliability assessment, risk control, and system redundancy design.
[0003] Existing technologies primarily employ element-wise comparisons using logical OR bitwise operations for subset determination. When dealing with millions of cut sets, this method, requiring nearly O(n²) comparisons, exhibits extremely high computational complexity and very long processing time, becoming a major performance bottleneck in the entire reliability analysis process. Furthermore, simplification methods based on prime numbers are mostly serially designed, making it difficult to effectively utilize the powerful parallel computing capabilities of modern multi-core CPUs and GPUs (Graphics Processing Units), thus failing to meet the ever-increasing demands for analysis efficiency from large-scale complex systems.
[0004] In summary, existing technologies suffer from drawbacks such as serialization of the cut set simplification calculation process, low parallel efficiency, data structure mismatch with GPU parallel architecture, and inability to efficiently solve for the minimum cut set of large-scale complex systems. Summary of the Invention
[0005] To address the shortcomings of existing technologies, such as serialization of cut set simplification calculations, low parallel efficiency, data structure incompatibility with GPU parallel architecture, and inability to efficiently solve for the minimum cut set of large-scale complex systems, the technical solution provided by this invention is as follows: A parallelized cut-set simplification method based on prime number compression coding includes: The steps involve converting multiple cut sets to be simplified into binary vectors of equal length and concatenating them row by row to form a two-dimensional cut set matrix. Under a parallel computing architecture, the number of "1"s in each row is counted and the cut sets are grouped according to the number of events, forming cut set subgroups arranged in ascending order of the number of events. The steps are as follows: assign a unique prime number code to each basic event and generate a mapping table between events and prime numbers; multiply the prime number codes corresponding to each "1" in each row of the previously output cut set matrix to obtain the compressed integer code of the cut set; and finally form a prime number compressed code vector arranged by subgroups. The steps are as follows: Select each subgroup of the previous output in pairs according to the number of events, with the subgroup with fewer events as the comparison group and the subgroup with more events as the reference group. Construct the comparison matrix and the reference matrix using the broadcast mechanism, so that each pair of elements in the two matrices represents a set of cut set comparison relations, and output the matching matrix pairs with the same dimension. In a parallel computing architecture, the previous output matrix pair is divided element-wise. If an element in the reference matrix is divisible by the corresponding element in the compared matrix, it is marked as 1 in the Boolean matrix; otherwise, it is marked as 0. This process generates a Boolean judgment matrix representing the cut set inclusion relationship. Based on the previous output Boolean judgment matrix result, remove records identified as non-minimum cut sets, dynamically update the list of valid cut set indices to reduce the scale of subsequent calculations, and output the updated cut set set that has been removed as non-minimum cut sets. Repeat the matrix construction, division judgment and non-minimum cut set removal process until all subgroups have been compared, and output the final set of cut sets that are not included as the minimum cut set result.
[0006] Furthermore, in a preferred embodiment, when performing structured parsing on the input fault tree model, a parallel computation method of reduction within thread blocks is used to count the number of "1"s in each row of the cut set matrix, and step-by-step accumulation is achieved by sharing memory between threads.
[0007] Furthermore, in a preferred embodiment, when assigning a unique prime number code to each basic event, the prime numbers are assigned according to the frequency of occurrence of the basic events, with higher-frequency events being assigned smaller prime numbers.
[0008] Furthermore, in a preferred embodiment, when constructing the comparison matrix and the reference matrix, the data is synchronously expanded along the row and column dimensions through a GPU broadcast mechanism to avoid cyclic copying operations.
[0009] Furthermore, in a preferred embodiment, when performing element-wise division judgment on the matrix pair, a block parallel processing strategy is adopted, dividing the division judgment matrix into multiple sub-blocks, with independent thread blocks performing the division judgment and input data being cached through shared memory.
[0010] Furthermore, in a preferred embodiment, when eliminating non-minimum cut sets based on the Boolean judgment matrix result, the list of valid cut set indices is updated in real time so that the eliminated cut sets no longer participate in subsequent matrix construction operations.
[0011] A parallelized cut-set simplification device based on prime number compression coding is also provided, comprising: The module converts multiple cut sets to be simplified into binary vectors of equal length and concatenates them row by row to form a two-dimensional cut set matrix. Under the parallel computing architecture, the number of "1"s in each row is counted and the cut sets are grouped according to the number of events, forming a module of cut set subgroups arranged in ascending order of the number of events. Assign a unique prime number code to each basic event and generate a mapping table between events and prime numbers. Multiply the prime number codes corresponding to each "1" in each row of the previously output cut set matrix to obtain the compressed integer code of the cut set. Finally, form a module that forms a prime number compressed code vector arranged by subgroup. The module selects each subgroup from the previous output in pairs according to the number of events, with the subgroup with fewer events as the comparison group and the subgroup with more events as the reference group. It uses a broadcast mechanism to construct the comparison matrix and the reference matrix, so that each pair of elements in the two matrices represents a set of cut sets for comparison, and outputs the matching matrix pairs with the same dimension. In a parallel computing architecture, an element-wise division check is performed on the previously output matrix pair. If an element in the reference matrix is divisible by the corresponding element in the compared matrix, it is marked as 1 in the Boolean matrix; otherwise, it is marked as 0. This module generates a Boolean check matrix representing the cut set inclusion relationship. Based on the previous output Boolean judgment matrix result, remove records identified as non-minimum cut sets, dynamically update the list of valid cut set indices to reduce the scale of subsequent calculations, and output the updated cut set set that has been removed as non-minimum cut sets. The module repeatedly performs matrix construction, division judgment and non-minimum cut set removal processes until all subgroups have been compared, and outputs the final set of cut sets that were not included as the minimum cut set result.
[0012] A computer storage medium is also provided for storing a computer program, which, when read by the computer, executes the method.
[0013] A computer is also provided, including a processor and a storage medium, wherein the computer executes the method when the processor reads a computer program stored in the storage medium.
[0014] A computer program product is also provided, which, when executed, implements the method described.
[0015] Compared with the prior art, the advantages of the technical solution provided by the present invention are as follows: This scheme uniquely encodes the basic events in the fault tree using prime numbers, mapping the cut set from an event set to an integer product. This transforms the traditional set inclusion judgment into an integer division judgment, significantly simplifying the judgment logic. Since integer division can be executed directly in parallel at the hardware level, compared to previous algorithms based on Boolean logic or set comparisons, this scheme reduces the complexity of a single comparison operation from exponential to constant time, achieving an order-of-magnitude improvement in simplification efficiency. Traditional methods typically require pairwise comparisons and bitwise logical judgments, while this scheme utilizes the characteristics of integer arithmetic to avoid string and vector traversal processes, fundamentally improving the subset judgment speed.
[0016] This scheme leverages the unique factorization property of prime product to ensure mathematical determinism and unambiguity in determining inclusion relationships between cut sets, thus avoiding problems related to non-unique logical reasoning or search paths. Compared to previous simplification algorithms based on binary decision graphs or heuristic search, this scheme does not rely on node expansion or path pruning, eliminating the risks of computational path dependence and result instability, and guaranteeing the accuracy and consistency of the simplification results. Furthermore, the amount of data after integer compression is significantly reduced, resulting in lower memory usage and significantly reduced transmission and storage overhead compared to traditional 0-1 matrices or Boolean representations.
[0017] This scheme, at the algorithmic structure level, introduces a matrix broadcast mechanism to transform the traditional nested loop comparison process into a one-time matrix division operation, allowing the entire simplification process to be directly mapped to the GPU's single instruction multiple data (SID) architecture. The construction method of matrices A and B automatically maps each pair of cutset correspondences to element positions in the matrices, enabling parallel processing by GPU thread blocks. Compared to previous parallelization methods that used subset judgment as a multi-threaded task allocation, this scheme achieves global parallelization at the architecture level without loops or synchronization waits, fully leveraging the large-scale data throughput capabilities of modern GPUs.
[0018] This scheme dynamically updates the list of valid cutset indices during the computation process by grouping by the number of cutset events and employing an "instant removal" mechanism. This ensures that non-minimum cutsets are immediately excluded from subsequent calculations upon identification. This mechanism avoids redundant computations that involve repeated invalid comparisons in traditional methods, leading to a continuous decrease in computational load in subsequent rounds and achieving dynamic compression of computational resources. Compared to heuristic algorithms that rely on heuristic factors or confidence thresholds for cutset selection, this scheme's instant removal strategy significantly reduces computational redundancy without compromising correctness, thereby improving the overall scalability and resource utilization of the algorithm.
[0019] This scheme optimizes the growth rate of integer multiplication by assigning smaller prime number codes to frequently occurring basic events, avoiding the risk of integer overflow caused by excessively large factor products, and improving numerical stability in GPU integer division calculations. Compared to schemes that simply use arithmetic progression or random coding, this design can maintain a balanced data distribution and controllable numerical range under large-scale event sets, thereby ensuring stable computation and reproducible results.
[0020] It is applicable to the rapid solution of fault tree minimum cut sets and reliability analysis of large-scale complex systems. Attached Figure Description
[0021] Figure 1 The overall process of the representation method; Figure 2 Representation of prime number encoding method; Figure 3 This represents the process of compressing a cut set matrix into a prime number encoded vector; Figure 4 This represents the result of constructing the matrix after broadcasting. Detailed Implementation
[0022] To make the advantages and benefits of the technical solution provided by the present invention clearer, the technical solution provided by the present invention will now be described in further detail with reference to the accompanying drawings, specifically: Implementation Method 1: This implementation method provides a parallelized cut-set simplification method based on prime number compression coding, including: The steps involve converting multiple cut sets to be simplified into binary vectors of equal length and concatenating them row by row to form a two-dimensional cut set matrix. Under a parallel computing architecture, the number of "1"s in each row is counted and the cut sets are grouped according to the number of events, forming cut set subgroups arranged in ascending order of the number of events. The steps are as follows: assign a unique prime number code to each basic event and generate a mapping table between events and prime numbers; multiply the prime number codes corresponding to each "1" in each row of the previously output cut set matrix to obtain the compressed integer code of the cut set; and finally form a prime number compressed code vector arranged by subgroups. The steps are as follows: Select each subgroup of the previous output in pairs according to the number of events, with the subgroup with fewer events as the comparison group and the subgroup with more events as the reference group. Construct the comparison matrix and the reference matrix using the broadcast mechanism, so that each pair of elements in the two matrices represents a set of cut set comparison relations, and output the matching matrix pairs with the same dimension. In a parallel computing architecture, the previous output matrix pair is divided element-wise. If an element in the reference matrix is divisible by the corresponding element in the compared matrix, it is marked as 1 in the Boolean matrix; otherwise, it is marked as 0. This process generates a Boolean judgment matrix representing the cut set inclusion relationship. Based on the previous output Boolean judgment matrix result, remove records identified as non-minimum cut sets, dynamically update the list of valid cut set indices to reduce the scale of subsequent calculations, and output the updated cut set set that has been removed as non-minimum cut sets. Repeat the matrix construction, division judgment and non-minimum cut set removal process until all subgroups have been compared, and output the final set of cut sets that are not included as the minimum cut set result.
[0023] When performing structured parsing of the input fault tree model, a parallel computation method of reduction within thread blocks is used to count the number of "1"s in each row of the cut set matrix, and step-by-step accumulation is achieved by sharing memory between threads.
[0024] When assigning a unique prime number code to each basic event, the prime numbers are allocated according to the frequency of occurrence of the basic event, with higher frequency events being assigned smaller prime numbers.
[0025] When constructing the comparison matrix and the reference matrix, the data is synchronously expanded along the row and column dimensions through the GPU broadcast mechanism to avoid circular copying operations.
[0026] When performing element-wise division checks on matrix pairs, a block-based parallel processing strategy is adopted, dividing the division check matrix into multiple sub-blocks, with each sub-block performing the division check and input data being cached through shared memory.
[0027] When removing non-minimum cut sets based on the Boolean judgment matrix results, the list of valid cut set indices is updated in real time so that the removed cut sets no longer participate in subsequent matrix construction operations.
[0028] Implementation Method Two: This implementation method is a further detailed description of the technical solution provided in Implementation Method One, specifically: First, a fault tree model is performed on the system to be analyzed, extracting information on the top event, gate events, and basic events to form a complete fault tree model describing the system's failure logic structure. For the input logic of each gate event, all cut sets in the fault tree are encoded in binary form, and a cut set vector is constructed using basic events arranged in a fixed order. Each cut set is converted into a 0-1 vector of length M, where 1 indicates that the basic event corresponding to that position appears in the cut set, and 0 indicates that it does not appear. The binary vectors of all cut sets are concatenated row by row to form a two-dimensional cut set matrix, where each row of the matrix represents a cut set, and each column represents a specific basic event. To improve computational efficiency, a GPU parallel computing framework is used to load and store the cut set matrix during the initialization phase. Parallel thread blocks count the number of "1"s in each row of the cut set matrix in GPU memory to obtain the number of basic events contained in each cut set. During computation, multiple threads within the thread block collaboratively perform a step-by-step reduction operation, summing the 1s in each row to obtain the number of events in the current cut set. Based on the number of events, the cutsets are divided into different subgroups, with the subgroups having fewer events listed first and the subgroups having more events listed last, thus forming a cutset grouping data structure arranged in ascending order of the number of events. After this step, the original cutset data is standardized into a matrix structure suitable for parallel computing, and the output includes the cutset matrix corresponding to each subgroup and its index range.
[0029] Next, a prime number encoding mapping is performed for each basic event. During initialization, the system generates a unique sequence of prime numbers, such as 2, 3, 5, 7, 11, 13, etc., and assigns a unique prime number code to each event based on its frequency of occurrence. Higher-frequency events are preferentially assigned smaller prime numbers to reduce the probability of large integers appearing in subsequent product calculations. The system establishes a lookup table for the mapping relationship between events and prime numbers and stores it in constant memory on the GPU for fast access later. Subsequently, for each row of the cut set matrix, the program iterates through all elements. When a position is found to be 1, it looks up the prime number code of the event corresponding to that position in the table and multiplies all corresponding prime numbers sequentially to obtain the unique integer code for that cut set. The product calculation process is completed by parallel threads within the GPU. Finally, the product codes of all cut sets form a prime number compressed encoding vector, replacing the original 0-1 matrix representation. Unlike traditional Boolean vectors, the prime number encoding result represents the set relationship in integer form, providing a mathematical basis for subsequent parallel integer division checks. The output of this step is a set of compressed encoding vectors grouped by the number of events.
[0030] Then, any pair of subgroups is selected for comparison, with the i-th group having fewer events as the compared group and the j-th group having more events as the reference group. The system constructs two broadcast matrices on the GPU. The compressed encoding vectors of the compared group are copied column-wise to form matrix A, ensuring that each row of matrix A contains the same cutset encoding. The compressed encoding vectors of the reference group are copied row-wise to form matrix B, ensuring that each column of matrix B contains the same reference cutset encoding. In this way, each corresponding position in matrix A and matrix B represents a combination of cutsets to be compared. The matrix construction process utilizes the GPU's broadcast mechanism, eliminating the need for explicit loops and enabling efficient expansion of batch data. After matrix construction, all pairings of compared and reference cutsets are stored in matrix form, forming a two-dimensional dataset that can be simultaneously input into integer division units.
[0031] Subsequently, an element-wise division operation is performed on matrices A and B on the GPU. For any pair of elements A in the matrices... ij With B ij Perform an integer division check when B ij Able to be A ij When divisible, the corresponding position in the output Boolean matrix is 1, indicating that the cut set in the compared group is a subset of the cut set in the reference group; when B ij Cannot be A ij When divisible, the output is 0, indicating that there is no inclusion relationship between the two. The divisibility check is implemented using modulo arithmetic, that is, checking if the remainder is zero. All the results are summarized into a Boolean matrix C, where each element clearly identifies the subset relationship between the two cut sets. Unlike traditional double loop logic, this process does not require traversal comparison; all element operations are executed synchronously in a GPU multi-threaded environment, greatly improving the speed of the check.
[0032] Next, a Boolean matrix C is used to filter non-minimum cut sets. When a column of matrix C contains at least one element with a value of 1, it indicates that the cut set corresponding to that column contains smaller cut sets, and is therefore determined to be a non-minimum cut set. The system updates the cut set index list in real time based on the judgment results, immediately removing records marked as non-minimum cut sets so they no longer participate in subsequent matrix construction and judgment processes. This immediate removal mechanism is implemented by dynamically maintaining a valid cut set index table, automatically compressing the scale of subsequent calculations after each comparison to avoid repeated participation in invalid comparisons, thereby significantly reducing computational load and memory consumption. The set of cut sets after removal continues to serve as input for the next round of subgroup comparisons.
[0033] Finally, the process of integer division judgment and non-minimum cut set elimination is repeated until all subgroup comparisons are completed, retaining all unincluded cut sets as the final minimum cut set result. The output minimum cut set data represents the smallest basic event combination leading to the top event in the system, and can be directly used for system reliability analysis, risk assessment, and vulnerability identification. This scheme achieves a unique numerical representation of cut sets through prime number encoding, transforms massive pairwise set comparisons into a single matrix division operation through matrix broadcasting, achieving full parallelization of the comparison process, and achieves efficient result filtering through Boolean judgment matrices and dynamic elimination mechanisms. Compared with traditional Boolean or bitwise operation algorithms, this method has significant advantages in algorithm complexity, memory efficiency, and parallel acceleration capabilities, enabling high-precision and high-efficiency minimum cut set solutions in fault tree analysis of large-scale complex systems.
[0034] Implementation Method 3: This implementation method is described in detail with reference to the accompanying drawings. Specific embodiments are provided to further illustrate the technical solutions offered above. Specifically: A parallelized cut-set simplification method based on prime number compression coding, such as Figure 1 This includes the following steps: Step 1: Perform fault tree analysis on a pressurized water reactor. Represent multiple cut sets to be simplified as equal-length binary 0-1 vectors. Concatenate all cut sets row-wise to form a two-dimensional cut set matrix. Under a GPU parallel architecture, count the number of "1"s in each row of this matrix and group the cut sets accordingly, forming several cut set subgroups arranged in ascending order of the number of events. For example, number each basic fault event in the emergency core cooling system (e.g., E1: High-pressure safety injection pump A failure, E2: Emergency diesel engine B failure, E3: Outlet valve C erroneously closed). A cut set CS1 = {E1, E3} (pump A failure and valve C erroneously closed) that causes system failure is converted into a vector [1, 0, 1]. A cut set CS2 = {E1, E2, E3} is converted into [1, 1, 1]. After parallel computation on the GPU, CS1 (containing 2 events) is assigned to group 2; CS2 (containing 3 events) is assigned to group 3.
[0035] Step 2: For each basic event, predefine a unique prime number code. Use the product of the prime numbers of the basic events corresponding to "1" in each cutset vector as the compressed integer code for that cutset, obtaining the compressed code vector for each subgroup. For example, E1 (Pump A malfunction): 2; E2 (Diesel Engine B malfunction): 3; E3 (Valve C malfunction): 5. The compressed code for cutset CS1 is: 2 × 5 = 10. The compressed code for cutset CS2 is: 2 × 3 × 5 = 30.
[0036] Step 3: For each pair of subsets (group i and group j, where the number of cut set events in group i is less than that in group j), using group i as the comparison group and group j as the reference group, construct two broadcast matrices in the GPU parallel computing architecture: copy the compressed encoded vector of the comparison group column-wise to form matrix A, and copy the compressed encoded vector of the reference group row-wise to form matrix B. The comparison group (group 2): contains thousands of second-order cut sets, for example: CS1 = {Pump A malfunction, Valve C erroneously closed} is encoded as 10; CS2 = {Diesel engine B malfunction, Valve D erroneously closed} is encoded as 21, and so on, forming the vector Va = [10, 21, ...]. Similarly, the reference group (group 3): contains an even larger number of third-order cut sets, for example: CS3 = {Pump A malfunction, Diesel engine B malfunction, Valve C erroneously closed} is encoded as 30; CS4 = {Pump A malfunction, Valve C erroneously closed, Valve D erroneously closed} is encoded as 70.
[0037] Form a vector Vb = [30, 70, ...]. Construct two matrices in video memory: Matrix A: Each element of Va (e.g., 10, 21) is broadcast and copied along the row direction, so that each row is the encoding of the same second-order cut set.
[0038] Matrix B: Broadcast and copy the entire vector Vb ([30, 70, ...]) along the column direction so that each column represents a complete set of third-order cut sets.
[0039] Step 4: Perform a one-time element-wise division operation on matrices A and B to generate a Boolean judgment matrix C. When the reference group code value at a certain position in B can divide the comparison group code value at the corresponding position in A, the position is marked as 1 in the Boolean matrix C, indicating that the corresponding comparison cut set is a subset of the reference cut set; otherwise, it is marked as 0. Step 5: Based on the marker information in the Boolean matrix C, remove all non-minimum cut sets that are contained in other cut sets, retaining only the cut sets that are not contained in other cut sets for subsequent subgroup comparisons, until all subgroup combinations have been compared, and finally returning the set of minimum cut sets. The system detects a "1" in the Boolean matrix C, determining that CS2 (pump A failure + diesel engine B failure + valve C erroneously closed) is a non-minimum cut set. It is immediately removed from the cut set set. After comparing all groups, CS1 is retained because it is not contained in any other cut sets, becoming one of the minimum cut sets in the final report.
[0040] To further understand the present invention, the parallelized cut set simplification method based on prime number compression coding provided by the present invention will be described in detail below with reference to the embodiments. The scope of protection of the present invention is not limited by the following embodiments.
[0041] Example 1 Taking the reliability analysis of the high-pressure safety injection system of a pressurized water reactor as an example, the overall process of a parallel cut-set simplification method based on prime number compression coding is as follows: Figure 1 As shown, it includes the following steps: Step 1: First, perform binary vectorization representation of the cut sets. This embodiment takes the reliability analysis of the high-pressure safety injection system of a pressurized water reactor (PWR) as an example, and the top event (i.e., system failure state) analyzed is "high-pressure safety injection system functional failure". Assume that after preliminary analysis, we identify M basic failure events that constitute the system failure and obtain N cut sets to be simplified.
[0042] Assume the key basic events involved in the system (M=5) include: E1: High-pressure safety pump A failed to start due to mechanical failure. E2: High-pressure safety pump B failed to start due to mechanical failure. E3: Emergency diesel generator A failed to provide power. E4: The relevant manual valve V-1 was incorrectly closed. E5: Instrumentation and control system (I&C) issues an error signal. For each cut set to be simplified, it is converted into a binary 0-1 vector of length M. The conversion rule is: if the i-th basic event Ei exists in the cut set, the i-th position of the vector is marked as "1"; otherwise, it is marked as "0". For example, for a cut set CS1 = {E1, E4} that causes the top event to occur (i.e., the high-pressure safety pump A fails to start, and the manual valve V-1 is incorrectly closed), its corresponding binary vector is [1, 0, 0, 1, 0]. Another cut set CS2 = {E1, E3, E5} (i.e., the high-pressure safety pump A fails to start, the emergency diesel generator A fails to supply power, and the control system sends an error signal), its corresponding binary vector is [1, 0, 1, 0, 1]. Through this operation, all N cut sets related to "high-pressure safety system malfunction" are converted into N binary vectors of length M.
[0043] Next, a two-dimensional cutset matrix is constructed. The N binary vectors generated above are concatenated row by row to form an N-row, M-column two-dimensional cutset matrix. In this matrix, each row represents an independent failure scenario (cutset), and each column corresponds to a specific basic failure event (such as E1 to E5). This matrix-based data structure facilitates subsequent parallel data processing.
[0044] Next, the cutset matrix is counted row by row using the GPU parallel architecture. The purpose of this operation is to obtain the number of basic failure events contained in each cutset. For example, for the vector [1, 0, 1, 0, 1] representing cutset CS2, this step will calculate that it contains 3 basic events. Each thread or group of threads on the GPU is responsible for processing one row of the matrix. When processing a single row of data, an efficient parallel algorithm of in-thread reduction is used. Multiple threads within a thread block work collaboratively, quickly accumulating the count of all "1"s in a row to a final value through step-by-step, pairwise summation. Its computational efficiency is far higher than the traditional CPU serial loop accumulation method.
[0045] Finally, the cut sets are grouped according to the number of events counted, forming several cut set subgroups, and these subgroups are arranged in ascending order of the number of events. For example, all cut sets containing only 2 basic events (such as CS1) will be grouped into one group, and all cut sets containing 3 basic events (such as CS2) will be grouped into another group, with the 2-event group preceding the 3-event group.
[0046] After step 1, the original unordered set of cut sets related to the functional failures of the pressurized water reactor high-pressure safety injection system is transformed into a structured sequence of cut set subsets arranged in ascending order of the number of failure events. This provides ideal input data for the subsequent parallel subset removal operation based on prime number encoding. Step 2: First, uniquely encode all M basic events in the system using prime numbers. This prime number encoding process is completed once during the computation initialization phase. The system pre-generates a sufficiently long sequence of prime numbers (e.g., 2, 3, 5, 7, 11, ...). Then, for each basic event Ei (i=1, 2, ..., M), a unique prime number is assigned from this sequence as its encoding value. For example, E1 corresponds to 2, E2 corresponds to 3, E3 corresponds to 5, and so on. Once this "basic event-prime number" mapping is established, it is loaded as a lookup table and stored in resident GPU memory (such as constant memory or global memory) for high-speed, latency-free lookup during subsequent computations.
[0047] The assignment strategy for the mapping between events and prime numbers considers the frequency of occurrence of the basic events. Specifically, smaller prime numbers are assigned to basic events with higher frequency occurrences, while larger prime numbers are assigned to low-frequency events. This is because high-frequency events appear in more cut sets, and using small prime numbers as their encoding keeps the compressed encoding values of a large number of cut sets within a relatively small range, which helps reduce the risk of integer overflow during computation.
[0048] After the prime number mapping of the basic events is completed, the next step is to perform compressed integer encoding on each cut set grouped in step 1. Taking the cut sets in Figure 2 as an example, for each cut set (i.e., each row binary vector in the cut set matrix), the algorithm traverses all elements in its vector. When encountering a position with a value of "1", the prime number encoding of the corresponding basic event is obtained by looking up the table. Then, all the prime number encodings of the basic events corresponding to the positions with a value of "1" in the cut set vector are multiplied together. This final product is the compressed integer encoding of the cut set. Finally, a cut set set matrix is compressed into a prime number encoding vector, as shown in Figure 3 .
[0049] After the above process, two physical failure scenarios (i.e., cut sets) from a pressurized water reactor, for example: The cut set composed of "High-pressure safety injection pump A fails to start due to mechanical failure" and "The related manual valve V-1 is wrongly closed".
[0050] The cut set composed of "High-pressure safety injection pump B fails to start due to mechanical failure" and "Emergency diesel generator A fails to supply power successfully".
[0051] are respectively compressed into two unique integer encoding values (i.e., the product of prime numbers). The first integer encoding 14 (obtained by multiplying the prime numbers 2 and 7) represents the complete failure scenario of "Pump A fails and valve V-1 is wrongly closed". The second integer encoding 15 (obtained by multiplying the prime numbers 3 and 5) represents the other complete failure scenario of "Pump B fails and diesel engine A fails".
[0052] Step 3: Step 3-1: The present invention first determines the sub-group pairs to be compared. To fundamentally eliminate invalid and redundant comparisons, the algorithm sets a clear rule: for the sub-group sequence formed in step 1 and sorted in ascending order of the number of events, the i-th group will only be compared with the j-th group if and only if i < j. In each such pair of comparisons, the i-th group with fewer events (assuming it contains m cut set encodings, and the vector formed by its encodings is [a1, a2, ..., a m ) is defined as the compared group (as a potential subset). And the j-th group with more events (assuming it contains n cut set encodings, and the vector formed by its encodings is [b1, b2,..., b n ) is defined as the reference group (as a potential superset). This strategy not only fully conforms to the subset definition but also ensures that each pair of sub-groups is compared only once, thus greatly optimizing the calculation process.
[0053] To make the demonstration of the subsequent steps clearer, we set a specific set of physical failure scenarios (cut sets) and their encoding values.
[0054] Group i (the comparison group, Va): CS1 = {E1, E2} (Pump A + Pump B failure), coding: 2 × 3 = 6 CS2 = {E1, E3} (Pump A + Diesel Engine A fault), coding: 2 × 5 = 10 CS3 = {E2, E5} (Pump B+I&C fault), code: 3 × 11 = 33 Va = [6, 10, 33] Group j (reference group, Vb): CS4 = {E1, E2, E4} (Pump A + Pump B + Valve V-1 fault), coding: 2 × 3 × 7 = 42 CS5 = {E1, E3, E5} (Pump A + Diesel Engine A + I&C Fault), Code: 2 × 5 × 11 = 110 CS6 = {E2, E4, E5} (Pump B + Valve V-1 + I&C fault), code: 3 × 7 × 11 = 231 Vb = [42, 110, 231] In the following steps, we will use vectors Va and Vb to demonstrate the matrix construction and parallel division checks.
[0055] Step 3-2: After determining the comparison group (whose encoding vector is Va=[a1, a2, ..., a...]), m ]) and the reference group (whose encoding vector is Vb=[b1, b2, ..., b n After that, the present invention utilizes the data broadcasting mechanism in the parallel computing architecture to efficiently construct two matrices A and B, each with a dimension of m×n.
[0056] Please see Figure 4 This diagram visually illustrates the construction result of the matrix: Constructing matrix A: Each element a of vector Va... i Copy the vector horizontally n times to form the i-th row of matrix A. Construct matrix B: Take the complete vector Vb as a row and copy it vertically m times to form matrix B.
[0057] After determining the comparison group (whose encoding vector is Va = [6, 10, 33]) and the reference group (whose encoding vector is Vb = [42, 110, 231]), two 3×3 matrices A and B are constructed. Constructing matrix A (the comparison matrix): The encoding vector Va of the comparison group is copied column-wise, or in other words, each element of vector Va is copied horizontally three times to form each row of matrix A. The first element of Va, 6, is copied horizontally to form the first row of A: [6, 6, 6]. The second element of Va, 10, is copied horizontally to form the second row of A: [10, 10, 10]. The third element of Va, 33, is copied horizontally to form the third row of A: [33, 33, 33]. The final matrix A is as follows: The encoding vector Vb of the reference group is copied row by row, or in other words, the complete vector Vb is copied vertically three times to form matrix B. Vb = [42, 110, 231] is placed as the first row. Then Vb is placed as the second row. Finally, Vb is placed as the third row. The final matrix B is: Step 3-3: After the above construction, at any identical position (i, j) (row i, column j) in matrices A and B, the stored value is the i-th code a from the compared group. i and the j-th code b from the reference group j This layout completely "flattens" the operation that originally required m×n independent pairings and maps it to two matrices with the same structure. It ensures that each cutset code in the comparison group is paired with each cutset code in the reference group at the corresponding position in the matrix.
[0058] In our pressurized water reactor example, the physical meaning of this layout is to establish a unique comparison position for each pair of "double failure" and "triple failure" scenarios. For example, at matrix position (2, 1): the value in matrix A is 10, representing the compared cut set CS2={E1, E3} (pump A + diesel engine A failure). The value in matrix B is 42, representing the reference cut set CS4={E1, E2, E4} (pump A + pump B + valve V-1 failure). Therefore, the matrix position (2, 1) is specifically used to determine whether "pump A + diesel engine A failure" is a subset of "pump A + pump B + valve V-1 failure".
[0059] Step 4: Perform element-wise integer division on matrices A and B. For any position (i, j) in matrix A, the computer will determine the element B in matrix B. ijCan it be compared to the corresponding element A in matrix A? ij Divisibility. This judgment is achieved through modulo operation: B ij mod A ij == 0 The result of this parallel computation is stored in a new m×n result matrix C with the same dimensions as A and B. This result matrix C is a Boolean matrix, and the values of its elements are determined according to the following rules: If element B ij Able to be A ij If divisible, then the element C at the corresponding position (i, j) in the resulting matrix C is... ij Set to 1 (or logically True). If element B ij Cannot be A ij Divisible by C ij It is set to 0 (or logically false).
[0060] Each element C in this result matrix C ij Both clearly indicate the result of a subset judgment. C ij = 1 means that the i-th cut set in the comparison group is a subset of the j-th cut set in the reference group. Through this step, the present invention transforms the m×n comparisons that originally required nested loops into a single, efficient matrix operation instruction.
[0061] In our example of a pressurized water reactor, the specific calculation process is as follows: Performing element-wise modulo operations (B mod A) on A and B yields the resulting matrix C: ; According to the rules, positions with a result of 0 are marked as 1, and positions with a result of non-zero are marked as 0, generating the final Boolean judgment matrix: Each element C in this result matrix ij Each instruction explicitly represents the result of a subset judgment. Through this step, the present invention transforms the original nine subset logic comparisons, which required nested loops one by one, into a single, efficient matrix operation instruction, greatly leveraging the advantages of parallel computing.
[0062] Step 5: After completing one round of subgroup comparisons (e.g., group i vs. group j), the system analyzes the Boolean matrix C. Each column of this matrix corresponds to a cut set in the reference group (group j). If at least one element with a value of "1" appears in a column, it means that the cut set corresponding to that column contains a smaller cut set (i.e., a subset from the compared group). By definition, this cut set is determined to be a non-minimum cut set.
[0063] C(1,1)=1: This indicates that the reference cut set CS4 (coded 42) is divisible by the comparison cut set CS1 (coded 6). Physically, this means that the dual failure scenario of "pump A + pump B failure" is a subset of the triple failure scenario of "pump A + pump B + valve V-1 failure".
[0064] C(2,2)=1: This indicates that the reference cut set CS5 (coded 110) is divisible by the comparison cut set CS2 (coded 10). Physically, this means that "Pump A + Diesel Engine A Fault" is a subset of "Pump A + Diesel Engine A + I&C Fault".
[0065] C(3,3)=1: This indicates that the reference cut set CS6 (coded 231) is divisible by the comparison cut set CS3 (coded 33). Physically, this means that "pump B+I&C fault" is a subset of "pump B+valve V-1+I&C fault".
[0066] The cut sets CS1={E1, E2}, CS2={E1, E3}, and CS3={E2, E5} in the comparison group (group i) are not contained in any other cut sets in this round of comparison. Therefore, they are the minimal cut sets.
[0067] In addition, this invention employs an "instantaneous removal" strategy. Once a cutset is identified as non-minimum in the current comparison round, the system immediately excludes it from all subsequent calculations. This operation is achieved by maintaining a dynamic "list of valid cutset indices." The index of a removed cutset is removed from this list. Subsequent subgroup comparisons will construct matrices solely based on this updated (reduced) list of valid cutsets. This means that removed cutsets will no longer appear as comparison targets or references in subsequent calculations, significantly reducing the computational load and memory requirements of subsequent rounds.
[0068] The above description of several specific embodiments further details the technical solution provided by the present invention in order to highlight the advantages and benefits of the technical solution provided by the present invention. However, the above-described specific embodiments are not intended to limit the present invention. Any reasonable modifications and improvements to the present invention, combinations of embodiments, and equivalent substitutions based on the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A parallelized cut-set simplification method based on prime number compression coding, characterized in that, include: The steps involve converting multiple cut sets to be simplified into binary vectors of equal length and concatenating them row by row to form a two-dimensional cut set matrix. Under a parallel computing architecture, the number of "1"s in each row is counted and the cut sets are grouped according to the number of events, forming cut set subgroups arranged in ascending order of the number of events. The steps are as follows: assign a unique prime number code to each basic event and generate a mapping table between events and prime numbers; multiply the prime number codes corresponding to each "1" in each row of the previously output cut set matrix to obtain the compressed integer code of the cut set; and finally form a prime number compressed code vector arranged by subgroups. The steps are as follows: Select each subgroup of the previous output in pairs according to the number of events, with the subgroup with fewer events as the comparison group and the subgroup with more events as the reference group. Construct the comparison matrix and the reference matrix using the broadcast mechanism, so that each pair of elements in the two matrices represents a set of cut set comparison relations, and output the matching matrix pairs with the same dimension. In a parallel computing architecture, the previous output matrix pair is divided element-wise. If an element in the reference matrix is divisible by the corresponding element in the compared matrix, it is marked as 1 in the Boolean matrix; otherwise, it is marked as 0. This process generates a Boolean judgment matrix representing the cut set inclusion relationship. Based on the previous output Boolean judgment matrix result, remove records identified as non-minimum cut sets, dynamically update the list of valid cut set indices to reduce the scale of subsequent calculations, and output the updated cut set set that has been removed as non-minimum cut sets. Repeat the matrix construction, division judgment and non-minimum cut set removal process until all subgroups have been compared, and output the final set of cut sets that are not included as the minimum cut set result.
2. The parallelized cut-set simplification method based on prime number compression coding according to claim 1, characterized in that, When performing structured parsing of the input fault tree model, a parallel computation method of reduction within thread blocks is used to count the number of "1"s in each row of the cut set matrix, and step-by-step accumulation is achieved by sharing memory between threads.
3. The parallelized cut-set simplification method based on prime number compression coding according to claim 1, characterized in that, When assigning a unique prime number code to each basic event, the prime numbers are allocated according to the frequency of occurrence of the basic event, with higher frequency events being assigned smaller prime numbers.
4. The parallelized cut-set simplification method based on prime number compression coding according to claim 1, characterized in that, When constructing the comparison matrix and the reference matrix, the data is synchronously expanded along the row and column dimensions through the GPU broadcast mechanism to avoid circular copying operations.
5. The parallelized cut-set simplification method based on prime number compression coding according to claim 1, characterized in that, When performing element-wise division checks on matrix pairs, a block-based parallel processing strategy is adopted, dividing the division check matrix into multiple sub-blocks, with each sub-block performing the division check and input data being cached through shared memory.
6. The parallelized cut-set simplification method based on prime number compression coding according to claim 1, characterized in that, When removing non-minimum cut sets based on the Boolean judgment matrix results, the list of valid cut set indices is updated in real time so that the removed cut sets no longer participate in subsequent matrix construction operations.
7. A parallelized cut-set simplification device based on prime number compression coding, characterized in that, include: The module converts multiple cut sets to be simplified into binary vectors of equal length and concatenates them row by row to form a two-dimensional cut set matrix. Under the parallel computing architecture, the number of "1"s in each row is counted and the cut sets are grouped according to the number of events, forming a module of cut set subgroups arranged in ascending order of the number of events. Assign a unique prime number code to each basic event and generate a mapping table between events and prime numbers. Multiply the prime number codes corresponding to each "1" in each row of the previously output cut set matrix to obtain the compressed integer code of the cut set. Finally, form a module that forms a prime number compressed code vector arranged by subgroups. The module selects each subgroup from the previous output in pairs according to the number of events, with the subgroup with fewer events as the comparison group and the subgroup with more events as the reference group. It uses a broadcast mechanism to construct the comparison matrix and the reference matrix, so that each pair of elements in the two matrices represents a set of cut sets for comparison, and outputs the matching matrix pairs with the same dimension. In a parallel computing architecture, an element-wise division check is performed on the previously output matrix pair. If an element in the reference matrix is divisible by the corresponding element in the compared matrix, it is marked as 1 in the Boolean matrix; otherwise, it is marked as 0. This module generates a Boolean check matrix representing the cut set inclusion relationship. Based on the previous output Boolean judgment matrix result, remove records identified as non-minimum cut sets, dynamically update the list of valid cut set indices to reduce the scale of subsequent calculations, and output the updated cut set set that has been removed as non-minimum cut sets. The module repeatedly performs matrix construction, division judgment and non-minimum cut set removal processes until all subgroups have been compared, and outputs the final set of cut sets that were not included as the minimum cut set result.
8. A computer storage medium for storing computer programs, characterized in that, When the computer program is read by the computer, the computer executes the method of claim 1.
9. A computer, comprising a processor and a storage medium, characterized in that, When the processor reads the computer program stored in the storage medium, the computer executes the method of claim 1.
10. A computer program product, as a computer program, is characterized by: When the computer program is executed, it implements the method of claim 1.