# 软件可靠性增长模型

软件可靠性增长模型（SRGM）是一种统计模型，用于描述程序中的剩余故障数如何随测试的推进而下降，并利用这一描述预测未来的失效。基于NHPP的SRGM通过拟合测试期间收集的失效数据，给出在给定测试时间内检测到的预期累积失效数，预测指定未来区间内的失效情况，并估计软件可靠性的定量度量，从而为是否继续测试或发布软件的决策提供支持。<sup>[1](https://www.mdpi.com/2227-7390/9/9/985)</sup> 典型输出包括剩余的唯一缺陷数、失效强度、平均失效时间和软件可靠性，以及对进一步测试后失效强度将下降多少的估计。<sup>[2](https://par.nsf.gov/servlets/purl/10160166)</sup> 由于达到可靠性目标所需的时间可以从拟合模型中计算得出，据此安排测试，并持续测试直至达到该时间。<sup>[3](https://www.ece.uvic.ca/~itraore/seng426-06/notes/qual06-4-2.pdf)</sup> 自20世纪70年代以来，已有大量SRGM被提出，它们在工业中发挥着估计软件产品发布时间的作用。<sup>[4](https://www.benthamdirect.com/content/journals/rascs/10.2174/2666255813999201012182821?TRACK=RSS)</sup>

| 关键事实 | 详情 |
|---|---|
| 核心输出 | 任意测试时刻的预期失效数，由非齐次泊松过程的均值函数给出<sup>[1](https://www.mdpi.com/2227-7390/9/9/985)</sup> |
| 支持的决策 | 继续测试还是发布；达到可靠性目标所需的时间<sup>[1](https://www.mdpi.com/2227-7390/9/9/985)</sup><sup> • </sup><sup>[3](https://www.ece.uvic.ca/~itraore/seng426-06/notes/qual06-4-2.pdf)</sup> |
| Goel–Okumoto均值函数 | \( m(t) = N(1 - e^{-bt}) \)，其中 \( N \) 为模型极限状态下检测到的预期总失效数，\( b \) 为检测率参数<sup>[5](https://www.mirrorservice.org/sites/www.bitsavers.org/pdf/ibm/IBM_Journal_of_Research_and_Development/284/ibmrd2804I.pdf)</sup> |
| 数据类型 | 失效间隔时间模型和失效计数模型；部分模型可同时接受两种数据<sup>[6](https://s2.smu.edu/~tian/class/8317.13s/sre3.pdf)</sup> |
| 参数估计 | 极大似然法或最小二乘法，应用于失效时间数据或分组计数数据<sup>[1](https://www.mdpi.com/2227-7390/9/9/985)</sup> |
| 已知局限 | 对五种流行模型的综述得出结论：没有一种模型被普遍接受并适用于所有类型的软件<sup>[4](https://www.benthamdirect.com/content/journals/rascs/10.2174/2666255813999201012182821?TRACK=RSS)</sup> |

## 工作原理

大多数SRGM建立在非齐次泊松过程（NHPP）之上，这是一种计数过程，其期望值由均值函数（MVF）刻画；在软件可靠性中，NHPP计数的是到时刻 \( t \) 为止检测到的唯一故障数，而均值函数可以取多种函数形式。<sup>[7](https://par.nsf.gov/servlets/purl/10336292)</sup> NHPP模型由其均值函数主导，均值函数给出任意测试时刻的预期失效数，且NHPP模型与均值函数之间存在一一对应关系。<sup>[1](https://www.mdpi.com/2227-7390/9/9/985)</sup> G-O模型假设在区间 \( (t, t+\Delta t) \) 内发现的预期缺陷数与系统中剩余的缺陷数成正比。<sup>[8](https://journals.plos.org/plosone/article/file?id=10.1371%2Fjournal.pone.0304055&type=printable)</sup>

两种经典形式可以说明这一模型族。Musa执行时间模型使用

\[ m(\tau) = N_{0}\left(1 - \exp(-\lambda_{0} \cdot \tau / N_{0})\right) \]

其中 \( \tau \) 为执行时间（测试中使用的总CPU时间，可通过测试压缩因子 \( C \) 从日历时间 \( t \) 获得），\( N_{0} \) 为预期初始故障含量，等价于该模型中的渐近平均失效计数，\( \lambda_{0} \) 为初始失效强度。<sup>[5](https://www.mirrorservice.org/sites/www.bitsavers.org/pdf/ibm/IBM_Journal_of_Research_and_Development/284/ibmrd2804I.pdf)</sup> Goel–Okumoto型NHPP模型的特征为

\[ m(t) = N(1 - \exp(-b \cdot t)). \]

## 实施方法

SRGM分为失效间隔时间（TBF）模型和失效计数（FC）模型，前者的随机变量是失效之间的间隔，后者的随机变量是给定区间内的计数；部分模型可以同时使用两种数据类型。<sup>[6](https://s2.smu.edu/~tian/class/8317.13s/sre3.pdf)</sup> Jelinski–Moranda模型是一种失效间隔时间模型。<sup>[3](https://www.ece.uvic.ca/~itraore/seng426-06/notes/qual06-4-2.pdf)</sup>

从业者的工作流程通常被概括为七个步骤：收集失效数据；检查数据（密度分布与累积分布对比）；选择模型；估计模型参数；用估计的参数定制模型；进行拟合优度检验；做出可靠性预测。<sup>[3](https://www.ece.uvic.ca/~itraore/seng426-06/notes/qual06-4-2.pdf)</sup> 在NHPP文献中，这被浓缩为三个步骤：收集失效数据（如检测到的缺陷数），估计模型参数以拟合数据，并从拟合模型计算可靠性度量。<sup>[1](https://www.mdpi.com/2227-7390/9/9/985)</sup> [参数](https://www.edgepedia.org/zh/parameter)估计通常采用极大似然估计（MLE）或最小二乘估计（LSE），应用于失效时间数据或分组计数数据。<sup>[1](https://www.mdpi.com/2227-7390/9/9/985)</sup><sup> • </sup><sup>[8](https://journals.plos.org/plosone/article/file?id=10.1371%2Fjournal.pone.0304055&type=printable)</sup>

[模型选择](https://www.edgepedia.org/zh/model-selection)是与拟合分开的步骤。常见的比较标准是均方误差（MSE）、\( R^2 \) 和平均相对误差（MRE），MSE和MRE越小、\( R^2 \) 越大，表明模型越好。<sup>[9](https://www.nature.com/articles/s41598-025-04102-4)</sup> 具体到预测精度，工程类标准包括用于检测一致性偏差的u图，以及用于检测预测噪声是否有据的预序似然比。<sup>[10](https://www2.hs-fulda.de/~grams/RGM/RGMcriticized.html)</sup>

## 起源

早期的技术报告提出了三种可靠性增长模型，将增长描述为成功运行概率的增加、失效时间的增加或失效率的降低；这项硬件可靠性工作是软件可靠性增长建模的前身。<sup>[11](https://ntrs.nasa.gov/api/citations/19660009034/downloads/19660009034.pdf)</sup> Goel–Okumoto NHPP模型的有据可查的记录是Amrit L. Goel和Kazu Okumoto于1979年在《IEEE Transactions on Reliability》上发表的论文《Time-Dependent Error-Detection Rate Model for Software Reliability and Other Performance Measures》。<sup>[12](https://doi.org/10.1109/tr.1979.5220566)</sup> S形模型族记录于Shigeru Yamada、Mitsuru Ohba和Shunji Osaki发表于《IEEE Transactions on Reliability》1984年的论文《s-Shaped Software Reliability Growth Models and Their Applications》。<sup>[13](https://doi.org/10.1109/tr.1984.5221826)</sup> Goel于1985年发表在《IEEE Transactions on Software Engineering》上的论文《Software Reliability Models: Assumptions, Limitations, and Applicability》是对模型假设进行系统处理的记录。<sup>[14](https://doi.org/10.1109/tse.1985.232177)</sup>

## 变体

**Jelinski–Moranda模型。** 该模型假设测试开始时存在 \( N \) 个软件故障，失效完全随机，各故障贡献相同，修复所需时间可忽略且修复是完美的，因此每次修复后失效率以相同幅度改善；该假设的典型表述是：每移除一个故障，失效率都降低同一常数值。<sup>[3](https://www.ece.uvic.ca/~itraore/seng426-06/notes/qual06-4-2.pdf)</sup><sup> • </sup><sup>[10](https://www2.hs-fulda.de/~grams/RGM/RGMcriticized.html)</sup> 当失效分布为指数分布时，指数顺序统计量模型等同于Jelinski–Moranda模型。<sup>[1](https://www.mdpi.com/2227-7390/9/9/985)</sup>

**Goel–Okumoto NHPP模型。** 该模型基于非齐次泊松过程，假设在整个测试期间每个错误的错误检测率恒定。<sup>[15](https://numdam.org/item/RO_1986__20_1_51_0.pdf)</sup> 早期NHPP模型包括Goel–Okumoto、Musa–Okumoto、Ohba、Yamada–Ohba–Osaki和Zhao–Xie模型，均以确定性调试均值函数构建。<sup>[1](https://www.mdpi.com/2227-7390/9/9/985)</sup> Musa–Okumoto对数泊松执行时间模型本身就是一个有名称的模型族。<sup>[16](https://sciresol.s3.us-east-2.amazonaws.com/IJST/Articles/2015/Issue-29/Article26.pdf)</sup>

**S形模型。** 延迟S形、拐点S形和超指数模型被提出，是为了在仅有测试报告数据时使可靠性分析更加贴近实际。<sup>[5](https://www.mirrorservice.org/sites/www.bitsavers.org/pdf/ibm/IBM_Journal_of_Research_and_Development/284/ibmrd2804I.pdf)</sup> 在实际项目中，S形增长比指数增长更常被观察到，这归因于故障依赖性、错误的定义以及持续增加的测试投入。<sup>[5](https://www.mirrorservice.org/sites/www.bitsavers.org/pdf/ibm/IBM_Journal_of_Research_and_Development/284/ibmrd2804I.pdf)</sup> Yamada及其同事还提出了非齐次错误检测率模型，这是一种假设两类错误的NHPP模型——一些容易检测，另一些较难检测——其中每个错误的检测率取决于已流逝的测试时间。<sup>[15](https://numdam.org/item/RO_1986__20_1_51_0.pdf)</sup>

**Littlewood–Verrall模型。** 这是一个贝叶斯模型，其中第 \( i \) 个失效间隔服从 \( f(t_{i} \mid \lambda_{i}) = \lambda_{i} e^{-\lambda_{i} \cdot t_{i}} \)。<sup>[6](https://s2.smu.edu/~tian/class/8317.13s/sre3.pdf)</sup> 这些模型族密切相关：Musa执行时间模型和Goel–Okumoto NHPP模型在数学上同构，而Littlewood–Verrall是Jelinski–Moranda模型的贝叶斯解释。<sup>[5](https://www.mirrorservice.org/sites/www.bitsavers.org/pdf/ibm/IBM_Journal_of_Research_and_Development/284/ibmrd2804I.pdf)</sup>

**不完美调试。** Goel和Okumoto的不完美调试模型扩展了Jelinski–Moranda模型：修复缺陷可能注入新缺陷，失效率为 \( \lambda_{i} = \varphi(N - p(i-1)) \)，时刻 \( t \) 的故障数被视为一个马尔可夫过程，其转移概率由不完美调试的概率决定。<sup>[6](https://s2.smu.edu/~tian/class/8317.13s/sre3.pdf)</sup><sup> • </sup><sup>[16](https://sciresol.s3.us-east-2.amazonaws.com/IJST/Articles/2015/Issue-29/Article26.pdf)</sup>

## 应用

SRGM在工业中用于估计软件产品的发布时间。<sup>[4](https://www.benthamdirect.com/content/journals/rascs/10.2174/2666255813999201012182821?TRACK=RSS)</sup> 除了点估计之外，非齐次错误检测率模型已被应用于实际失效发生时间数据，以推导成本-可靠性最优发布策略，通过在满足可靠性要求的前提下最小化预期总软件成本来确定最优发布时间。<sup>[15](https://numdam.org/item/RO_1986__20_1_51_0.pdf)</sup> 其对开源软件的适用性存在争议，因为SRGM的假设使其通常更适合闭源项目；一项对88个OSS项目比较九种SRGM的实验研究发现总体适用性良好，但在按发布版本和领域分段时表现不同，凸显了找到通用模型的困难。<sup>[17](https://ieeexplore.ieee.org/document/10011522/similar#similar)</sup> 在一项已发表的比较中，八种SRGM在来自系统测试、现场和OSS来源的五十个失效数据集上进行对比，Musa–Okumoto拟合了所有数据集，且Musa–Okumoto、拐点S形和Goel–Okumoto是工业数据集的最佳预测器，而Gompertz和Yamada是OSS数据集的最佳预测器。<sup>[18](https://iris.polito.it/handle/11583/2502526)</sup>

## 局限与替代方案

一个结构性困难在于，[可靠性增长模型](https://www.edgepedia.org/zh/reliability-growth-model)假设失效率随故障移除而以特定方式变化，然而每次故障移除都会产生一个新的、未知的失效率，因此从以往经验评估失效率从一开始就显得不可能。<sup>[10](https://www2.hs-fulda.de/~grams/RGM/RGMcriticized.html)</sup> 观察到的增长曲线饱和也可能反映测试投入的减少（例如测试团队缩小），而非可靠性稳定，这使得基于日历时间的分析不如以执行时间或测试投入为尺度的分析可信。<sup>[5](https://www.mirrorservice.org/sites/www.bitsavers.org/pdf/ibm/IBM_Journal_of_Research_and_Development/284/ibmrd2804I.pdf)</sup> 对五种流行模型（Jelinski–Moranda、Goel–Okumoto NHPP、Musa–Okumoto对数泊松、Gompertz和增强型NHPP）的综述得出结论：没有一种模型被普遍接受并适用于所有类型的软件。<sup>[4](https://www.benthamdirect.com/content/journals/rascs/10.2174/2666255813999201012182821?TRACK=RSS)</sup> 许多当前模型还受困于计算复杂性、对数据集特性的敏感性，以及捕捉故障检测、修正和错误引入之间相互作用的能力有限。<sup>[19](https://iieta.org/journals/mmep/paper/10.18280/mmep.130314)</sup> 基于覆盖率的模型是一种公认的替代方案，侧重于输入和内部状态覆盖率，并解决穷尽测试的不可行性。<sup>[6](https://s2.smu.edu/~tian/class/8317.13s/sre3.pdf)</sup> 近期发表的工作扩展了该框架，例如一个用于不完美调试的非齐次马尔可夫过程（NHMP）框架，它构建了22个无限失效模型，通常能改善拟合优度，而其预测优势则较为有限。<sup>[20](https://link.springer.com/article/10.1007/s11219-026-09772-5)</sup>

## References

1. [Application of EM Algorithm to NHPP-Based Software Reliability Assessment with Generalized Failure Count Data](https://www.mdpi.com/2227-7390/9/9/985)
2. [Software reliability growth modeling (NSF public access repository copy)](https://par.nsf.gov/servlets/purl/10160166)
3. [Chap 4. Software Reliability (course notes)](https://www.ece.uvic.ca/~itraore/seng426-06/notes/qual06-4-2.pdf)
4. [Key Issues in Software Reliability Growth Models](https://www.benthamdirect.com/content/journals/rascs/10.2174/2666255813999201012182821?TRACK=RSS)
5. [Software reliability analysis (IBM Journal of Research and Development, vol. 28, no. 4)](https://www.mirrorservice.org/sites/www.bitsavers.org/pdf/ibm/IBM_Journal_of_Research_and_Development/284/ibmrd2804I.pdf)
6. [Software Reliability and Safety (lecture notes, Southern Methodist University)](https://s2.smu.edu/~tian/class/8317.13s/sre3.pdf)
7. [NSF PAR manuscript on NHPP software reliability](https://par.nsf.gov/servlets/purl/10336292)
8. [PERMMA: Enhancing parameter estimation of software reliability growth models: A comparative analysis of metaheuristic optimization algorithms](https://journals.plos.org/plosone/article/file?id=10.1371%2Fjournal.pone.0304055&type=printable)
9. [Multi release software reliability modelling incorporating fault generation in detection process and fault dependency with change point in correction process | Scientific Reports](https://www.nature.com/articles/s41598-025-04102-4)
10. [Reliability Growth Models Criticized](https://www2.hs-fulda.de/~grams/RGM/RGMcriticized.html)
11. [MONICA (NASA technical report, 1966)](https://ntrs.nasa.gov/api/citations/19660009034/downloads/19660009034.pdf)
12. [Amrit L. Goel, Kazu Okumoto (1979). Time-Dependent Error-Detection Rate Model for Software Reliability and Other Performance Measures. IEEE Transactions on Reliability.](https://doi.org/10.1109/tr.1979.5220566)
13. [Shigeru Yamada, Mitsuru Ohba, Shunji Osaki (1984). s-Shaped Software Reliability Growth Models and Their Applications. IEEE Transactions on Reliability.](https://doi.org/10.1109/tr.1984.5221826)
14. [A.L. Goel (1985). Software Reliability Models: Assumptions, Limitations, and Applicability. IEEE Transactions on Software Engineering.](https://doi.org/10.1109/tse.1985.232177)
15. [Nonhomogeneous software error detection rate model: data analyses and applications](https://numdam.org/item/RO_1986__20_1_51_0.pdf)
16. [Classification of software reliability models (IJST)](https://sciresol.s3.us-east-2.amazonaws.com/IJST/Articles/2015/Issue-29/Article26.pdf)
17. [Applicability of Software Reliability Growth Models to Open Source Software](https://ieeexplore.ieee.org/document/10011522/similar#similar)
18. [A Comparative Analysis of Software Reliability Growth Models using defects data of Closed and Open Source Software](https://iris.polito.it/handle/11583/2502526)
19. [A Non-Homogeneous Poisson Process Software Reliability Growth Model with Imperfect Debugging via Hybrid Neural Network–Crow Optimization Parameter Estimation | IIETA](https://iieta.org/journals/mmep/paper/10.18280/mmep.130314)
20. [Infinite-Failure software reliability models based on non-homogeneous markov processes | Software Quality Journal](https://link.springer.com/article/10.1007/s11219-026-09772-5)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 25, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Software engineering and development process › Software testing and quality

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/software-reliability-growth-model

English original: https://www.edgepedia.org/software-reliability-growth-model
