Edge Computing in the Internet of Things (ECIoT) is characterized by device heterogeneity, resource constraints, and dynamically evolving network architectures. These systems face significant challenges regarding multi-source heterogeneous sensing devices, strict real-time requirements, substantial security and privacy risks, continuous management and maintenance, resource scheduling under system dynamics, and complex simulation and testing. These factors necessitate anomaly detection for ensuring ECIoT device and system security. To address these challenges, this paper proposes a data anomaly detection model based on gravitational field modeling coupled with nonparametric density estimation. First, the study reviews existing detection methods and provides a formal definition of ECIoT systems, and the associated data anomaly detection problem, introducing the concepts of gravitational force, field, and potential. Subsequently, a multi-feedback anomaly detection framework is designed. Guided by the characteristics of ECIoT input data, the model utilizes a sliding time window to extract and fuse statistical, temporal-dynamic, and frequency-domain features to establish the gravitational field model and construct the final coupled nonparametric density model, while also detailing the corresponding algorithm steps and pseudocode. Finally, utilizing public datasets such as N-BaIoT, KDD Cup99, and UNSW-NB15, along with a synthetic dataset with ECIoT characteristics generated via rules and methods derived from these data, multi-metric validation and comparative experiments were conducted against k-means, Isolation Forest, LOF, lightweight deep learning, and federated learning algorithms. Experimental results on public datasets demonstrate that the gravitational field distortion index is 0.31 and the gravitational potential gradient standard deviation is 0.14; when anomalies occur, these two indicators shift to 0.59 and 0.30 respectively, with an anomaly identification accuracy exceeding 0.90, indicating that the model possesses good stability and sensitivity. On the synthetic dataset, the anomaly capture rate reaches 0.94. In comparative experiments conducted over 5 to 100 iterations, the F1-Score of the model improves by 21.8% to 30.6%, the AUC-ROC increases from 0.77~0.82 to 0.98, the single-point detection latency is reduced by 88%, and the anomaly detection response latency converges to 0 s. At 100 iterations, the model runtime is significantly lower than that of reference algorithms, and its comprehensive performance is significantly superior to reference algorithms such as k-means, Isolation Forest, LOF, lightweight deep learning, and federated learning. Additionally, ablation experiments were performed on the proposed model by successively removing each core component on four datasets, and repeating the experiments 10 to 100 times to ensure statistical stability. The ablation results demonstrate that after removing key components such as the feedback mechanism and anomaly scoring, the maximum reduction in F1-Score is 12%. Furthermore, the Friedman test and Nemenyi post-hoc validation confirm that the complete model significantly outperforms the ablation variants. Through gravitational field coupling with multi-feedback mechanisms and nonparametric density coupling with normalized feature fusion, this model provides a high-accuracy, low-latency anomaly detection solution for complex ECIoT environments.
传统物联网系统以远程云计算中心或数据中心为核心,因其具有终端海量性、环境复杂性与交互开放性等特征,导致其网络延迟大、资源利用率低和网络拥塞突出等,而且在其运行过程中持续产生高维、非线性的动态时变数据,遇到恶意攻击、设备故障和环境扰动而导致难以预计的异常数据。边缘计算将计算和存储能力迁移到网络边缘,使得数据传输延迟降低、资源利用率大幅提升、网络拥塞减少;将边缘计算与物联网结合,形成一种新型的物联网范式——物联网边缘计算(Edge Computing in Internet of Things, ECIoT),使得物联网由传统模式向边缘计算模式演进而大幅提升物联网效能[1]。ECIoT已在工业物联网、车联网、智慧城市和应急预警等领域进行应用,这些应用边缘侧的数据处理能力、存储容量和电池供电等均受限于资源制约,而边缘侧环境复杂,设备故障、网络攻击和信号干扰等导致在其数据流极易包含各类异常[2]。异常检测是安全防护的重要组成部分,其作用是对边缘数据异常行为或状态进行精准判决,对保障ECIoT系统稳定运行、提升数据可靠性及防护潜在风险等,具有至关重要的理论和现实意义[3]。
评价指标用于检验模型异常检测效率、准确度和精确度,本文所用评价指标分为引力场特有指标和异常检测普通指标,引力场特有指标为引力场畸变度、引力势能梯度方差、引力场局部畸变率、引力势分布熵、引力聚焦因子和引力场强度时空连续性等,异常检测普通指标为F1-Score、AUC-ROC(Area Under the Receiver Operating Characteristic Curve, AUC-ROC)值、内存峰值、异常响应延迟和单点检测延迟等,模型实验选用引力场特有指标进行评价,对比实验选用异常检测普通指标进行评价。
ShiW, CaoJ, ZhangQ, et al. Edge computing: vision and challenges[J]. IEEE Internet Things J, 2016, 3(5): 637-646.
[2]
OrtegaE, SuF, ChattopadhyayR, et al. Discretized-isolation forest: Memory- and compute-efficient unsupervised anomaly detection for resource-constrained Internet of Things edge devices[J]. IEEE Internet Things J, 2025, 12(2): 1699-1717.
[3]
EdozieE, ShuaibuA N, SadiqB O, et al. Artificial intelligence advances in anomaly detection for telecom networks[J]. Artif Intell Rev, 2025, 58(4): 10001-10040.
[4]
BoujradM, KasmiM A, OuerdiN, et al. Anomaly based detection in time series data on IoT systems using statistical models[J]. Indones J Electr Eng Comput Sci, 2025, 37(3): 1845-1855.
[5]
PuniaA, TiwariM, VermaS S. A machine learning-based efficient anomaly detection system for enhanced security in compromised and maligned IoT Networks[J]. Results Eng, 2025, 26(6): 105562.
[6]
BelayM A, BlaksethS S, RasheedA, et al. Unsupervised anomaly detection for IoT-based multivariate time series: Existing solutions, performance analysis and future directions[J]. Sensors, 2023, 23(5): 2844-2868.
[7]
TejaswiniR, AbinayaP, AnuprabhaS S, et al. Anomaly detection in IoT networks:A deep learning approach using autoencoders[J]. IEEE Access, 2025, 13: 132739-132749.
[8]
ZiaS, BibiN, AlhazmiS, et al. Enhanced anomaly detection in IoT through transformer-based adversarial perturbations model[J]. Electronics, 2025, 14(6): 1094-1107. .
[9]
LiuX, GongZ, ZhangX. Research on anomaly detection in wastewater treatment systems based on a VAE-LSTM fusion model[J]. Water, 2025, 17(19): 2842-2862.
[10]
ZhengM Q, SunM N, ZengH,et al.Time series anomaly detection of variational autoencoder using fusion diffusion model[J]. Journal of Chongqing University of Posts and Telecommunications(Natural Science Edition), 2025, 37(6): 792-804.
CaoY, XiangH, ZhangH, et al. Anomaly detection based on isolation mechanisms: A survey[J]. Mach Intell Res, 2025, 22(5): 849-865.
[13]
DengS, ZhaoH, FangW, et al. Edge intelligence: The confluence of edge computing and artificial intelligence[J]. IEEE Internet Things J, 2020, 7(8): 7457-7469.
[14]
HuangW, XuH, GongY, et al. UltraADV: An unsupervised deep learning lightweight framework for anomaly detection in V2X[J]. IEEE Internet Things J, 2024, 12(9): 12735-12747.
[15]
LiuJ, XuH, WangL, et al. Adaptive asynchronous federated learning in resource-constrained edge computing[J]. IEEE Trans Mob Comput, 2023, 22(2): 674-690.
[16]
JiangX, LuC, LuoH, et al. Unsupervised distributed anomaly detection framework for IoT in edge AI network[J]. IEEE Internet Things J, 2025, 12(12): 22058-22072.
[17]
HajjS, AzarJ, Bou AbdoJ, et al. Cross-layer federated learning for lightweight IoT intrusion detection systems[J]. Sensors, 2023, 23(16): 7038-7064.
[18]
LuZ, AfridiI, KangH J, et al. Surveying neuro-symbolic approaches for reliable artificial intelligence of things[J]. J Reliab Intell Environ, 2024, 10(3): 257-279.
[19]
WuY, LiangL, JiaY, et al. HFL-TranWGAN: Knowledge-driven cross-domain collaborative anomaly detection for end-to-end network slicing[J]. IEEE Trans Netw Serv Manag, 2025, 22(1): 760-776.
[20]
WangY, GuoR, MinP. A survey of applications for anomaly detection in the IoT: Methods, new perspectives, and future[C]//2024 IEEE International Conference on Systems, Man, and Cybernetics (SMC). Kuching, Malaysia: IEEE, 2024: 2453-2460.
[21]
JiangS Y, LiQ H, WangH. A gravity-based intrusion detection method[C]//Grid and Cooperative Computing: GCC 2004 Workshops. Berlin, Heidelberg: Springer Berlin Heidelberg, 2004: 522-529.
[22]
MengJ L, ChengW X. Research of gravity-based outliers detection[C]//2008 International Conference on Intelligent Information Hiding and Multimedia Signal Processing. Harbin, China:IEEE, 2008: 590-593.
[23]
WangB Y, JinR R, ZhangS M, et al. Research on gravity-based anomaly intrusion detection algorithm [C]//2009 Fifth International Conference on Information Assurance and Security. Xi’an, China:IEEE, 2009: 350-353.
[24]
BhartiS, PattanaikK K. Gravitational outlier detection for wireless sensor networks[J]. Int J Commun Syst, 2016, 29(13): 2015-2027.
[25]
WuQ, LiuH, Zhang CX, et al. Trajectory protection schemes based on a gravity mobility model in IoT [J]. Electronics, 2019, 8(2): 14801-14819.
[26]
WangQ, WangX H, LiuH, et al. A domain adaptive IoT intrusion detection algorithm based on GWR-GCN feature extraction and conditional domain adversary[J]. IEEE Internet Things J, 2024, 11(24): 41223-41234.
[27]
SunG Y, LiuQ H, LiuQ, et al. A novel approach for edge detection based on the theory of universal gravity[J]. Pattern Recognit, 2007, 40(10): 2766-2775.
[28]
ZhaoZ, SongJ L, YouM T, et al. Hyperspectral anomaly detection via cascaded convolutional autoencoders with adaptive pixel-level attention[J]. Expert Syst Appl, 2025, 279(6): 127366.
[29]
Mohith NiranjenR K, YogeshC, VinodhA, et al. Implementation for lightweight deep learning for anomaly detection and denoising on gravitational waves[J]. IEEE Access, 2025, 13: 72442-72455.
[30]
Fumanal-IdocinJ, Rodriguez-MartinezI, IndurainA, et al. Almost aggregations in the gravitational clustering to perform anomaly detection[J]. Inf Sci, 2022, 612: 399-413.
[31]
LiZ, ZhaoY, HuX Y, et al. ECOD: unsupervised outlier detection using empirical cumulative distribution functions[J]. IEEE Trans Knowl Data Eng, 2023, 35(12): 12181-12193.
[32]
LiZ, ZhuY X, Van LeeuwenM V. A survey on explainable anomaly detection[J]. ACM Trans Knowl Discov Data, 2024, 18(1): 1-54.
[33]
WangL X, KeY B. Feature selection considering interaction, redundancy and complementarity for outlier detection in categorical data[J]. Knowl Based Syst, 2023, 275: 110678.
[34]
WanJ H, ChenY P, GaoC. The VAE-FastGA anomaly detection model based on subspace and weakly correlated ultra-high-dimensional data[J]. J Supercomput, 2025, 81(3): 49501-49532.
[35]
SaeedW, OmlinC. Explainable AI (XAI): A systematic meta-survey of current challenges and future opportunities[J]. Knowl Based Syst, 2023, 263: 110273.
[36]
VorobyovE I, McKevittJ, KulikovI, et al. Computing the gravitational potential on nested meshes using the convolution method[J]. Astron Astrophys, 2023, 671: A81:1-15.
[37]
CaoY K, XuX H, ChengY Q, et al. Personalizing vision-language models with hybrid prompts for zero-shot anomaly detection[J]. IEEE Trans Cybern, 2025, 55(4): 1917-1929.
[38]
PillaiS P. Modern anomaly detection: Benchmarking, scalability and a novel approach[D]. Trento, Italy: University of Trento, 2025:1-137.
[39]
CaiK, ZhangH, LiM, et al. Adaptive granular data compression and interval granulation for efficient classification[J]. Inf Sci, 2025, 691(2): 121644.
[40]
VerrelliC M, TomeiP. Strong Lyapunov functions for linear time-varying systems under persistency of excitation[J]. IEEE Trans Autom Control, 2024, 70(3): 2028-2034.
[41]
TsoulisD, GavriilidouG, PoursinaM, et al. Degree wise validation of gravity spherical harmonics for polyhedral sources[J]. Surv Geophys, 2025, 46(4): 843-871.
[42]
YangT T, LuZ, CuiG Z, et al. Funnel-based predefined-time formation control for heterogeneous vehicle platoon with asymptotic tracking[J]. IEEE Trans Veh Technol, 2025, 74(5): 7178-7187.
[43]
KoukarasP, TjortjisC. Data preprocessing and feature engineering for data mining: Techniques, tools, and best practices[J]. AI, 2025, 6(10): 257-297.
[44]
LiuJ, ZhuK, ShuY, et al. Trajectory prediction model of a ship crossing under a bridge based on multi-head attention mechanism and Wasserstein GAN with gradient penalty[J]. Ocean Eng, 2025, 334: 121551.
[45]
ChangY L, YueG H, ZhaoB. Cross-domain feature interaction network for stereo image quality assessment considering difference information guiding binocular fusion[J]. IEEE Trans Broadcast, 2025, 71(2): 593-605.
[46]
ZengY J, Calvo-PalominoR, GiustinianoD, et al. Adaptive uplink data compression in spectrum crowdsensing systems[J]. IEEE/ACM Trans Netw, 2023, 31(5): 2207-2221.
[47]
PioliL, de MacedoD D J, CostaD G, et al. Intelligent edge-powered data reduction: A systematic literature review[J]. ACM Comput Surv, 2024, 56(9): 1-39.
[48]
PatelJ, ReinerJ, StilwellB, et al. Leveraging K-means clustering and Z-score for anomaly detection in Bitcoin transactions[J]. Informatics, 2025, 12(2): 43-55.
GaffetA, RibotP, ChantheryE, et al. Multi-block local outlier factor anomaly detection of complex industrial systems[J]. Appl Intell, 2025, 55(10): 75301-75325.
[51]
ChenL, CaoX Z, HeT Q, et al. A lightweight All-MLP time-frequency anomaly detection for IIoT time series[J]. Neural Netw, 2025, 187(6): 107400.
[52]
LiuX L, SuX, Del CampoG, et al. Federated learning on 5G edge for industrial Internet of Things [J]. IEEE Netw, 2025, 39(1): 289-297.
[53]
SunY T, ChenT, NguyenQ V H, et al. TinyAD: Memory-efficient anomaly detection for time-series data in industrial IoT[J]. IEEE Trans Ind Inform, 2023, 20(1): 824-834.
[54]
LinX L, YaoY, HuB, et al. A real-time anomaly detection method for industrial control systems based on long-short period deterministic finite automaton [J]. IEEE Internet Things J, 2025, 12(10): 14599-14621.
[55]
LiR Y, LiQ, HuangY C, et al. SeIoT: Detecting anomalous semantics in smart homes via knowledge graph[J]. IEEE Trans Inf Forensics Secur, 2024, 19: 7005-7018.