基于机器学习的测试数据异常检测方法研究
Research on Anomaly Detection Methods for Test Data Based on Machine Learning
DOI: 10.12677/csa.2026.165173, PDF,   
作者: 陈维杰:上海市计量测试技术研究院有限公司,上海
关键词: 异常检测孤立森林测试数据特征工程在线监测Anomaly Detection Isolation Forest Test Data Feature Engineering Online Monitoring
摘要: 面对现代工业与制造业设备运行状态检测、环境监测的在线检测需求,文章提出了一套面向测试数据的异常检测方法。该方法构建统一数据门禁与特征工程流程,结合汉宁权滑动去噪、缺失修补、IQR软截断与稳健标准化,并以定长切窗提取时域与频域联合特征,经互信息筛选后输入孤立森林。模型采用子采样集成与固定污染率先验,阈值以得分0.5并联动分位进行轻量校准。基于温度传感器基准数据集的时间阻塞评估,孤立森林取得精确率0.90、召回率0.94、F1‑score 0.92,优于局部离群因子与3σ法则。在相对标准差5%与10%的噪声注入下,F1‑score分别为0.88与0.82,表现出良好的鲁棒性。结果表明,该方法能够在不依赖严格分布假定的条件下稳定识别漂移、跳变与噪声类异常,具备跨批次上线与滚动再训练的工程可用性。
Abstract: In response to the online monitoring demands for equipment operational status inspection and environmental monitoring in modern industry and manufacturing, this paper proposes an anomaly detection method for test data. The method establishes a unified data access control and feature engineering workflow. It integrates Hanning-weighted sliding denoising, missing value imputation, IQR soft truncation, and robust standardization. Fixed-length sliding windows are adopted to extract combined time-domain and frequency-domain features, which are filtered through mutual information and then fed into the Isolation Forest. The model adopts subsampling ensemble learning and a fixed contamination prior. The threshold is lightly calibrated with a baseline score of 0.5 combined with quantile adjustment. Evaluated via time-blocked validation on a benchmark temperature sensor dataset, the Isolation Forest achieves a precision of 0.90, a recall of 0.94, and an F1-score of 0.92, outperforming the Local Outlier Factor and the 3σ criterion. Under noise injection with relative standard deviations of 5% and 10%, the F1-scores reach 0.88 and 0.82, respectively, demonstrating excellent robustness. The experimental results indicate that the proposed method can stably identify drift, jump, and noise-based anomalies without relying on strict distribution assumptions, and it possesses engineering practicability for cross-batch deployment and rolling retraining.
文章引用:陈维杰. 基于机器学习的测试数据异常检测方法研究[J]. 计算机科学与应用, 2026, 16(5): 165-171. https://doi.org/10.12677/csa.2026.165173

参考文献

[1] 陈向效, 崔鑫, 杜秦, 唐浩耀. 基于机器学习的异常流量检测模型优化研究[J]. 计算机科学, 2024, 51(S1): 982-986.
[2] 严文洁, 张阳. 基于深度学习的试飞数据异常检测方法[J]. 中国科技信息, 2025(23): 35-37.
[3] 尚书一, 李宏佳, 宋晨, 卢至彤, 王利明, 徐震. 互联网服务场景下基于机器学习的KPI异常检测综述[J]. 计算机研究与发展, 2025, 62(1): 207-231.
[4] 赵海燕, 吴思雨, 曹健, 陈庆奎. 面向主动学习的异常检测方法: 现状与展望[J]. 小型微型计算机系统, 2025, 47(2): 361-369.
[5] 蔡晓华. 基于机器学习的异常流量检测在智慧审计中的应用研究[J]. 网络安全和信息化, 2025(5): 54-56.
[6] 曾君, 童英华, 王得芳. 基于累积概率波动和自动化聚类的异常检测方法[J]. 计算机应用, 2025, 45(12): 3864-3871.
[7] 杨宏宇, 张豪豪, 胡泽, 成翔. 基于深度学习的网络异常流量检测研究综述[J]. 武汉大学学报(理学版), 2025, 71(2): 159-172.
[8] 陈红松, 刘新蕊, 陶子美, 王志恒. 基于深度学习的时序数据异常检测研究综述[J]. 信息网络安全, 2025, 25(3): 364-391.
[9] 彭易简, 田梦忻, 句媛媛, 吴刘仓. 数据流的异常值在线检测方法[J]. 系统科学与数学, 2025, 46(4): 1311-1324.
[10] 沈夏闰, 李若楠, 张昊田. 基于CVAE-LSTM的服务器KPI异常检测[J]. 系统工程与电子技术, 2025, 47(3): 1019-1027.
[11] 杨海明, 刘莹. 基于大数据技术的网络流量异常检测算法研究[J]. 黑龙江科学, 2025, 16(10): 62-65.
[12] 王婕婷, 张泽珑, 李飞江, 钱宇华. 基于图神经网络的时序信号异常检测方法[J]. 西北大学学报(自然科学版), 2025, 55(2): 343-354.
[13] 徐登彬, 袁立宁, 吴沛宸, 刘钊. 图神经网络驱动的图异常检测研究综述[J]. 计算机科学与探索, 2025, 19(5): 1123-1138.