Software system reliability simulation evaluation method, device and computer equipment
By acquiring the attribute information and initializing the simulation parameters of the software system, simulating and updating the parameter values until the accuracy requirements are met, the problem of insufficient data and computational difficulties in the reliability assessment of complex software systems in traditional methods is solved, and high-precision reliability assessment is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA ELECTRONICS RELIABILITY AND ENVIRONMENTAL TESTING INSTITUTE ((THE FIFTH INSTITUTE OF ELECTRONICS MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY) (CHINA SAIBAO LABORATORY)
- Filing Date
- 2022-12-23
- Publication Date
- 2026-07-03
AI Technical Summary
Traditional software system reliability assessment methods lack sufficient operational data support in complex software systems, making quantitative index analysis and calculation difficult. The assessment methods are immature and have low practicality.
By acquiring attribute-related information of the software system, including state transition matrix, module failure probability and module runtime, simulation parameters are initialized and updated during the simulation process until the simulation accuracy requirements are met, at which point the simulation stops. The reliability of the software system is then evaluated using the simulation results.
It improves the accuracy of software system reliability simulation evaluation, solves the problem of cumbersome calculation process in traditional methods, and realizes efficient reliability evaluation of complex software systems.
Smart Images

Figure CN116010226B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of system testing technology, and in particular to a software system reliability simulation evaluation method, apparatus, computer equipment, storage medium, and computer program product. Background Technology
[0002] With the development of software system reliability assessment technology, traditional technical solutions for assessing the reliability of software systems often involve collecting failure data from software reliability testing or use, analyzing patterns using statistical knowledge, establishing a parameter model, and evaluating the parameters of the statistical distribution to estimate reliability indicators.
[0003] As software architectures become increasingly complex and internal interactions become more diverse, classic probabilistic and statistical methods, as well as architecture-oriented evaluation methods, lack sufficient operational data to support reliability assessments of complex software systems. Furthermore, the analytical calculation of quantitative indicators remains challenging. Therefore, reliability assessments of complex software systems still suffer from immature evaluation methods and limited practicality. Summary of the Invention
[0004] Therefore, it is necessary to provide a software system reliability simulation evaluation method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the accuracy of software system reliability simulation evaluation in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a software system reliability simulation and evaluation method. The method includes:
[0006] Obtain attribute-related information of the software system, including a state transition matrix, the module failure probability of each software module in the software system, and the module running time. The state transition matrix is a matrix representing the calling relationship between the software modules.
[0007] Initialize simulation parameters, which include at least the number of module calls, the number of module failures, and the simulation time;
[0008] The software system is simulated based on its attribute-related information, and the values of each simulation parameter are updated during the simulation process.
[0009] If the cumulative simulation time of the software system meets the preset time condition, the simulation result parameters will be output according to the latest values of each simulation parameter.
[0010] Return to the initialization simulation parameter step to perform the next software system simulation. If the simulation result parameters based on two consecutive outputs determine that the simulation accuracy requirements are met, then stop the simulation.
[0011] The reliability of the software system is evaluated based on the output parameters of multiple simulation results.
[0012] In one embodiment, the step of performing software system simulation based on the attribute-related information of the software system, and updating the values of each simulation parameter during the simulation process, includes:
[0013] Simulation sampling is performed based on the state transition matrix, and any software module is randomly called in sequence to perform the simulation. During the simulation of any software module, the reliability of the called software module is determined based on the module failure probability, and the module call count of the called software module is updated, the module failure count is updated based on the reliability of the called software module, and the simulation time is updated based on the module running time of the called software module.
[0014] In one embodiment, updating the failure count based on the reliability of the called software module includes: generating a random number; comparing the random number with the reliability of the called software simulation module; if the random number is greater than the reliability of the called simulation module, then the called simulation module is determined to have failed, and the module failure count corresponding to the called simulation module is updated to obtain the updated module failure count.
[0015] In one embodiment, before stopping the simulation if the simulation accuracy requirement is met based on the simulation result parameters output from two consecutive simulations, the method further includes: determining a first simulation result parameter from the previous simulation and a second simulation result parameter from the current simulation; calculating a first failure frequency vector based on the first simulation result parameter and the number of simulations corresponding to the previous simulation; calculating a second failure frequency vector based on the second simulation result parameter and the number of simulations corresponding to the current simulation; and determining the simulation accuracy based on the first failure frequency vector and the second failure frequency vector.
[0016] In one embodiment, the step of evaluating the reliability of the software system based on multiple output simulation result parameters includes: determining the software system reliability based on the number of times each module is called and the number of times each module fails in the multiple output simulation result parameters; and evaluating the reliability of the software system based on the software system reliability.
[0017] In one embodiment, the multiple simulation result parameters output are used to evaluate the reliability of the software system, including:
[0018] The mean time between failures (MTBF) of the software system is determined based on the simulation time and the number of failures of each module in the multiple simulation result parameters output.
[0019] The reliability of the software system is evaluated based on the mean time between failures (MTBF).
[0020] Secondly, this application also provides a software system reliability simulation and evaluation device. The device includes:
[0021] The information acquisition module is used to acquire attribute-related information of the software system. The attribute-related information includes a state transition matrix, the module failure probability of each software module in the software system, and the module running time. The state transition matrix is a matrix representing the calling relationship between the software modules.
[0022] An initialization module is used to initialize simulation parameters, which include at least the number of module calls, the number of module failures, and the simulation time.
[0023] The simulation module is used to perform software system simulation based on the attribute-related information of the software system, and to update the values of each simulation parameter during the simulation process.
[0024] The data update module is used to output simulation result parameters based on the latest values of each simulation parameter if the cumulative simulation time of the software system meets the preset time condition.
[0025] The processing module is used to return to the steps of initializing the simulation parameters to perform the next software system simulation. If the simulation accuracy requirements are met based on the simulation results of two consecutive outputs, the simulation is stopped.
[0026] The evaluation module is used to evaluate the reliability of the software system based on multiple simulation result parameters output.
[0027] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the aforementioned software system reliability simulation and evaluation apparatus.
[0028] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned software system reliability simulation and evaluation apparatus.
[0029] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the aforementioned software system reliability simulation and evaluation apparatus.
[0030] The aforementioned software system reliability simulation evaluation method, apparatus, computer equipment, storage medium, and computer program product acquire attribute-related information of the software system. This attribute-related information includes a state transition matrix, the module failure probability of each software module in the software system, and the module runtime. The state transition matrix is a matrix representing the calling relationships between software modules. Simulation parameters are initialized, including at least the number of module calls, the number of module failures, and the simulation time. The software system is simulated based on its attribute-related information, and the values of each simulation parameter are updated during the simulation. If the cumulative simulation time meets a preset time condition, simulation result parameters are output based on the latest values of each simulation parameter. The process returns to the initialization step to perform the next software system simulation. If the simulation result parameters output from two consecutive simulations determine that the simulation accuracy requirements are met, the simulation stops. The reliability of the software system is evaluated based on the multiple output simulation result parameters. Based on the acquisition of attribute-related information, the software system is simulated after initializing simulation parameters, thereby simulating the operation of the software system in actual task scenarios. Furthermore, the reliability of the software system is evaluated based on the output of multiple simulation result parameters, which not only effectively improves the accuracy of software system reliability simulation evaluation, but also solves the problem of cumbersome calculation process in traditional methods. Attached Figure Description
[0031] Figure 1 This is a flowchart illustrating a software system reliability simulation evaluation method in one embodiment;
[0032] Figure 2 This is a flowchart illustrating the software system reliability simulation and evaluation steps in one embodiment;
[0033] Figure 3 This is a flowchart illustrating the software system reliability simulation evaluation method in another embodiment;
[0034] Figure 4 This is a flowchart of a software system reliability simulation evaluation method in one embodiment;
[0035] Figure 5 This is a structural block diagram of a software system reliability simulation and evaluation device in one embodiment;
[0036] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0037] 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.
[0038] The software system reliability simulation evaluation method provided in this application embodiment can be applied to a terminal. The terminal runs simulation software and can obtain attribute-related information of the software system. This attribute-related information includes a state transition matrix, the module failure probability of each software module in the software system, and the module running time. The state transition matrix is a matrix representing the calling relationship between each software module. Simulation parameters are initialized, including at least the number of module calls and the number of module failures. The software system is simulated based on the attribute-related information, and the values of each simulation parameter are updated during the simulation. If the cumulative simulation time of the software system simulation meets a preset time condition, simulation result parameters are output based on the latest values of each simulation parameter. The process returns to the initialization step to perform the next software system simulation. If the simulation result parameters output twice consecutively determine that the simulation accuracy requirements are met, the simulation stops. The reliability of the software system is evaluated based on the multiple output simulation result parameters. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc.
[0039] In one embodiment, such as Figure 1 As shown, a software system reliability simulation evaluation method is provided. Taking the application of this method to a terminal as an example, the simulation software runs on the terminal, and the method includes the following steps:
[0040] Step S102: Obtain attribute-related information of the software system. The attribute-related information includes the state transition matrix, the module failure probability of each software module in the software system, and the module running time. The state transition matrix is a matrix that represents the calling relationship between each software module.
[0041] Among them, the attribute-related information of the software system can be information related to the nature of the software system itself. The attribute-related information can include the state transition matrix, the module failure probability of each software module in the software system, and the module running time. The module failure probability can be the probability of each software module failing in the software system. The module failure probability can be determined according to the reliability level of each software module. The module running time can be the running time after the software module is called. Generally, the module running time is a fixed value or time range, such as 60 seconds or between 60 seconds and 120 seconds. The state transition matrix is a matrix that represents the calling relationship between each software module. Specifically, the calling relationship can refer to the probability of each software module calling each other.
[0042] In one embodiment, the state transition matrix of the software system is shown below:
[0043]
[0044] In the above state transition matrix, Q 21 =0.5, which means that the probability of software module 2 calling software module 1 in the software system is 0.5; Q 23 =0.5, which means that the probability of software module 2 calling software module 3 is also 0.5.
[0045] Step S104: Initialize simulation parameters. The simulation parameters include at least the number of module calls, the number of module failures, and the simulation time.
[0046] The simulation parameters can be relevant parameters involved in the simulation process. At a minimum, simulation parameters include the number of module calls, the number of module failures, and the simulation time. The number of module calls refers to the number of times each software module is called during the simulation. The number of module failures refers to the number of times each software module fails during the simulation. The simulation time is the accumulated time determined by the module running time during the software system simulation. Besides the number of module calls, the number of module failures, and the simulation time, simulation parameters can also include the number of simulations and the failure frequency vector. The number of simulations can be determined by the number of times the initialization step is returned. Each time the initialization step is returned, the number of simulations is incremented by 1. The failure frequency vector can be determined by the values of the simulation parameters. Specifically, the terminal can use the failure frequency vectors output from two consecutive simulations to determine whether the simulation accuracy meets the convergence requirements.
[0047] Step S106: Perform software system simulation based on the attribute-related information of the software system, and update the values of each simulation parameter during the simulation process.
[0048] Among them, software system simulation can simulate the operation process of a software system during the simulation process. Specifically, the terminal can perform software system simulation based on the attribute information of the software system, and update the values of module call count, module failure count and simulation time during the simulation process.
[0049] Step S108: If the cumulative simulation time of the software system simulation meets the preset time condition, then output the simulation result parameters according to the latest values of each simulation parameter.
[0050] Among them, the preset time condition can be a set condition for determining whether to output simulation result parameters, the cumulative simulation time can be obtained from the value of the simulation time updated during the simulation process, the simulation result parameters can be determined by the latest values of each simulation parameter, and the terminal can update the value of the module call count, the value of the module failure count, and the value of the simulation time based on the module running time of the called software module after calling the software module.
[0051] In one embodiment, the preset time condition can be whether the cumulative simulation time is greater than or equal to a time threshold. When the terminal determines that the cumulative simulation time is greater than or equal to the time threshold, it can output the simulation result parameters based on the latest values of each simulation parameter.
[0052] Step S110: Return to the initialization of simulation parameters to perform the next software system simulation. If the parameters are determined to meet the simulation accuracy requirements based on the simulation results of two consecutive outputs, then stop the simulation.
[0053] The simulation accuracy requirement can be the convergence requirement of the simulation system. After the terminal outputs the simulation result parameters, it will return to the step of initializing the simulation parameters to perform the next software system simulation. The terminal can calculate the simulation accuracy based on the simulation result parameters output twice in a row. Furthermore, the terminal determines whether the simulation accuracy meets the simulation accuracy requirement. If it does, the simulation will stop. If it does not, it will return to the step of initializing the simulation parameters again until the simulation accuracy requirement is met.
[0054] In one embodiment, the terminal compares the calculated simulation accuracy with the set simulation convergence accuracy. If the accuracy is less than or equal to the simulation convergence accuracy, it means that the simulation accuracy requirement is met, and the simulation can be stopped. If the accuracy is greater than the simulation convergence accuracy, it means that the simulation accuracy requirement is not met, and the terminal needs to return to the step of initializing simulation parameters.
[0055] Step S112: Evaluate the reliability of the software system based on the multiple simulation result parameters output.
[0056] Once the terminal determines that the simulation accuracy requirements are met based on the simulation result parameters output twice consecutively, the simulation can be stopped, and the reliability of the software system can be evaluated by combining the simulation result parameters output from each simulation during this process.
[0057] The aforementioned software system reliability simulation and evaluation method involves: acquiring attribute-related information of the software system, including the state transition matrix, the module failure probability of each software module, and the module runtime; initializing simulation parameters, which include at least the number of module calls, the number of module failures, and the simulation time; performing software system simulation based on the attribute-related information and updating the values of each simulation parameter during the simulation process; outputting simulation result parameters based on the latest values of each simulation parameter if the cumulative simulation time meets a preset time condition; returning to the initialization step for the simulation parameters to perform the next software system simulation, stopping the simulation if the simulation accuracy requirements are met based on two consecutive output simulation result parameters; and evaluating the reliability of the software system based on the multiple output simulation result parameters. By acquiring attribute-related information and then performing software system simulation after initializing simulation parameters, the method simulates the operation of the software system in a real-world task scenario. Furthermore, by evaluating the reliability of the software system based on the multiple output simulation result parameters, the accuracy of software system reliability simulation and evaluation is effectively improved.
[0058] In one embodiment, software system simulation is performed based on the attribute-related information of the software system, and the values of each simulation parameter are updated during the simulation process. This includes: performing simulation sampling based on the state transition matrix, randomly calling any software module to execute the simulation in sequence, determining the reliability of the called software module based on the module failure probability during the simulation of any software module, updating the module call count of the called software module, updating the module failure count based on the reliability of the called software module, and updating the simulation time based on the module running time of the called software module.
[0059] When the terminal performs software system simulation, it can determine the transition relationship and transition probability between each software module based on the state transition matrix, thereby performing simulation sampling and randomly calling any software module to execute the simulation. After any software module is called, the terminal will determine the reliability of the called software module based on the module failure probability, update the module call count of the software module, update the module failure count based on the reliability, and update the simulation time based on the module running time of the software module.
[0060] Specifically, the terminal can obtain the reliability by subtracting the module failure probability from 1. During updates, the terminal can use an incremental approach. For example, after any software module is called, the terminal can add a preset step size (such as 1 or any other arbitrary number) to the module call count updated when that software module was last called, to update the module call count. The terminal can also update the module failure count by adding a preset step size (such as 1 or any other arbitrary number) to the module failure count updated when the software module was last called, and add the module's runtime to the simulation time updated when the software module was last called, based on the reliability.
[0061] In the above embodiments, the terminal updates the values of each simulation parameter during the simulation process, so that a reliability assessment can be carried out based on the values of each simulation parameter.
[0062] In one embodiment, updating the failure count based on the reliability of the called software module includes: generating a random number; comparing the random number with the reliability of the called software simulation module; if the random number is greater than the reliability of the called simulation module, then it is determined that the called simulation module has failed, and the module failure count corresponding to the called simulation module is updated to obtain the updated module failure count.
[0063] The random number is a number generated by the terminal through sampling during the software system simulation process. The random number can be between 0 and 1. The terminal compares the reliability of the software module to be called with the random number. If the random number is greater than the reliability, the software module is determined to be faulty. When the software module fails, the terminal can update the failure count of the module corresponding to the called simulation module to obtain the updated failure count.
[0064] In the above embodiments, the terminal determines whether the called software module has failed by comparing the random number with the reliability. Only after the module fails is the failure count updated, which can effectively improve the accuracy of the updated module failure count.
[0065] In one embodiment, before stopping the simulation if the simulation accuracy requirements are met based on the parameters of two consecutive output simulation results, the following steps are also included:
[0066] Step S202: Determine the first simulation result parameters output from the previous simulation and the second simulation result parameters output from the current simulation.
[0067] In this context, both the first simulation result parameter and the second simulation result parameter are simulation result parameters. To distinguish between the output of the previous simulation and the output of the current simulation, the output of the previous simulation is the first simulation result parameter, and the output of the current simulation is the second simulation result parameter.
[0068] Step S204: Calculate the first failure frequency vector based on the first simulation result parameters and the number of simulations corresponding to the previous simulation.
[0069] The terminal can calculate the first failure frequency vector based on the parameters of the first simulation result and the number of simulations corresponding to the previous simulation. Specifically, the formula for calculating the first failure frequency vector is as follows:
[0070]
[0071] in, Let k be the first failure frequency vector, and k represent the simulation number corresponding to the previous simulation. This indicates that the number of times software module i is called in the x-th simulation is (i = 1, 2, ..., j). Let (i = 1, 2, ..., j) represent the number of times software module i fails in the x-th simulation.
[0072] Step S206: Calculate the second failure frequency vector based on the second simulation result parameters and the number of simulations corresponding to the current simulation.
[0073] The terminal uses the same formula to calculate the second failure frequency vector as it does to calculate the first failure frequency vector. Therefore, the terminal only needs to substitute the second simulation result parameters and the number of simulations corresponding to the current simulation into the above formula to determine the second failure frequency vector.
[0074] Step S208: Determine the simulation accuracy based on the first failure frequency vector and the second failure frequency vector.
[0075] After obtaining the first failure frequency vector and the second failure frequency vector, the terminal can subtract the first failure frequency vector and the second failure frequency vector to obtain the simulation accuracy.
[0076] In the above embodiments, the terminal determines the simulation accuracy by using the failure frequency vector of two adjacent simulations, thereby fully considering the uncertainties in the simulation process and effectively eliminating the impact of uncertainties on the system reliability assessment.
[0077] In one embodiment, the reliability of the software system is evaluated based on multiple simulation result parameters, including: determining the software system reliability based on the number of times each module is called and the number of times each module fails in the multiple simulation result parameters; and evaluating the software system reliability based on the software system reliability.
[0078] In this context, software system reliability refers to the probability that the software system will not fail. When the terminal determines that the simulation accuracy of two consecutive simulations meets the accuracy requirements, it can calculate the number of module calls and the number of module failures for each software module involved in the multiple simulations to obtain the software system reliability. Specifically, the following formula can be used to calculate the software system reliability:
[0079]
[0080] in, For the reliability of the software system, k represents the number of simulations (x-1, 2, ..., k), and the number of module calls of software module i in the x-th simulation is: The number of module failures is
[0081] In the above embodiments, the terminal performs software system reliability simulation evaluation through software system reliability, which can accurately evaluate the reliability of the software system.
[0082] In one embodiment, the reliability of the software system is evaluated based on multiple output simulation result parameters, including: determining the mean time between failures (MTBF) of the software system based on each simulation time and the number of failures of each module in the multiple output simulation result parameters; and evaluating the reliability of the software system based on the MTBF.
[0083] The mean time between failures (MTBF) can be the average time between two software system failures. Terminals can also perform reliability assessments by calculating the MTBF. Specifically, the formula for calculating the MTBF is:
[0084]
[0085] in, Let k be the mean time between failures (MTBF), and k represent the number of simulations (x = 1, 2, ..., k). The simulation time for the x-th simulation is... The number of module failures is
[0086] In the above embodiments, the terminal performs software system reliability simulation evaluation by means of average fault interval, which can solve the problems of cumbersome calculation process and difficulty in applying to complex systems in traditional methods.
[0087] In one embodiment, such as Figure 3 The following is a flowchart of a software system reliability simulation evaluation method in one embodiment:
[0088] In the process of conducting software system reliability simulation evaluation, three main modules are involved: system definition, simulation operation, and indicator evaluation. Specifically, when defining the software system to be simulated, it can include clarifying the state transition matrix of the software system, determining the module failure probability of each software module, and the module running time of each software module.
[0089] During the simulation phase, the software system operates in a real-world task scenario through various software modules or components calling each other and exchanging information via interfaces under a specific operational profile. Therefore, simulation technology can be used to assess the reliability of the software system. This primarily involves simulating the system's operation during the simulation process and quantitatively calculating reliability indicators by statistically analyzing failure and operational information.
[0090] Finally, based on the data such as the number of calls, failures, and system runtime of each software module generated in each simulation, the reliability of the software system is evaluated, mainly including the quantitative calculation of indicators such as system reliability and mean time between failures (MTBF).
[0091] In one embodiment, such as Figure 4 The diagram shown is a flowchart illustrating a software system reliability simulation evaluation method in one embodiment:
[0092] In this context, the software system's operation in a real-world task scenario manifests as a process where various software modules or components interact and exchange information through interfaces under a specific operational profile. The terminal simulates the software system's operation during the simulation process to achieve software system reliability assessment. The meanings of the symbols used in this embodiment are as follows:
[0093] T0 - Task time in a typical task scenario;
[0094] t i — The single execution time of the i-th type of software module, i = 1, 2, ..., j, where j represents the number of modules;
[0095] R i —Reliability of the i-th type of software module;
[0096] t0 — Simulation clock, representing the total actual running time of the software system;
[0097] n i — The number of times the i-th type of software module is called, i = 1, 2, ..., j;
[0098] m i — The number of failures of the i-th type of software module, i = 1, 2, ..., j.
[0099] k — number of simulations;
[0100] ε—convergence accuracy;
[0101] w — Failure frequency vector.
[0102] Once the simulation begins, the specific steps for running the simulation are as follows:
[0103] Step 1: Simulation begins;
[0104] Step 2: Set the task time T0 under typical scenarios and the single execution time t of each software module. i Reliability R of each software module i Simulation convergence accuracy ε;
[0105] Step 3: Initialize the simulation clock parameters, the number of calls to various software modules, the number of failures, the number of simulations, and the failure frequency vector, setting t0 = 0 and n respectively. i =0, m i =0, k=0, w0=0;
[0106] Step 4: Perform simulation sampling. Randomly call a software module, record its index as i, and sample to determine its running time t. i ;
[0107] Step 5: The terminal accumulates the number of times the called software module is invoked, let n. i =n i +1;
[0108] Step 6: The terminal determines whether the called software module has failed based on its reliability level. If yes, proceed to step 7; otherwise, proceed to step 8. Failure determination is mainly achieved by sampling a random number between [0, 1] and comparing it with the reliability of the software module. If the random number is larger, the module is determined to be failed; otherwise, the software module is determined not to be failed.
[0109] Step 7: Accumulate the number of failures of the called software module, let m i =m i +1, and proceed to step 9;
[0110] Step 8: Advance the simulation clock and accumulate the system running time, let t0 = t0 + t i ;
[0111] Step 9: Determine if the system runtime meets the task time requirement. If yes, proceed to step 11; otherwise, proceed to step 10.
[0112] Step 10: Based on the system state transition matrix, and according to the transition relationships and probabilities between various software modules, proceed to Step 4 for simulation sampling;
[0113] Step 11: Output the number of times n of each software module is called in a single simulation. i Number of failures m i and system runtime t0;
[0114] Step 12: Accumulate the number of simulations, let k = k + 1;
[0115] Step 13: Calculate the failure frequency vector. The failure frequency vector for the k-th simulation is... in
[0116]
[0117] Step 14: Determine whether the accuracy of the failure frequency vectors in two consecutive simulations meets the convergence requirement, i.e.
[0118] ||w k -w k-1 ||≤ε
[0119] Is it true? If yes, proceed to the next step; otherwise, proceed to step 3.
[0120] Step 15: Simulation ends.
[0121] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0122] Based on the same inventive concept, this application also provides a software system reliability simulation and evaluation apparatus for implementing the software system reliability simulation and evaluation method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more embodiments of the software system reliability simulation and evaluation apparatus provided below can be found in the limitations of the software system reliability simulation and evaluation method described above, and will not be repeated here.
[0123] In one embodiment, such as Figure 5 As shown, a software system reliability simulation and evaluation device is provided, comprising: an information acquisition module, an initialization module, a simulation module, a data update module, a processing module, and an evaluation module, wherein:
[0124] The information acquisition module 502 is used to acquire attribute-related information of the software system. The attribute-related information includes the state transition matrix, the module failure probability of each software module in the software system, and the module running time. The state transition matrix is a matrix that represents the calling relationship between each software module.
[0125] Initialization module 504 is used to initialize simulation parameters, which include at least the number of module calls, the number of module failures, and the simulation time.
[0126] The simulation module 506 is used to perform software system simulation based on the attribute-related information of the software system, and to update the values of each simulation parameter during the simulation process.
[0127] The data update module 508 is used to output simulation result parameters based on the latest values of each simulation parameter if the cumulative simulation time of the software system simulation meets the preset time condition.
[0128] The processing module 510 is used to return to the steps of initializing simulation parameters for the next software system simulation. If the simulation results based on two consecutive outputs determine that the simulation accuracy requirements are met, the simulation is stopped.
[0129] Evaluation module 512 is used to evaluate the reliability of the software system based on multiple simulation result parameters output.
[0130] In one embodiment, the simulation module is further configured to perform simulation sampling based on the state transition matrix, sequentially and randomly call any software module to perform simulation, determine the reliability of the called software module based on the module failure probability during the simulation of any software module, update the module call count of the called software module, update the module failure count based on the reliability of the called software module, and update the simulation time based on the module running time of the called software module.
[0131] In one embodiment, the simulation module is further configured to generate random numbers; compare the random numbers with the reliability of the called software simulation module; if the random numbers are greater than the reliability of the called simulation module, it is determined that the called simulation module has failed, and the module failure count corresponding to the called simulation module is updated to obtain the updated module failure count.
[0132] In one embodiment, the apparatus further includes a simulation accuracy determination module;
[0133] The simulation accuracy determination module is used to determine the first simulation result parameters output by the previous simulation and the second simulation result parameters output by the current simulation; calculate the first failure frequency vector based on the first simulation result parameters and the number of simulations corresponding to the previous simulation; calculate the second failure frequency vector based on the second simulation result parameters and the number of simulations corresponding to the current simulation; and determine the simulation accuracy based on the first failure frequency vector and the second failure frequency vector.
[0134] In one embodiment, the evaluation module is further configured to determine the software system reliability based on the number of times each module is called and the number of times each module fails in the multiple simulation result parameters output; and to evaluate the reliability of the software system based on the software system reliability.
[0135] In one embodiment, the evaluation module is further configured to determine the mean time between failures (MTBF) of the software system based on the simulation time and the number of failures of each module in the multiple output simulation result parameters; and to evaluate the reliability of the software system based on the MTBF.
[0136] Each module in the aforementioned software system reliability simulation and evaluation device 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.
[0137] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a software system reliability simulation evaluation method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0138] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0139] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described software system reliability simulation evaluation method.
[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described software system reliability simulation and evaluation method.
[0141] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the above-described software system reliability simulation evaluation method.
[0142] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0143] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0144] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0145] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for software system reliability simulation evaluation, characterized in that, The method includes: Obtain attribute-related information of the software system, including a state transition matrix, the module failure probability of each software module in the software system, and the module running time. The state transition matrix is a matrix representing the calling relationship between the software modules. Initialize simulation parameters, which include at least the number of module calls, the number of module failures, and the simulation time; The software system is simulated based on its attribute-related information, and the values of each simulation parameter are updated during the simulation process. If the cumulative simulation time of the software system meets the preset time condition, the simulation result parameters will be output according to the latest values of each simulation parameter. Return to the initialization simulation parameter step to perform the next software system simulation. If the simulation result parameters based on two consecutive outputs determine that the simulation accuracy requirements are met, then stop the simulation. The reliability of the software system is evaluated based on the multiple simulation result parameters output. The step of performing software system simulation based on the attribute-related information of the software system, and updating the values of each simulation parameter during the simulation process, includes: Simulation sampling is performed based on the state transition matrix, and any software module is randomly called in sequence to perform the simulation. During the simulation of any software module, the reliability of the called software module is determined based on the module failure probability, and the module call count of the called software module is updated, the module failure count is updated based on the reliability of the called software module, and the simulation time is updated based on the module running time of the called software module.
2. The method of claim 1, wherein, The step of updating the failure count based on the reliability of the called software module includes: Generate random numbers; The random number is compared with the reliability of the called software module; If the random number is greater than the reliability of the called software module, then the called software module is determined to have failed, and the module failure count corresponding to the called software module is updated to obtain the updated module failure count.
3. The method of claim 1, wherein, Before stopping the simulation if the simulation accuracy requirements are met based on the parameters of two consecutive output simulation results, the method further includes: Determine the first simulation result parameters output from the previous simulation and the second simulation result parameters output from the current simulation; Based on the parameters of the first simulation result and the number of simulations corresponding to the previous simulation, the first failure frequency vector is calculated. The second failure frequency vector is calculated based on the second simulation result parameters and the number of simulations corresponding to the current simulation. The simulation accuracy is determined based on the first failure frequency vector and the second failure frequency vector.
4. The method of claim 1, wherein, The reliability assessment of the software system based on multiple output simulation result parameters includes: The software system reliability is determined based on the number of times each module is called and the number of times each module fails in the output simulation results parameters. The reliability of the software system is evaluated based on its reliability level.
5. The method of claim 1, wherein, The reliability assessment of the software system based on multiple output simulation result parameters includes: The mean time between failures (MTBF) of the software system is determined based on the simulation time and the number of failures of each module in the multiple simulation result parameters output. The reliability of the software system is evaluated based on the mean time between failures (MTBF).
6. A software system reliability simulation evaluation apparatus characterized by comprising: The device includes: The information acquisition module is used to acquire attribute-related information of the software system. The attribute-related information includes a state transition matrix, the module failure probability of each software module in the software system, and the module running time. The state transition matrix is a matrix representing the calling relationship between the software modules. An initialization module is used to initialize simulation parameters, which include at least the number of module calls, the number of module failures, and the simulation time. The simulation module is used to perform software system simulation based on the attribute-related information of the software system, and to update the values of each simulation parameter during the simulation process. The data update module is used to output simulation result parameters based on the latest values of each simulation parameter if the cumulative simulation time of the software system meets the preset time condition. The processing module is used to return to the steps of initializing the simulation parameters to perform the next software system simulation. If the simulation results based on two consecutive outputs determine that the simulation accuracy requirements are met, the simulation is stopped. The evaluation module is used to evaluate the reliability of the software system based on multiple simulation result parameters output. The simulation module is also used to perform simulation sampling based on the state transition matrix, and to randomly call any software module to perform simulation in sequence. During the simulation of any software module, the reliability of the called software module is determined based on the module failure probability, and the module call count of the called software module is updated, the module failure count is updated based on the reliability of the called software module, and the simulation time is updated based on the module running time of the called software module. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6 when the computer program is executed by the processor. 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 stored thereon a computer program, 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.
9. A computer program product comprising a computer program, 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.