Modeling Microservice Access Patterns with Multi-Head Attention and Service Semantics - Gong, Ming (Journal of Computer Technology and Software, 2025)
This paper addresses the highly dynamic access patterns and complex temporal dependencies in microservice architectures. It proposes a prediction method based on the Transformer architecture. The goal is to improve the modeling and forecasting accuracy of request traffic in microservice systems. The method builds a multi-layer Transformer network with positional encoding and multi-head attention. It enables efficient modeling of historical access sequences. Service embedding is incorporated to enhance the model's understanding of different service invocation behaviors. In model design, the paper considers a fusion strategy for multi-scale temporal features. This helps extract access patterns at different granularities. Service semantic information is also introduced into the input. These designs improve the model's ability to adapt to service heterogeneity and dynamic fluctuations. In addition, a series of experiments are conducted to systematically evaluate the effects of time window selection, service embedding, input noise disturbance, and multi-scale modeling on prediction performance. The results demonstrate the proposed method's superiority in accuracy, robustness, and stability. The model consistently outperforms existing representative methods across several mainstream evaluation metrics. It captures both access trends and sudden fluctuations more precisely. This provides reliable data support for intelligent management and resource scheduling in microservice systems.