A base station traffic prediction method and apparatus
By employing a base station traffic prediction method that combines self-attention and multi-head attention mechanisms in railway 5G private networks, the problem of inaccurate base station traffic prediction in railway 5G private networks has been solved, achieving more accurate traffic prediction and energy-saving control, and improving user experience and network resource management efficiency.
Patent Information
- Application Number
- CN202510024190.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-01-07
AI Technical Summary
Existing base station traffic prediction methods are not ideal in railway 5G private networks, as they cannot effectively capture the spatiotemporal variation patterns of base station traffic, resulting in inaccurate energy-saving control decisions.
A base station traffic prediction method is adopted. The first branch extracts the spatial correlation between traffic between adjacent base stations and the temporal correlation of traffic sequences of a single base station. The self-attention mechanism is used to model sudden changes, and the multi-head attention mechanism is combined to model the abrupt distribution pattern. The second branch extracts the temporal correlation of periodic adjacent traffic sequences. Finally, the prediction is performed through feature fusion.
It improves the accuracy and flexibility of base station traffic prediction, enabling a more comprehensive capture of base station traffic change patterns, supporting operators in dynamically adjusting network resources, reducing energy consumption and operating costs, and enhancing user experience.
Smart Images

Figure CN120034873B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of base station traffic prediction, and particularly relates to a base station traffic prediction method and device. BACKGROUND
[0002] With the construction demand of intelligent transportation and the proposal of intelligent high-speed rail architecture, the ubiquitous interconnection requirement of intelligent high-speed rail requires huge bandwidth for train-ground wireless data transmission. At the same time, due to the high reliability requirement of high-speed rail train control system for train-ground wireless data transmission, the demand for upgrading railway wireless communication to the next generation of broadband communication system with higher transmission rate and constructing railway 5G private network is generated. However, due to the increase in the number of railway 5G private network base stations and the significant increase in the energy consumption of single base station, the importance of base station energy saving technology is increasing, and it is necessary to accurately guide the energy saving control decision of the base station through base station traffic prediction.
[0003] At present, the research on base station traffic prediction is mainly based on the mathematical characteristics of service data itself, rather than the special application scenarios of services. In the spatial dimension, railway 5G private network base stations are arranged in one-dimensional line, in the time dimension, trains are intermittently running, there are corresponding window periods for maintenance and repair at night, and services have burstiness, periodicity and other characteristics. These all cause the traffic of railway 5G private network base stations to be quite different from that in the public mobile communication civil scenario, and the effect of using conventional public network base station traffic prediction method is not ideal. SUMMARY
[0004] The present application provides a base station traffic prediction method and device to solve the defect that the effect of conventional public network base station traffic prediction method is not ideal, which can more comprehensively capture the change rule of base station traffic and more effectively process the complex relationship in the time-space sequence data to improve the prediction accuracy. The technical scheme provided by the present application is as follows:
[0005] In a first aspect, the present application provides a base station traffic prediction method, comprising:
[0006] obtaining a traffic time-space sequence and a base station traffic prediction model; wherein the traffic time-space sequence comprises a first traffic sequence and a second traffic sequence, and the base station traffic prediction model comprises a first branch, a second branch and an output layer;
[0007] The first branch extracts the spatial correlation between adjacent base station traffic and the time correlation of a single base station traffic sequence based on the first traffic sequence, and uses a self-attention mechanism to model the burstiness change of a same base station traffic in time and a multi-head attention mechanism to model the mutation distribution rule of traffic between different base stations in a same period in space, to obtain a first feature tensor;
[0008] The second branch extracts the time correlation of the second traffic sequence to obtain a second feature tensor;
[0009] perform feature fusion on the first feature tensor and the second feature tensor based on the output layer, and output a traffic prediction value of each base station for a to-be-predicted period;
[0010] The first traffic sequence is continuous traffic data of multiple base stations in multiple periods before a to-be-predicted period, and the second traffic sequence is continuous traffic data of the same multiple base stations in multiple periods before and after the same period of a day before the to-be-predicted period.
[0011] Optionally, the first branch includes a one-dimensional convolutional network, a time self-attention long short-term memory module, and a spatial multi-head attention module.
[0012] The first branch extracts spatial correlation between adjacent base station traffics and time correlation of a single base station traffic sequence based on the first traffic sequence, and uses a self-attention mechanism to model the burst change of the same base station traffic over time in the time dimension and uses a multi-head attention mechanism to model the mutation distribution law of the traffics between different base stations in the same period in the space dimension, to obtain a first feature tensor, including:
[0013] The one-dimensional convolutional network extracts spatial correlation features between adjacent base station traffics based on the first traffic sequence to obtain spatial correlation features of each period.
[0014] The time self-attention long short-term memory module extracts time correlation features of traffics of adjacent periods based on the spatial correlation features of each period to obtain a space-time feature tensor.
[0015] The spatial multi-head attention module calculates the first feature tensor based on the space-time feature tensor and the spatial correlation features.
[0016] Optionally, the time self-attention long short-term memory module includes a first long short-term memory network, a second long short-term memory network, and a time self-attention module.
[0017] The time self-attention long short-term memory module extracts time correlation features of traffics of adjacent periods based on the spatial correlation features of each period to obtain a space-time feature tensor, including:
[0018] The first long short-term memory network determines space-time correlation features of a current period based on the spatial correlation features of the current period and space-time correlation features of a previous period, and splices the space-time correlation features of each period to obtain a first output.
[0019] The time self-attention module calculates an attention matrix based on the first output.
[0020] The second long short-term memory network encodes the attention matrix to obtain the space-time feature tensor.
[0021] Optionally, the spatial multi-head attention module calculates the first feature tensor based on the spatiotemporal feature tensor and the spatially related features, including:
[0022] The spatiotemporal feature tensor is divided into multiple heads along the feature dimension;
[0023] Calculate the query matrix, key matrix, and value matrix corresponding to each head based on the spatiotemporal feature tensor and the spatial correlation features;
[0024] The first feature tensor is determined based on the query matrix, key matrix, and value matrix of each head.
[0025] Optionally, the spatial multi-head attention module determines the first feature tensor based on the spatiotemporal feature tensor and the spatially relevant features using the following formula:
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032] in, These represent the query matrix, key matrix, and value matrix, respectively. , , They represent the first The query matrix, key matrix, and value matrix of each size. Indicates the number of heads. , , , Represents trainable linear transformation weights. Indicates spatially relevant features, Represents the spatiotemporal feature tensor. Indicates the first Attention matrix of size, This represents the attention calculation function. This indicates the outcome of the multi-head attention mechanism. This indicates a splicing operation. Let represent the first feature tensor.
[0033] Optionally, the second branch is a bidirectional long short-term memory network, and the second feature tensor comprises forward time correlation features and reverse time correlation features.
[0034] The second branch extracts time correlation of the second traffic sequence to obtain a second feature tensor, comprising:
[0035] Based on the bidirectional long short-term memory network, time correlation of the second traffic sequence is extracted from the forward and reverse directions, and forward time correlation features and reverse time correlation features are output.
[0036] In a second aspect, the present application further provides a base station traffic prediction device, comprising the following modules:
[0037] The acquisition module is configured to acquire a traffic space-time sequence and a base station traffic prediction model, wherein the traffic space-time sequence comprises a first traffic sequence and a second traffic sequence, and the base station traffic prediction model comprises a first branch, a second branch and an output layer.
[0038] The modeling module is configured to extract, by the first branch, spatial correlation between adjacent base station traffics and time correlation of a single base station traffic sequence based on the first traffic sequence, and model, by using a self-attention mechanism in a time dimension, burst changes of a same base station traffic over time, and model, by using a multi-head attention mechanism in a space dimension, sudden change distribution rules of traffics between different base stations in a same period, to obtain a first feature tensor.
[0039] The extraction module is configured to extract, by the second branch, time correlation of the second traffic sequence to obtain a second feature tensor.
[0040] The prediction module is configured to perform feature fusion on the first feature tensor and the second feature tensor based on the output layer, and output a traffic prediction value of each base station in a to-be-predicted period; wherein the first traffic sequence is continuous traffic data of multiple base stations in multiple periods before the to-be-predicted period, and the second traffic sequence is continuous traffic data of the same multiple base stations in multiple periods before and after a same period of a day before the to-be-predicted period.
[0041] In a third aspect, the present application further provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and running on the processor, and the processor implements the base station traffic prediction method of the first aspect when executing the computer program.
[0042] In a fourth aspect, the present application further provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the base station traffic prediction method of the first aspect.
[0043] In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the base station traffic prediction method according to the first aspect.
[0044] Based on the above technical solution, the present application has the following beneficial effects compared with the prior art:
[0045] The base station traffic prediction method and device provided by the present application are based on the space-time correlation characteristics of railway 5G private network base station traffic, extract the space correlation between adjacent base station traffic through the first branch, and extract the time correlation of the base station traffic sequence; for the burstiness of railway 5G private network base station traffic, the self-attention mechanism is used in the time dimension to model the burstiness change of the same base station traffic in time, and the multi-head attention mechanism is used in the space dimension to model the mutation distribution law of the traffic between different base stations in the same period; for the periodicity of railway 5G private network base station traffic, the time correlation of the periodic adjacent traffic sequence is extracted through the second branch; finally, the feature tensors coded by the two branches are fused, and the predicted traffic value is output by the full connection layer. By combining the space correlation, the time burstiness change and the periodicity, the method can more comprehensively capture the change law of the base station traffic. The use of the self-attention mechanism and the multi-head attention mechanism can more effectively process the complex relationship in the space-time sequence data and improve the prediction accuracy.
[0046] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application will be realized and achieved by the structure particularly pointed out in the description, claims and drawings.
[0047] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are specifically described below, and the accompanying drawings are described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0049] Figure 1 is a flowchart of the base station traffic prediction method provided by the present application.
[0050] Figure 2 is a structural diagram of the base station traffic prediction model provided by the present application.
[0051] Figure 3FIG. 1 is a structural schematic diagram of a time self-attention long short-term memory module provided by the present application.
[0052] Figure 4 FIG. 2 is a structural schematic diagram of a time self-attention module provided by the present application.
[0053] Figure 5 FIG. 3 is a structural schematic diagram of a spatial multi-head attention module provided by the present application.
[0054] Figure 6 FIG. 4 is a schematic diagram of a spatial multi-head attention calculation process provided by the present application.
[0055] Figure 7 FIG. 5 is a structural schematic diagram of a bidirectional long short-term memory network provided by the present application.
[0056] Figure 8 FIG. 6 is a structural schematic diagram of a base station traffic prediction device provided by the present application.
[0057] Figure 9 FIG. 7 is a structural schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION
[0058] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, but not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0059] Most of the existing base station traffic prediction technologies are designed for the service scenarios and rules of public network cellular base stations. The service negative traffic prediction problem of public network base stations is divided into two main types-time series prediction problem and space-time series prediction problem. For the single base station traffic time series prediction problem, since there is only one base station, only the traffic of the users or devices connected to the base station is considered, and only the time dependence in the historical traffic data of the single base station is used to predict the future traffic of the base station. For the more complex problem of multi-base station traffic space-time series prediction, the traffic of the base station is not only related to the users or devices connected to the base station, but also related to the movement and switching of the users between the base stations. Therefore, in addition to considering the time correlation of the single base station traffic value sequence, the traffic in multiple base stations or multiple regions and their spatial correlation also need to be considered.
[0060] Existing base station traffic prediction models can be roughly divided into three categories, namely statistical models, machine learning models and deep learning models. Most statistical models are based on the linear relationship between input and output values, and the performance often lags behind machine learning models with the ability to describe and learn nonlinear relationships. Due to the use of manually extracted and constructed features and the limitations of the solution process, the ability of machine learning models to learn the complex spatio-temporal correlation of traffic data is limited, and the effect is often poor in base station traffic prediction. Most of the current traffic prediction methods with better effect are deep learning models, and deep learning-based models have the ability to model spatio-temporal correlation, and are widely used in spatio-temporal sequence prediction problems. The core of the spatio-temporal sequence prediction model based on deep learning is the mining and extraction and fusion of time correlation and spatial correlation. The method commonly used for time correlation modeling is recurrent neural network. According to the characteristics of the spatial dimension of the spatio-temporal sequence, for the spatio-temporal sequence with grid-shaped spatial structure, the spatial correlation is extracted using convolutional neural network; for the spatio-temporal sequence with graph structure, the spatial correlation is extracted using graph convolution network.
[0061] The unique spatio-temporal characteristics of railway 5G private network base station traffic bring new challenges to the establishment of traffic prediction models. From the spatial dimension, the base station is arranged along the one-dimensional line of the railway, and from the time dimension, the change of base station traffic has a periodicity of days, and at the same time has a burstiness, the traffic values of adjacent time periods are not smooth fluctuations, but irregular sawtooth changes with alternating peak and valley values, which makes the effect of using conventional public network base station traffic load prediction methods not ideal. Attention mechanism is a method that simulates human attention thinking, which can improve the learning and use of important information by the model by giving it the ability to focus. In spatio-temporal sequence prediction, attention mechanism can help the model better capture key spatio-temporal features in the sequence and improve prediction accuracy. By adjusting the attention weights of different parts, the model can dynamically focus on different parts of the input sequence, making the prediction results more accurate and reliable. Based on the above background, the present application proposes a base station traffic prediction method based on spatio-temporal attention and multi-branch convolution-long short-term memory network in railway 5G private network.
[0062] The following explains the terms involved in the present application:
[0063] (1) Railway 5G private network:
[0064] The railway 5G private network mainly carries services related to train operation command, control and operation and maintenance. The service data types include voice, data and video. After superimposing the application service scenarios, the railway 5G private network includes railway emergency call, train-related dispatch voice communication, other dispatch voice communication, dispatch video communication, train information data transmission, train safety data transmission, operation and maintenance voice communication, operation and maintenance alarm data transmission, operation and maintenance control data transmission, operation and maintenance other data transmission, operation and maintenance video transmission, emergency voice communication, emergency data transmission, emergency video communication, emergency video transmission and the like.
[0065] (2) Periodicity of traffic (periodicity of train operation leads to periodicity of base station traffic):
[0066] Since the services of the base station in the railway 5G private network mainly come from the interaction between the base station and the passing train, the change of the base station traffic is inevitably closely related to the operation law of the train. Because the daily operation schedule of the train is often similar, the traffic of the base station in the railway 5G private network also has a periodicity of a day.
[0067] (3) Burstiness of traffic:
[0068] In the usual public network scenario, the traffic change of the same base station is often continuous and gentle fluctuation, and the values of different base stations at the same time are often close. However, in the railway 5G private network, since the base station only has traffic when the train passes by, the traffic change of the base station has obvious burstiness. From the time dimension, the traffic change of the same base station is not gentle fluctuation but burst, showing irregular jaggedness with alternating peak and valley. From the spatial dimension, the distribution of the traffic of different base stations at the same time is also different from the conventional public network scenario, and the traffic of adjacent base stations is not necessarily close, and the traffic distribution shows a sudden change with high and low parts.
[0069] The base station traffic prediction method and device of the present application will be described below. Figures 1-8
[0070] Referring to FIG. 1, Figure 1 the base station traffic prediction method includes the following steps:
[0071] Step S110, acquiring a traffic spatio-temporal sequence and a base station traffic prediction model; wherein the traffic spatio-temporal sequence includes a first traffic sequence and a second traffic sequence, and the base station traffic prediction model includes a first branch, a second branch and an output layer.
[0072] The first traffic sequence is continuous traffic data of multiple base stations in multiple time periods before the to-be-predicted period. The second traffic sequence is continuous traffic data of the same multiple base stations in multiple time periods before and after the same time period of the previous day.
[0073] Obtain the spatiotemporal sequence of traffic, including the first traffic sequence and the second traffic sequence mentioned above. Obtaining the first traffic sequence specifically involves collecting continuous traffic data from multiple time periods and multiple base stations prior to the period to be predicted. That is, the data prior to the period to be predicted... consecutive time periods Traffic of each base station These data reflect historical changes in base station traffic and are a crucial foundation for predicting future traffic. Obtaining the second traffic sequence specifically involves collecting continuous traffic data from multiple time periods before and after the same time period on the day before the predicted period, and from the same multiple base stations. That is, continuous traffic data from multiple time periods before and after the same time period on the day before the predicted period. consecutive time periods Traffic of each base station This data helps to capture periodic changes in base station traffic, improving the accuracy of predictions.
[0074] The first and second flow sequences described above are cleaned to remove missing or outlier values. Missing values can be imputed using interpolation methods (such as linear interpolation or Newton interpolation); outliers can be identified and removed using statistical methods (such as the 3σ principle) or machine learning algorithms (such as Isolation Forest). The flow data is then converted to a uniform range (such as 0-1) to improve model training efficiency and prediction accuracy. Normalization methods include min-max normalization and Z-score normalization.
[0075] The aforementioned base station traffic prediction model consists of a first branch, a second branch, and an output layer. The first branch is the main branch, and its input is the time period before the prediction. consecutive time periods Traffic of each base station The first branch is responsible for extracting spatial correlations and temporal abrupt changes. The second branch is an auxiliary branch, whose input is the time intervals before and after the same time period on the day preceding the period to be predicted. consecutive time periods Traffic of each base station The second branch is responsible for extracting temporal correlations, while the output layer is responsible for feature fusion and traffic prediction.
[0076] The preprocessed traffic spatiotemporal sequence is input into the trained base station traffic prediction model, and the model can output the traffic prediction value for each base station during the predicted period based on the input data.
[0077] Step S120: The first branch extracts the spatial correlation between traffic of adjacent base stations and the temporal correlation of traffic sequence of a single base station based on the first traffic sequence. It uses a self-attention mechanism in the time dimension to model the sudden change of traffic of the same base station in time, and uses a multi-head attention mechanism in the spatial dimension to model the abrupt distribution law of traffic between different base stations in the same time period, and obtains the first feature tensor.
[0078] The first branch processes the first traffic sequence to extract the spatial correlation between the traffic of adjacent base stations. Graph neural networks can process data in non-Euclidean spaces, such as the connection relationships between base stations, thereby capturing the spatial distribution of base station traffic.
[0079] The first branch also models the temporal burstiness changes, specifically, in the time dimension, using a self-attention mechanism to process the first traffic sequence, modeling the burstiness changes of the traffic of a base station over time. The self-attention mechanism can dynamically capture key information in the time series, improving the prediction ability of the model.
[0080] The first branch also models the spatial mutation distribution, specifically, in the spatial dimension, using a multi-head attention mechanism to process the traffic between different base stations in the same period, modeling the mutation distribution of the traffic. The multi-head attention mechanism can simultaneously focus on information from multiple positions, enhancing the model's ability to handle complex relationships.
[0081] In step S130, the second branch extracts the temporal correlation of the second traffic sequence to obtain a second feature tensor.
[0082] The second branch can use a recurrent neural network (such as LSTM or GRU) to process the second traffic sequence to extract the temporal correlation. The recurrent neural network can capture long-term dependencies in the time series, which helps to predict future traffic changes.
[0083] In step S140, the output layer is used to fuse the first feature tensor and the second feature tensor, and output the traffic prediction value for each base station in the to-be-predicted period.
[0084] The output layer includes a feature fusion layer and a fully connected layer. The feature fusion layer concatenates or weightedly fuses the first feature tensor and the second feature tensor to obtain a fused feature vector. Concatenation is to concatenate the two feature tensors together according to the dimension, and weighted fusion is to weightedly sum the two feature tensors according to the weights. The fully connected layer is used to process the fused feature vector, and output the traffic prediction value for each base station in the to-be-predicted period. The fully connected layer can map the fused feature vector to the prediction value, realizing the prediction of the traffic.
[0085] The base station traffic prediction method provided by the application is characterized in that, in view of the space-time correlation characteristics of the railway 5G private network base station traffic, the spatial correlation between adjacent base station traffics is extracted through a first branch, and the time correlation of the base station traffic sequence is extracted; in view of the burstiness of the railway 5G private network base station traffic, the burstiness change of the same base station traffic over time is modeled using a self-attention mechanism in the time dimension, and the mutation distribution law of the traffics between different base stations in the same period is modeled using a multi-head attention mechanism in the space dimension; in view of the periodicity of the railway 5G private network base station traffic, the time correlation of the periodic adjacent traffic sequence is extracted through a second branch; finally, the feature tensors coded by the two branches are fused, and the predicted traffic value is output by a fully connected layer. By combining the spatial correlation, the time burstiness change and the periodicity, the method can more comprehensively capture the change law of the base station traffic. By using the self-attention mechanism and the multi-head attention mechanism, the complex relationships in the space-time sequence data can be more effectively processed, and the prediction accuracy can be improved.
[0086] Moreover, the method can process traffic data of different base stations and different time periods, and has strong generalization ability. Through the pre-trained traffic prediction model, the new base station traffic prediction task can be quickly adapted. Accurate base station traffic prediction helps operators to dynamically adjust network resource allocation according to traffic demand. In the low traffic period, part of the base stations or carrier frequencies can be closed to reduce energy consumption and operating costs. By predicting the base station traffic, the operator can deploy network resources in advance to ensure stable network services in peak periods, improve user experience and satisfaction.
[0087] In an optional embodiment, the main task of the first branch is to extract the spatial correlation between adjacent base station traffics from the first traffic sequence, model the burstiness change of the same base station traffic over time using a self-attention mechanism in the time dimension, and model the mutation distribution law of the traffics between different base stations in the same period using a multi-head attention mechanism in the space dimension, and finally obtain a first feature tensor. Referring to Figure 2 The first branch described above includes a one-dimensional convolutional network (1D-CNN), a time self-attention long short-term memory module (i.e., a time self-attention LSTM network in Figure 2 and a spatial multi-head attention module.
[0088] The first branch based on the first traffic sequence extracts the spatial correlation between adjacent base station traffics and the time correlation of a single base station traffic sequence, models the burstiness change of the same base station traffic over time using a self-attention mechanism in the time dimension, and models the mutation distribution law of the traffics between different base stations in the same period using a multi-head attention mechanism in the space dimension, and obtains a first feature tensor, including:
[0089] S1201, a one-dimensional convolutional network extracts spatial correlation features between adjacent base station traffics based on the first traffic sequence, to obtain spatial correlation features of each period.
[0090] The one-dimensional convolutional network is used to process the first traffic sequence, i.e., the continuous traffic data of multiple base stations in multiple periods before the to-be-predicted period. Through convolution operation, the network can extract spatial correlation features between adjacent base station traffics. Specifically, the convolution kernel slides on the traffic data, locally perceives the base station traffic of each period, and thus extracts spatial correlation features of each period. These features reflect the mutual relationship between adjacent base station traffics, and provide a basis for subsequent time self-attention and spatial multi-head attention processing.
[0091] S1202, a time self-attention long short-term memory module extracts time correlation features of traffics in front and back periods based on the spatial correlation features of each period, to obtain a spatio-temporal feature tensor.
[0092] The time self-attention long short-term memory module is used to extract spatio-temporal features. The time self-attention long short-term memory module (Temporal Self-Attention LSTM Module) combines the advantages of self-attention mechanism and long short-term memory network (LSTM). The module first receives the spatial correlation features of each period output by the one-dimensional convolutional network, and then uses the self-attention mechanism to capture the time correlation features of traffics in front and back periods. The self-attention mechanism dynamically adjusts the influence weight of each period on the current period by calculating the similarity between different periods, so as to capture the time burst change of the traffic. At the same time, the LSTM network can capture the long-term dependence relationship in the time sequence, and further extract the spatio-temporal feature tensor. These feature tensors contain both spatial correlation information and time correlation information, and provide rich feature representation for subsequent spatial multi-head attention processing.
[0093] S1203, a spatial multi-head attention module calculates the first feature tensor based on the spatio-temporal feature tensor and the spatial correlation features.
[0094] The spatial multi-head attention module calculates a first feature tensor based on the spatial correlation feature output by the spatio-temporal feature tensor and the one-dimensional convolution network through a spatial multi-head attention mechanism. The spatial multi-head attention mechanism divides the input feature into multiple subspaces and independently performs attention calculation in each subspace, and finally splices the attention results of all subspaces to obtain the final attention output. This mechanism can simultaneously pay attention to information of multiple positions and enhance the processing capability of the model for complex relationships. Through the processing of the spatial multi-head attention module, the first feature tensor not only contains the spatial correlation information, the temporal burst change information of the base station traffic, but also contains the mutation distribution rule information of the traffic between different base stations in the same period, providing comprehensive feature representation for subsequent traffic prediction.
[0095] The first branch can comprehensively capture the spatial correlation, temporal burst change and mutation distribution rule of the traffic between different base stations in the same period of the base station traffic, thereby improving the prediction accuracy. The design of the first branch considers the spatio-temporal characteristics of the base station traffic, so that the model can process traffic data of different base stations and different time periods, and has strong generalization ability. This helps the model to quickly adapt to new base station traffic prediction tasks and improves the practicability and flexibility of the model. The spatial correlation feature is extracted through the one-dimensional convolution network, which reduces the computational amount of subsequent processing. At the same time, the combination of the temporal self-attention long short-term memory module and the spatial multi-head attention module enables the model to efficiently process large-scale base station traffic data, improving the computational efficiency.
[0096] In an optional embodiment, the temporal self-attention long short-term memory module in the step S1202 comprises a first long short-term memory network, a second long short-term memory network and a temporal self-attention module.
[0097] The temporal self-attention long short-term memory module in the step S1202 extracts the temporal correlation feature of the traffic of the previous and subsequent periods based on the spatial correlation feature of each period to obtain a spatio-temporal feature tensor, comprising:
[0098] S12021, the first long short-term memory network determines the spatio-temporal correlation feature of the current period based on the spatial correlation feature of the current period and the spatio-temporal correlation feature of the previous period, and splices the spatio-temporal correlation features of each period to obtain a first output.
[0099] The first long short-term memory network (LSTM1) receives the spatial correlation features of the current period and the spatio-temporal correlation features of the previous period as inputs. The spatial correlation features are extracted from the first traffic sequence by a one-dimensional convolutional network, reflecting the mutual relationship between adjacent base station traffic. The spatio-temporal correlation features of the previous period are the output of the module after processing in the previous period, containing spatial and temporal correlation information of the previous period.
[0100] The LSTM1 fuses and processes the spatial correlation features of the current period and the spatio-temporal correlation features of the previous period through its internal forget gate, input gate, and output gate mechanisms to determine the spatio-temporal correlation features of the current period. This step realizes the conversion from spatial correlation features to spatio-temporal correlation features and considers the continuity of the time series. Subsequently, the LSTM1 concatenates the spatio-temporal correlation features of each period to obtain the first output. This output contains the spatio-temporal correlation features of all periods, providing a basis for subsequent temporal self-attention processing.
[0101] In S12022, the temporal self-attention module calculates an attention matrix based on the first output.
[0102] The temporal self-attention module (Temporal Self-Attention Module) receives the first output of the first long short-term memory network as input. This module captures the temporal correlation features of the traffic of the previous and subsequent periods by calculating the similarity between different periods. Specifically, the temporal self-attention module first calculates an attention matrix that reflects the degree of association between different periods. Then, the module uses this attention matrix to perform weighted processing on the first output to obtain a weighted feature representation. This step realizes the dynamic capture and emphasis of key information in the time series.
[0103] In S12023, the second long short-term memory network encodes the attention matrix to obtain the spatio-temporal feature tensor.
[0104] The structure of the second long short-term memory network is the same as that of the first long short-term memory network. The second long short-term memory network (LSTM2) receives the weighted feature representation output by the temporal self-attention module as input. LSTM2 further encodes and processes the weighted feature representation through its internal gating mechanism to extract deeper spatio-temporal features. The output of LSTM2 is the final spatio-temporal feature tensor, which contains both spatial correlation information and temporal correlation information, providing a comprehensive feature representation for subsequent traffic prediction.
[0105] The application combines the long short-term memory network (LSTM) and the time self-attention mechanism, and the module can comprehensively capture the space-time characteristics of base station traffic, including spatial correlation, time continuity, and time burst changes, etc. This enables the model to more accurately capture key information when predicting base station traffic, improving the accuracy and reliability of the prediction. The design of the time self-attention long short-term memory module takes into account the space-time characteristics of base station traffic, enabling the model to process traffic data for different base stations and different time periods. This helps the model quickly adapt to new base station traffic prediction tasks, improving the practicality and flexibility of the model. Moreover, through the combination of the gating mechanism of the long short-term memory network and the time self-attention mechanism, the module can efficiently process large-scale base station traffic data. This reduces the consumption of computing resources and improves computing efficiency, enabling the model to complete the prediction task in a shorter time.
[0106] In an optional embodiment, the spatial multi-head attention module calculates the first feature tensor based on the space-time feature tensor and the spatial correlation feature according to the step S1203, comprising:
[0107] S12031, the space-time feature tensor is divided into multiple heads in the direction of feature dimension.
[0108] Firstly, the spatial multi-head attention module receives the space-time feature tensor and the spatial correlation feature as input. In order to process and capture information in different subspaces in parallel, the module divides the space-time feature tensor into multiple heads in the direction of feature dimension (such as the last dimension of the tensor). Each head is a smaller feature subset, which will independently perform subsequent attention calculation.
[0109] S12032, according to the space-time feature tensor and the spatial correlation feature, the query matrix, the key matrix and the value matrix corresponding to each head are calculated.
[0110] For each head, the spatial multi-head attention module calculates its corresponding query matrix (Query), key matrix (Key) and value matrix (Value) respectively. These matrices are obtained by applying linear transformation to the space-time feature tensor and the spatial correlation feature. Specifically, for each head, there will be three different linear transformation matrices, which are used to generate the query matrix, the key matrix and the value matrix respectively.
[0111] S12033, the first feature tensor is determined according to the query matrix, the key matrix and the value matrix of each head.
[0112] After obtaining the query matrix, key matrix, and value matrix for each head, the spatial multi-head attention module performs standard attention computation. This involves computing the dot product of the query matrix and the key matrix, then applying a softmax function to obtain attention weights, and finally using these weights to perform a weighted sum of the value matrix. This step generates an output for each head .
[0113] The attention matrices for all heads are concatenated in the feature dimension direction and integrated through an additional linear transformation to finally obtain the first feature tensor. This tensor contains attention features extracted from multiple subspaces, providing rich information for subsequent traffic prediction.
[0114] The present application can capture information in different subspaces by dividing features into multiple heads and performing attention computation independently on each head. This allows the model to focus on different positions in the sequence simultaneously and extract diverse features, enhancing the model's representation ability. The multi-head attention mechanism allows the model to process information in multiple subspaces in parallel, capturing the spatial and temporal characteristics of base station traffic more comprehensively. This helps the model to more accurately capture key information when predicting base station traffic, improving the accuracy and reliability of the prediction. Since each head performs attention computation independently, they can capture different features and information. This makes the model less sensitive to small changes in input data, enhancing the model's robustness and stability. The multi-head attention mechanism allows the model to process multiple heads in parallel, improving computational efficiency. This allows the model to complete the prediction task in a shorter time, reducing the consumption of computational resources.
[0115] In an optional embodiment, the second branch described in step S130 is a bidirectional long short-term memory network, and the second feature tensor includes forward time correlation features and reverse time correlation features.
[0116] The second branch described in step S130 extracts the time correlation of the second traffic sequence to obtain the second feature tensor, including:
[0117] S1301, based on the bidirectional long short-term memory network, extracting the time correlation of the second traffic sequence from the forward and reverse directions, outputting forward time correlation features and reverse time correlation features.
[0118] The second traffic sequence is input to the bidirectional long short-term memory network. This sequence represents a series of base station traffic data arranged in chronological order. Referring to Figure 7As shown, the bidirectional long short-term memory network is composed of two independent LSTM networks, one processing the sequence from front to back (forward LSTM) and one processing the sequence from back to front (backward LSTM). These two LSTM networks share the same input sequence but process in opposite directions.
[0119] The forward LSTM computes sequentially from the first element to the last element of the sequence, extracting forward time correlation features. These features reflect the temporal dependencies from front to back in the sequence. The backward LSTM computes inversely from the last element to the first element of the sequence, extracting backward time correlation features. These features reflect the temporal dependencies from back to front in the sequence. The outputs of the forward and backward LSTM are concatenated to form the final output tensor. This tensor contains both forward and backward time correlation features.
[0120] The bidirectional long short-term memory network adopted by the present application can simultaneously capture the temporal dependencies from front to back and from back to front in the sequence. This allows the model to more comprehensively consider the context information of the time series when predicting base station traffic, improving the accuracy and reliability of the prediction. By combining the outputs of the forward and backward LSTM, the model can extract richer feature information. This helps the model better represent the complexity and diversity of time series data, thereby improving the representation ability of the model. The bidirectional long short-term memory network has a certain robustness to small changes in input data. Since the model considers both forward and backward temporal dependencies, even if there is noise or missing values in the input data, the model can maintain stable prediction performance to some extent.
[0121] Specifically, the process of predicting traffic based on the base station traffic prediction model of the present application is as follows:
[0122] S210, a one-dimensional convolutional network extracts spatial correlation features between adjacent base station traffic, and for each time period Traffic of each base station Perform one-dimensional convolution operation:
[0123] (1-1)
[0124] wherein, is the output of the time period one-dimensional convolutional network, i.e., the spatial correlation features described above, is an activation function, is the weight of the trainable filter, is the traffic of each base station in the time period, symbol represents one-dimensional convolution operation, is a trainable bias.
[0125] S220, the temporal self-attention long short-term memory module consists of two long short-term memory networks (LTSM networks) and one temporal self-attention module, its structure is as follows: Figure 3 As shown. For the first-layer LSTM network (i.e., the first Long Short-Term Memory network mentioned above), the temporal correlation features of traffic between consecutive time periods are extracted through the following process:
[0126] (1-2)
[0127] ( + (1-3)
[0128] (1-4)
[0129] (1-5)
[0130] (1-6)
[0131] in, It is the first Input for each time step, input here. Corresponding to the spatial correlation features output by the previous one-dimensional convolutional network The above. After processing (such as direct transmission or simple preprocessing), it is used as input to the first long short-term memory network. and For activation function, , , These are the input gate, forget gate, and output gate, respectively. yes The spatiotemporal correlation characteristics of time periods yes Unit status of a time period yes Unit status of a time period This represents element-wise multiplication of matrices. (i.e., the above) , , , , , , , , , , )and (i.e., the above) , , , ) are trainable weights and biases, respectively, is a hyperbolic tangent function.
[0132] Finally, each of the obtained spatiotemporal correlation features of the time period concatenated to obtain the output of the first LSTM network , i.e., the first output mentioned above.
[0133] S230, the time self-attention module uses a self-attention mechanism in the time dimension to model the burstiness of the traffic of the same base station over time, and weights the traffic of different time steps according to the importance of each time step in the traffic sequence. In this way, the model can pay more attention to those time steps of traffic mutation that have a greater impact on the prediction result. The structure of the time self-attention module is shown in FIG. 7. In the time self-attention module, each layer MatMul, Scale, Mask, SoftMax, MatMul from bottom to top respectively represents matrix multiplication, scaling, masking, activation function, and matrix multiplication operation, which together implement the time self-attention mechanism for modeling the burstiness of the traffic of the same base station over time. Figure 4
[0134] In the time self-attention mechanism, first, the query matrix (Q), the key matrix (K), and the value matrix (V) are calculated through matrix multiplication (MatMul). These matrices are obtained by multiplying the output of the first LSTM network and the trainable linear transformation weight , , .
[0135] In calculating the dot product attention, in order to avoid the problem of gradient vanishing or explosion caused by the large length of the key vector, a scaling factor is introduced. This scaling operation (Scale) divides the dot product result of the query matrix Q and the key matrix K by , thereby ensuring the stability of training.
[0136] The Mask layer is used to limit the attention weight. For example, when processing sequence data, it may be desired that the model only pays attention to the elements before the current position and ignores the elements after it. This can be achieved by applying a mask (Mask) on the attention weight.
[0137] The SoftMax function is used to calculate the attention weight, ensuring that the sum of the weights is 1. It converts the scaled dot product result into a probability distribution, thereby obtaining the attention weight of each time step.
[0138] Finally, the attention weight matrix is multiplied by the value matrix (V) through matrix multiplication (MatMul) to obtain the output of the time self-attention module. The weighted output is obtained by multiplying the value matrix V. This output is the final result of the time self-attention module, which weights the traffic according to the importance of each time step.
[0139] Attention matrix is calculated as follows:
[0140] (1-7)
[0141] (1-8)
[0142] (1-9)
[0143] (1-10)
[0144] wherein, , , represent the query matrix, the key matrix and the value matrix respectively, is the output of the first LSTM network, i.e. the first output described above. , , are trainable linear transformation weights, is the dimension of the key vector, and a scaling factor is introduced to avoid the problem of gradient vanishing or explosion when calculating the dot product due to the large length of the key vector, so as to ensure the stability of training. represents an attention calculation function, is a function in the attention mechanism, which is used to calculate the attention weight and ensure that the sum of the weights is 1.
[0145] The structure of the second LSTM network is the same as that of the first LSTM network, and the attention matrix is encoded by the second LSTM network to output the space-time feature tensor .
[0146] S240, the spatial multi-head attention module uses a multi-head attention mechanism in the spatial dimension to model the sudden change distribution of traffic between different base stations at the same time period. The structure of the spatial multi-head attention module is shown in Figure 5 .
[0147] Referring to Figure 5 , the spatial multi-head attention module includes Linear, Scaled Dot-Product Attention, Concat, Linear from bottom to top. Linear refers to different linear transformations, and , , Temporal and spatial correlation features or spatiotemporal feature tensor Each head will be obtained through h different linear transformations. , , These linear transformations are made up of trainable linear transformation weights. , , definition.
[0148] For each head, a scaled dot-product attention mechanism is used to compute the attention matrix. This involves... and Divide the dot product by ( (This refers to the dimension of the key vector), then the attention weights are calculated using the softmax function, and finally these weights are applied... The weighted output is obtained, which is the attention matrix mentioned above. .
[0149] Attention matrix of all heads They will be concatenated along the feature dimension to form the result of the multi-head attention mechanism, MultiHeadAttention(K,Q,V).
[0150] Finally, the result of the multi-head attention mechanism is passed through another linear transformation (Linear, composed of trainable linear transformation weights). (Definition), to obtain the final first feature tensor .
[0151] Specifically, the input feature tensor (i.e., the spatiotemporal feature tensor output by the second LSTM network mentioned above) is input along the feature dimension. Divide the data into h heads and calculate the attention matrix using the following formula, which is the first feature tensor mentioned above. :
[0152] (1-11)
[0153] (1-12)
[0154] (1-13)
[0155] (1-14)
[0156] (1-15)
[0157] (1-16)
[0158] in, These represent the query matrix, key matrix, and value matrix, respectively. , , They represent the first The query matrix, key matrix, and value matrix of each size. Indicates the number of heads. , , , Represents trainable linear transformation weights. Representing spatially relevant features, it is the output of the aforementioned one-dimensional convolutional network. Represents the spatiotemporal feature tensor. Indicates the first Attention matrix of size, This represents the attention calculation function. It is a function in the attention mechanism used to calculate attention weights, ensuring that the sum of the weights is 1. This indicates the outcome of the multi-head attention mechanism. This indicates a concatenation operation, concatenating along the feature dimension. Let represent the first feature tensor.
[0159] Taking the 8-head spatial attention mechanism as an example, Figure 6 The above calculation process was demonstrated.
[0160] S240, such as Figure 7 As shown, the bidirectional Long Short-Term Memory (LSTM) network consists of two identical LSTM networks in two directions, extracting the second flow sequence from both the forward and reverse directions. Time correlation, output positive time correlation features and inverse time correlation characteristics .
[0161] S250. In the output layer, the feature tensors output by the first and second branches are first concatenated along the feature dimension to perform feature fusion. Then, the predicted traffic values for each base station in the future are output through the fully connected layer.
[0162] (1-17)
[0163] (1-18)
[0164] in, Indicates the characteristics after fusion. This indicates a splicing operation. Represents the first feature tensor. represents a positive time correlation feature, represents a negative time correlation feature, represents a linear transformation weight of a full connection layer, represents an output of an output layer, i.e. a traffic prediction value of the to-be-predicted time period.
[0165] The present application predicts the traffic of each base station in the to-be-predicted time period according to the traffic of each base station in the preceding time periods of each base station and the traffic of each base station in the preceding and subsequent time periods of each base station on the same day as the to-be-predicted time period.
[0166] (2-1)
[0167] wherein, the base station traffic prediction model of the present application, all to-be-trained parameters, the mean square error is selected as a loss function, and :
[0168] (2-2)
[0169] wherein, the traffic prediction value of the to-be-predicted time period of each base station, the true value of the traffic of the to-be-predicted time period of each base station, represents the number of base stations.
[0170] The base station traffic prediction method provided by the application is a base station traffic prediction method based on space-time attention and multi-branch convolution-long short-term memory network in a railway 5G private network.
[0171] The base station traffic prediction device provided by the application is described below, and the base station traffic prediction device described below can be correspondingly referred to the base station traffic prediction method described above.
[0172] The base station traffic prediction device provided by the application comprises Figure 8 as shown, comprising:
[0173] The acquisition module 310 is configured to acquire a traffic space-time sequence and a base station traffic prediction model; wherein the traffic space-time sequence comprises a first traffic sequence and a second traffic sequence, and the base station traffic prediction model comprises a first branch, a second branch and an output layer.
[0174] The modeling module 320 is configured to extract, by the first branch, space correlation between adjacent base station traffics based on the first traffic sequence, and model burstiness of a same base station traffic in time and suddenness distribution law of traffics between different base stations in a same period in space by using a self-attention mechanism in time dimension and a multi-head attention mechanism in space dimension, to obtain a first feature tensor.
[0175] The extraction module 330 is configured to extract, by the second branch, time correlation of the second traffic sequence to obtain a second feature tensor.
[0176] The prediction module 340 is configured to perform feature fusion on the first feature tensor and the second feature tensor based on the output layer, and output traffic prediction values of each base station in a to-be-predicted period; wherein the first traffic sequence is continuous traffic data of multiple base stations in multiple periods before the to-be-predicted period, and the second traffic sequence is continuous traffic data of the same multiple base stations in multiple periods before and after a same period of a day before the to-be-predicted period.
[0177] Figure 9 An example of a schematic diagram of a physical structure of an electronic device is shown in Figure 9 The electronic device can include a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 can communicate with each other through the communications bus 440. The processor 410 can invoke a logical instruction in the memory 430 to execute the base station traffic prediction method.
[0178] In addition, the logical instruction in the memory 430 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0179] On the other hand, the present application also provides a computer program product, which includes a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the base station traffic prediction method provided by the above-mentioned methods.
[0180] In yet another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, which is executed by a processor to implement the base station traffic prediction method provided by the above-mentioned methods.
[0181] The device embodiments described above are only schematic, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., they can be located in one place, or distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement it without creative labor.
[0182] Those skilled in the art can clearly understand the implementation of the embodiments by means of software and necessary general hardware platforms through the description of the above embodiments, and of course, the embodiments can also be implemented by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method described in each embodiment or some parts of the embodiment.
[0183] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A base station traffic prediction method, characterized in that, include: Obtain a traffic spatiotemporal sequence and a base station traffic prediction model; wherein, the traffic spatiotemporal sequence includes a first traffic sequence and a second traffic sequence, and the base station traffic prediction model includes a first branch, a second branch, and an output layer; The first branch extracts the spatial correlation between traffic from adjacent base stations and the temporal correlation between traffic sequences from a single base station based on the first traffic sequence. It then uses a self-attention mechanism in the time dimension to model the sudden changes in traffic from the same base station in time, and uses a multi-head attention mechanism in the spatial dimension to model the abrupt distribution pattern of traffic from different base stations in the same time period, thus obtaining the first feature tensor. The second branch extracts the temporal correlation of the second flow sequence to obtain the second feature tensor; Based on the output layer, feature fusion is performed on the first feature tensor and the second feature tensor to output the traffic prediction value for each base station during the predicted time period; The first traffic sequence consists of continuous traffic data from multiple time periods and multiple base stations before the predicted time period; the second traffic sequence consists of continuous traffic data from multiple time periods and multiple base stations before and after the same time period on the day before the predicted time period.
2. The base station traffic prediction method according to claim 1, characterized in that, The first branch includes a one-dimensional convolutional network, a temporal self-attention long short-term memory module, and a spatial multi-head attention module; The first branch extracts the spatial correlation between traffic from adjacent base stations and the temporal correlation of traffic sequences from a single base station based on the first traffic sequence. It then uses a self-attention mechanism in the temporal dimension to model sudden changes in traffic at the same base station, and a multi-head attention mechanism in the spatial dimension to model the abrupt distribution patterns of traffic between different base stations during the same time period, resulting in a first feature tensor, including: Based on the first traffic sequence, a one-dimensional convolutional network extracts the spatial correlation features between traffic from adjacent base stations to obtain the spatial correlation features for each time period. The time-self-attention long short-term memory module extracts the temporal correlation features of the traffic flow between consecutive time periods based on the spatial correlation features of each time period to obtain a spatiotemporal feature tensor. The spatial multi-head attention module calculates the first feature tensor based on the spatiotemporal feature tensor and the spatially related features.
3. The base station traffic prediction method according to claim 2, characterized in that, The time-self-attention long short-term memory module includes a first long short-term memory network, a second long short-term memory network, and a time-self-attention module; The time-self-attention long short-term memory module extracts the temporal correlation features of traffic flow between consecutive time periods based on the spatial correlation features of each time period to obtain a spatiotemporal feature tensor, including: The first long short-term memory network determines the spatiotemporal correlation features of the current time period based on the spatial correlation features of the current time period and the spatiotemporal correlation features of the previous time period, and concatenates the spatiotemporal correlation features of each time period to obtain the first output; The temporal self-attention module calculates the attention matrix based on the first output; The second long short-term memory network encodes the attention matrix to obtain the spatiotemporal feature tensor.
4. The base station traffic prediction method according to claim 2, characterized in that, The spatial multi-head attention module calculates the first feature tensor based on the spatiotemporal feature tensor and the spatially related features, including: The spatiotemporal feature tensor is divided into multiple heads along the feature dimension; Calculate the query matrix, key matrix, and value matrix corresponding to each head based on the spatiotemporal feature tensor and the spatial correlation features; The first feature tensor is determined based on the query matrix, key matrix, and value matrix of each head.
5. The base station traffic prediction method according to claim 4, characterized in that, The spatial multi-head attention module determines the first feature tensor based on the spatiotemporal feature tensor and the spatial correlation features using the following formula: in, These represent the query matrix, key matrix, and value matrix, respectively. , , They represent the first The query matrix, key matrix, and value matrix of each size. Indicates the number of heads. , , , Represents trainable linear transformation weights. Indicates spatially relevant features, Represents the spatiotemporal feature tensor. Indicates the first Attention matrix of size, This represents the attention calculation function. This indicates the outcome of the multi-head attention mechanism. This indicates a splicing operation. Let represent the first feature tensor.
6. The base station traffic prediction method according to claim 1, characterized in that, The second branch is a bidirectional long short-term memory network, and the second feature tensor includes positive temporal correlation features and negative temporal correlation features; The second branch extracts the temporal correlation of the second flow sequence to obtain the second feature tensor, including: Based on the bidirectional long short-term memory network, the temporal correlation of the second flow sequence is extracted from both the forward and reverse directions, and the forward temporal correlation features and the reverse temporal correlation features are output.
7. A base station traffic prediction device, characterized in that, include: An acquisition module is used to acquire a traffic spatiotemporal sequence and a base station traffic prediction model; wherein, the traffic spatiotemporal sequence includes a first traffic sequence and a second traffic sequence, and the base station traffic prediction model includes a first branch, a second branch, and an output layer; The modeling module is used by the first branch to extract the spatial correlation between the traffic of adjacent base stations and the temporal correlation of the traffic sequence of a single base station based on the first traffic sequence. It uses a self-attention mechanism in the time dimension to model the sudden changes in the traffic of the same base station in time, and uses a multi-head attention mechanism in the spatial dimension to model the abrupt distribution pattern of traffic between different base stations in the same time period, so as to obtain the first feature tensor. The extraction module is used to extract the temporal correlation of the second flow sequence in the second branch to obtain the second feature tensor; The prediction module is used to perform feature fusion on the first feature tensor and the second feature tensor based on the output layer, and output the traffic prediction value for each base station during the predicted period; wherein, the first traffic sequence is continuous traffic data of multiple time periods and multiple base stations before the predicted period; the second traffic sequence is continuous traffic data of multiple time periods and multiple base stations before and after the same time period on the day before the predicted period.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the base station traffic prediction method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the base station traffic prediction method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the base station traffic prediction method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method, system and device for predicting cellular flow and medium
CN114039871A
Output traffic prediction method and device, and storage medium
CN116827809A