Content popularity prediction method based on spatial-temporal characteristics
By constructing graph structure and Spatial-Temporal Transformer network based on comprehensive weights in the Internet of Vehicles scenario, combining spatial-temporal feature extraction and dynamic dependence, the problem of underutilization of spatial-temporal correlation in traditional methods is solved, and the content popularity prediction is improved Accuracy and vehicle communication efficiency.
Patent Information
- Application Number
- CN202410990645.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-12
AI Technical Summary
In the Internet of Vehicles scenario, traditional content popularity prediction methods fail to fully consider the spatial and temporal correlation, resulting in limited prediction accuracy of vehicle content requests, affecting cache efficiency and communication quality.
Using a method of constructing graph structure based on comprehensive weights, combined with Spatial-Temporal Transformer Network (STTNS), through the spatiotemporal feature extraction layer and prediction layer, we learn node features, dynamic dependencies and long-term time dependencies with structure perception to achieve content popularity predict.
It improves the accuracy and cache efficiency of content popularity prediction, reduces the load pressure of the central server, and enhances the vehicle communication efficiency.
Smart Images

Figure CN118940893A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a content popularity prediction method, and in particular to a content popularity prediction method based on building a graph structure and a Spatial-Temporal Transformer network (STTNS) based on comprehensive weights. Background Art
[0002] With the advent of the big data era, various in-vehicle applications generate huge data traffic and content requests, and the data generated by vehicles is showing an explosive growth trend. These data include not only the vehicle's own status information and driving trajectory, but also the driver's behavior habits, preferences, and real-time conditions of the surrounding environment, etc. By accurately predicting the popularity of content, the transmission delay of vehicle request information can be effectively reduced, and the communication quality of the Internet of Vehicles can be improved.
[0003] Content popularity prediction is to predict the future hot request content of the vehicle and load it into the edge node near the user with the help of edge caching technology, so as to reduce data transmission delay and relieve the pressure of the backhaul link, and improve the communication efficiency of the vehicle. The content requested by the vehicle user is a time series, which has a certain correlation with the user's historical requests, but traditional methods rarely consider the implicit correlation of the request. Y.Wu et al. proposed a content popularity prediction strategy based on user preference learning, adaptive context partitioning and federated learning to reduce the complexity of prediction. This strategy obtains accurate content popularity without pre-statistical data of the content. Y.Xiong et al. proposed a content popularity prediction algorithm based on integrated features and federated learning, which can reduce data transmission costs and improve the accuracy of content popularity. J.Liang et al. combined mobile edge computing with social content-centric networks and proposed a content popularity prediction algorithm, which takes into account historical content requests, geographic location and social relationships to improve content popularity prediction. Compared with the research based on the assumption of knowing the content popularity in advance, the above literature analyzes the temporal characteristics of content popularity and effectively improves its accuracy. In the Internet of Vehicles scenario, due to the dynamic characteristics of the vehicle environment, content requests show spatiotemporal correlation. Therefore, only time feature analysis cannot fully explore the characteristics of content popularity, which affects the accuracy of content popularity. Summary of the invention
[0004] In order to alleviate the load pressure on the central server caused by the substantial growth of vehicle data in the Internet of Vehicles and improve cache efficiency, the present invention provides a content popularity prediction method based on spatiotemporal features.
[0005] The objective of the present invention is achieved through the following technical solutions:
[0006] A method for predicting content popularity based on spatiotemporal features comprises the following steps:
[0007] Step 1: System model construction
[0008] In the IoV communication scenario, there are multiple roadside units (RSUs). RSUs are regarded as content providers and vehicles as content requesters. Vehicles directly send content request information to RSUs. Predicting vehicle content request information is represented as a spatiotemporal prediction problem, predicting the vehicle request content of N RSUs at time step τ. The traffic grid is represented as a graph G = (V, E, A), where V represents the set of N nodes of RSU, E is the set of edges reflecting the physical connectivity between RSUs, and A∈R N×N The weighted adjacency matrix between RSUs is used to observe the vehicle request content status of M historical time steps received by RSU [p τ-M+1 ,...,p τ ], predict T future vehicle content conditions Where p represents the content of the vehicle request;
[0009] Step 2: Graph structure construction based on comprehensive weights
[0010] Multiply the Euclidean distance weights by the Spearman correlation coefficient to adjust the Euclidean distance weights using the Spearman correlation:
[0011]
[0012] In the formula, is the Euclidean distance weight matrix, is the Spearman correlation matrix. The Euclidean distance-Spearman comprehensive weight matrix is obtained by multiplying the two matrices element by element. Use this matrix as an adjacency matrix to construct a graph structure;
[0013] Step 3: Content popularity prediction based on Spatial-Temporal Transformer Network (STTNS) Step 3: 1. STTNS model construction
[0014] The STTNS model includes a spatiotemporal feature extraction layer and a prediction layer, where:
[0015] The spatiotemporal feature extraction layer contains a spatial Transformer module and a temporal Transformer module to jointly extract spatiotemporal features in the context of dynamic dependencies;
[0016] The spatial Transformer module consists of a position embedding layer, a dynamic graph convolutional attention module, a fixed graph convolutional layer, and a gating mechanism for feature fusion;
[0017] The temporal Transformer module consists of a position embedding layer, a dynamic graph convolutional attention module, and a gating mechanism for feature fusion;
[0018] The prediction layer uses two 1×1 convolutional layers to aggregate the spatiotemporal features extracted by the spatiotemporal feature extraction layer to predict vehicle content requests;
[0019] Step 32: Spatial feature extraction
[0020] (1) Use the graph adjacency matrix to initialize as the spatial position matrix Dimension expansion along the time axis yields D s ∈R M×N×N , the one-hot time encoding is initialized as a time position matrix The dimension is expanded along the spatial axis to obtain D T ∈R M×N×M , in the spatial features Get a fixed dimension d G of Embedding features, where F t is a 1×1 2D convolutional layer used to transform the concatenated features into d for each node at each time step. G dimensional vector;
[0021] (2) X' S The two-dimensional tensor of any time step is regarded as
[0022] (3) Embedding features of each time step Mapped to a high-dimensional latent subspace through a feedforward neural network, for each single-headed self-attention mechanism model, the latent subspace in the node is divided into a query subspace (Query), a key subspace (Key), and a value subspace (Value):
[0023]
[0024] In the formula, Q S , K S and V S The weight matrix of Q S and K S The dot product of is calculated to obtain the correlation value, that is, to capture the dynamic dependency of the space S S ∈R N×N :
[0025]
[0026] Using S S Update node characteristics:
[0027] M S =S S V S ;
[0028] A shared feedforward neural network with nonlinear activation is applied at each node to improve the learned node features M. S The prediction effect:
[0029]
[0030] In the formula, and There are three different weight matrices. A residual connection is added to prevent network degradation. Will U S and M' S Combined Feature fusion for AND gate mechanism:
[0031]
[0032] (4) And the feature X obtained by the fixed graph convolution layer G By linear projection f S and f G Convert it into a one-dimensional vector and get the gate g through the sigmoid activation function:
[0033]
[0034] Using the door mechanism and X G Perform weighted calculation and integrate it with the learned spatial features:
[0035]
[0036] Output of the Spatial Transformer module Collect M time steps And sent to the subsequent time Transformer module;
[0037] Step 33: Time feature extraction
[0038] (1) By inputting feature X T =X S +Y S and time embedding D T to obtain a number of dimensions d G of Among them, H tis a 1×1 convolutional layer that generates a d for each node at each time step G dimensional vector. In order to establish a time-dependent model, the information of any node in G is regarded as a two-dimensional tensor.
[0039] (2) The input of the temporal Transformer module is a sliding window with a length of M and d G Time series of channels Dynamically compute temporal dependencies in a high-dimensional latent subspace, also including query subspace, key subspace, and value subspace:
[0040]
[0041] In the formula, and is the learned linear mapping, using Q T and K T The dynamic dependency of the dot product calculation S T ∈R N×N :
[0042]
[0043] Further V T Value and time characteristics M T The weight S T polymerization:
[0044] M T =S T V T ;
[0045] In order to explore the interaction between latent features, T A shared three-layer feed-forward neural network is designed:
[0046]
[0047] Residual connection For stable training, for each node, its output is Y T =U T +M' T , by collecting all nodes Get the output After extracting the temporal features, if the layer is the last spatiotemporal feature extraction layer, then X ST =X T +Y T Input prediction layer, otherwise X S =X T +Y T Input to the next spatiotemporal feature extraction layer;
[0048] Step 34: Content popularity prediction
[0049] The prediction layer uses two 1×1 convolutional layers to perform multi-step prediction based on the spatiotemporal features of the last spatiotemporal feature extraction layer. Its input is a two-dimensional tensor. The d of N nodes at the previous time step τ ST The multi-step prediction of T future vehicle content requests from N nodes is composed of dimensional spatiotemporal features:
[0050] Y = Conv(Conv(X ST )).
[0051] Compared with the prior art, the present invention has the following advantages:
[0052] The present invention takes into account the spatiotemporal correlation presented by content requests, comprehensively considers the spatial distance and correlation between each node, and proposes a method based on comprehensive weights to construct a graph structure to learn node features with structure awareness; considering the spatiotemporal correlation of historical content requests, a content popularity prediction model based on STTNS is proposed, which uses the spatiotemporal feature extraction layer to jointly extract spatiotemporal features in the context of dynamic dependencies, effectively improving the accuracy of content popularity prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 For system scenarios;
[0054] Figure 2 Constructing a graph structure for the comprehensive weighted adjacency matrix;
[0055] Figure 3 It is the STTNS model framework;
[0056] Figure 4 It is the SpatialTransformer model;
[0057] Figure 5 A self-attention mechanism for long-term temporal dependencies;
[0058] Figure 6 It is the TemporalTransformer model;
[0059] Figure 7 Predicting results for the number of content requests;
[0060] Figure 8 Comparison of errors of different methods. DETAILED DESCRIPTION
[0061] The technical solution of the present invention is further described below in conjunction with the accompanying drawings, but is not limited thereto. Any modification or equivalent replacement of the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention should be included in the protection scope of the present invention.
[0062] The present invention provides a content popularity prediction method based on spatiotemporal features. Firstly, a method for constructing a graph structure based on comprehensive weights is proposed, and the spatial distance and correlation between nodes are considered to learn node features with structure perception. Then, a content popularity prediction model based on a Spatial-Temporal Transformer network is proposed, and the accuracy of content popularity prediction is improved by using dynamic directional spatial dependency and long-distance temporal dependency. Finally, an evaluation is carried out on content data of two different requests, and simulation results show that the STTNS model proposed in the present invention is more accurate in predicting vehicle request content.
[0063] 1. System Model
[0064] In common vehicle networking communication scenarios, such as Figure 1 As shown in the figure, there are multiple roadside units (RSUs), each of which has wireless communication capabilities and limited cache space, covering multiple vehicles within its communication range. RSUs are regarded as content providers and vehicles as content requesters. Vehicles can directly send content request information to roadside units. The prediction of vehicle content request information is represented as a spatiotemporal prediction problem, and the traffic grid is represented as a graph G = (V, E, A), where V represents the set of N nodes of RSU, E is the set of edges reflecting the physical connectivity between RSUs, and A∈R N×N The weighted adjacency matrix between RSUs is used to synthesize the historical content of vehicle requests observed by RSUs: τ-M+1 ,...,p τ ].
[0065] 2. Graph structure construction based on comprehensive weights
[0066] Graph structure plays a key role in traffic and communication networks. In order to better capture spatial dependencies, this paper proposes a graph structure construction method based on comprehensive weights, which learns node features with structure perception by comprehensively considering the spatial distance and correlation between nodes.
[0067] Euclidean distance is a commonly used spatial distance measurement method, which calculates the straight-line distance d between two nodes i and j. ij To measure the spatial relationship between them:
[0068]
[0069] Where x and y are the spatial horizontal and vertical coordinates of the node respectively. ij Take the inverse to get the distance weight w dis :
[0070]
[0071] The Euclidean distance can effectively evaluate the distance between nodes in the case of unknown road structure, and comprehensively describe the degree of association and spatial distribution characteristics between nodes, so as to better capture spatial dependence. The Spearman correlation coefficient is a non-parametric statistic used to measure the correlation between two variables. Unlike the Pearson correlation coefficient, the Spearman correlation coefficient does not require the relationship between variables to be linear, but calculates the correlation based on their rank or order, not a specific numerical relationship.
[0072]
[0073] Since the Euclidean distance only considers the straight-line distance between nodes, it cannot capture the nonlinear relationship between nodes, while the Spearman correlation coefficient is used to measure the correlation between nodes and does not consider spatial location information. This paper comprehensively considers spatial distance and correlation and proposes a method based on comprehensive weights to construct a graph structure, such as Figure 2 shown.
[0074] There are some nodes that are close to each other but have weak correlation, while some nodes that are far away have strong correlation. Therefore, by multiplying the Euclidean distance weight with the Spearman correlation coefficient and adjusting the Euclidean distance weight using the Spearman correlation, the influence of the two metrics can be balanced to a certain extent, so that the distance between nodes with higher correlation is given a higher weight, thereby more accurately reflecting the similarity and correlation between the data, so as to effectively capture the complex relationship between the nodes.
[0075]
[0076] In the formula, is the Euclidean distance weight matrix, is the Spearman correlation matrix. The Euclidean distance-Spearman comprehensive weight matrix is obtained by multiplying the two matrices element by element. This matrix is used as an adjacency matrix to construct a graph structure, which more comprehensively describes the relationship between nodes and provides more accurate node feature learning for the Spatial-Temporal Transformer model.
[0077] 3. Content Popularity Prediction Based on Spatial-Temporal Transformer Network
[0078] The goal of this invention is to predict the content of vehicle requests from N RSUs in the future T time steps [p τ+1 ,…,p τ+T ]. In order to achieve accurate prediction, the dynamic spatial dependency and long-term temporal dependency are comprehensively considered, and the spatial Transformer is used to dynamically train the model and the spatial dependency S of each time step. S ∈R N×N , and effectively learns long-term temporal dependencies S through the temporal Transformer based on the self-attention mechanism T ∈R M×M Meanwhile, error propagation can be effectively addressed by this approach, thus achieving accurate prediction of vehicle content requests.
[0079] Therefore, the present invention proposes a Spatial-Temporal Transformer Network (STTNS) model framework, such as Figure 3 As shown in the figure, it mainly includes the spatiotemporal feature extraction layer and the prediction layer. The spatiotemporal feature extraction layer contains the spatial Transformer module and the temporal Transformer module, which jointly extract spatiotemporal features in the context of dynamic dependencies; the prediction layer uses two 1×1 convolutional layers to aggregate the spatiotemporal features extracted by the spatiotemporal feature extraction layer to predict vehicle content requests.
[0080] 1. Spatiotemporal feature extraction layer
[0081] (1) Spatial Transformer Module
[0082] The spatial Transformer module consists of a position embedding layer, a dynamic graph convolutional attention module, a fixed graph convolutional layer, and a gating mechanism for feature fusion, such as Figure 4 shown.
[0083] 1) Position Embedding Layer
[0084] The Transformer model itself cannot directly capture the spatiotemporal location information of nodes. This information needs to be embedded into the model in advance. To this end, a location embedding layer is introduced so that the model can learn the spatiotemporal embedding of each node feature. The location information of different nodes (such as user location, request time, content type) is used as input and mapped into a high-dimensional latent subspace, so that the model can better understand the changes and associations of spatiotemporal data.
[0085] Initialize using the graph adjacency matrix as the spatial position matrix Dimension expansion along the time axis yields D s ∈R M×N×N , the one-hot time encoding is initialized as a time position matrix The dimension is expanded along the spatial axis to obtain D T ∈R M×N×M In the space feature Get a fixed dimension d G of Embedding features, where F t is a 1×1 2D convolutional layer used to transform the concatenated features into d for each node at each time step. G dimensional vector.
[0086] X' S The two-dimensional tensor of any time step is regarded as
[0087] 2) Dynamic Graph Convolution Attention Module
[0088] In order to capture the hidden spatial dependencies of temporal evolution, a dynamic graph convolutional attention module with long-term temporal dependencies is introduced to project the input features of each node into a high-dimensional latent subspace to enable training and modeling of high-dimensional latent subspaces, such as Figure 5 As shown in Figure 2, the projection feature uses a self-attention mechanism, which can effectively model the dynamic spatial dependencies between nodes according to the changing graph signals.
[0089] The embedding features of each time step Mapped to a high-dimensional latent subspace through a feedforward neural network, for each single-headed self-attention mechanism model, the latent subspace in the node is divided into a query subspace (Query), a key subspace (Key), and a value subspace (Value).
[0090]
[0091] In the formula, Q S , K S and V S The weight matrix of Q S and K S The dot product of is calculated to obtain the correlation value, that is, to capture the dynamic dependency of the space S S ∈R N×N :
[0092]
[0093] In formula (8), dot product is used to reduce the cost of calculation and storage. Softmax is used to normalize spatial dependency and scale Prevent saturation caused by the Softmax function.S Update node characteristics:
[0094] M S =S S V S (9)
[0095] By introducing multiple pairs of subspaces, multiple spatial dependency patterns can be learned through a multi-head attention mechanism, which is able to extract different hidden spatial dependencies from various latent subspaces.
[0096] In addition, a shared feedforward neural network with nonlinear activation is applied at each node to improve the learned node features M S The prediction effect:
[0097]
[0098] In the formula, and There are three different weight matrices. A residual connection is added to prevent network degradation. Will U S and M' S Combined Feature fusion for AND gate mechanism:
[0099]
[0100] 3) Gate mechanism for feature fusion
[0101] Will And the feature X obtained by the fixed graph convolution layer G By linear projection f S and f G Convert it into a one-dimensional vector and get the gate g through the sigmoid activation function:
[0102]
[0103] Using the gate mechanism and X G Perform weighted calculation and integrate it with the learned spatial features:
[0104]
[0105] Output of the Spatial Transformer module Collect M time steps And fed into the subsequent temporal Transformer module.
[0106] (2) Temporal Transformer Module:
[0107] Compared with the spatial Transformer module, the temporal Transformer module does not contain a fixed graph convolution layer, and the rest of the structure is similar to the spatial Transformer module, such as Figure 6 shown.
[0108] By inputting feature X T =X S +Y S and time embedding D T to obtain a number of dimensions d G of Among them, H t is a 1×1 convolutional layer that generates a d for each node at each time step G dimensional vector. In order to establish a time-dependent model, any node in G is regarded as a two-dimensional tensor
[0109] Similarly, the self-attention mechanism is used to model temporal dependencies. The input of the Temporal Transformer is a sliding window with a length of M and d G Time series of channels Temporal dependencies are dynamically computed in high-dimensional latent subspaces, including query subspaces, key subspaces, and value subspaces.
[0110]
[0111] In the formula, and is the learned linear mapping. According to formula (1), for p τ+1 ,…,p τ+T The multi-step forecast is composed of the historical observations p τ-M+1 ,…,p τ At the same time, a scaled dot product function is introduced to take into account p τ-M+1 ,…,p τ Using Q T and K T The dynamic dependency of the dot product calculation S T ∈R N×N :
[0112]
[0113] Further V T Value and time characteristics M T The weight S T Aggregation, principle as Figure 4 As shown,
[0114] M T =S T V T (18)
[0115] In order to explore the interaction between latent features, T A shared three-layer feedforward neural network was designed.
[0116]
[0117] Residual connection For each node, its output is Y T =U T +M' T Therefore, by collecting all nodes Get the output After extracting the temporal features, if the layer is the last spatiotemporal feature extraction layer, then X ST =X T +Y T Input prediction layer, otherwise X S =X T +Y T Input to the next spatiotemporal feature extraction layer.
[0118] Since each time step attends to the remaining time steps within the sliding window, long-range bidirectional temporal dependencies can be effectively captured in each layer of the Temporal Transformer. The Temporal Transformer can be easily extended to long sequences by increasing the temporal features M without sacrificing too much computational efficiency.
[0119] 2. Prediction layer
[0120] The prediction layer uses two 1×1 convolutional layers to make multi-step predictions based on the spatiotemporal features of the last spatiotemporal feature extraction layer. Its input is a two-dimensional tensor The d of N nodes at the previous time step τ ST Multi-step prediction Y∈R for T future vehicle content requests from N nodes N×T for:
[0121] Y = Conv(Conv(X ST )) (20)
[0122] 4. Experimental Results and Analysis
[0123] 1. Dataset and data preprocessing
[0124] The evaluation was conducted using a dataset from the Big Data Challenge. This dataset divides the city of Milan into 100*100 grid structures, collects information for 2 months, and collects incoming and outgoing requests for each grid at 10-minute intervals. In order to simulate a real Internet of Vehicles scenario and reduce computational complexity, the 10,000 grids were re-divided into 400 nodes, and the incoming and outgoing request data of each node were Z-Score normalized and used as node information, and a graph structure was constructed based on the comprehensive weight as an adjacency matrix. In order to verify the prediction performance, the dataset was divided into a training set and a test set, where the first 70% of the data was used as a training set for content request prediction, and the remaining 30% was used as a test set to verify the prediction performance.
[0125] 2. Experimental Setup
[0126] The experiment used Python 3.8 environment, used the MSE loss function and Adam optimizer for 300 rounds of iterative training, the initial learning rate was 0.001, the learning decay rate was 0.9 every 15 rounds of training, and 12 historical data (2 hours) were used to predict 6 future data (1 hour). Finally, the average results of 10 independent experiments were used for evaluation. The parameter settings are shown in Table 1.
[0127] Table 1 Parameter settings
[0128]
[0129] 3. Experimental results
[0130] The performance of the proposed STTNS model is evaluated using two request contents in the dataset, such as Figure 7 shown. Figure 7 The red solid lines in (a) and (b) represent the predicted number of requests, and the blue dotted lines represent the actual number of requests in the dataset. The simulation results show that the proposed STTNS model can accurately fit the changing trend of the actual number of requests. In order to illustrate that building a graph structure based on comprehensive weights can provide more accurate node feature learning for the STTNS model, the STTNS model based on Spearman correlation and Euclidean distance weights is compared, and the results are shown in Table 2.
[0131] Table 2 Error comparison of different graph structure construction methods
[0132]
[0133] After comparing the three error standards of mean absolute error (MAE), root mean square error (RMSE) and goodness of fit (R2), it can be seen from Table 2 that in the experiment of two request contents, the performance of the STTNS model based on comprehensive weights is significantly better than the other two traditional graph structure construction methods. In order to further prove the effectiveness of the proposed STTNS model, MAE and RMSE are used as evaluation criteria to compare the effects of some widely used content popularity time prediction methods, as follows:
[0134] (1) Recurrent Neural Network (RNN): Taking the historical data of vehicle requests as input, each time step of the RNN receives the input of the current time step and the hidden state of the previous time step, and outputs the hidden state of the current time step and the corresponding prediction result.
[0135] (2) Gated Convolutional Neural Network (GRU): Encode historical vehicle request data into sequences and use them as input to the GRU, which predicts future vehicle request content by learning patterns and trends in historical data.
[0136] (3) Long Short-Term Memory (LSTM) network: It uses the time series characteristics of historical vehicle request data and introduces self-loop and gate structures to predict the content of future vehicle requests.
[0137] Figure 8 (a) and (b) show the average MAE and RMSE error trends of the four methods for predicting six future time steps. The simulation results show that the prediction performance of the four methods decays with the increase of the prediction step. The performance of LSTM, RNN and GRU decreases by about 15%, while the performance of the STTNS model proposed in the present invention is relatively stable, with the performance only decreasing by about 6%. In addition, the optimal or near-optimal effect is achieved in each prediction step, and the advantage in long-term prediction becomes increasingly obvious as the time step increases.
Claims
1. A content popularity prediction method based on spatiotemporal features, characterized in that The method comprises the following steps: Step 1: System model construction In the IoV communication scenario, there are multiple RSUs. RSUs are regarded as content providers and vehicles as content requesters. Vehicles directly send content request information to RSUs. The prediction of vehicle content request information is represented as a spatiotemporal prediction problem, which predicts the vehicle request content of N RSUs at time step τ. The traffic grid is represented as a graph G = (V, E, A), where V represents the set of N nodes of RSU, E is the set of edges reflecting the physical connectivity between RSUs, and A∈R N×N The weighted adjacency matrix between RSUs is used to observe the vehicle request content status of M historical time steps received by RSU [p τ-M+1 ,...,p τ ], predict T future vehicle content conditions Where p represents the content of the vehicle request; Step 2: Graph structure construction based on comprehensive weights Multiply the Euclidean distance weights by the Spearman correlation coefficient to adjust the Euclidean distance weights using the Spearman correlation: In the formula, is the Euclidean distance weight matrix, is the Spearman correlation matrix. The Euclidean distance-Spearman comprehensive weight matrix is obtained by multiplying the two matrices element by element. Use this matrix as an adjacency matrix to construct a graph structure; Step 3: Prediction of content popularity based on STTNS Step 31: STTNS model construction The STTNS model includes a spatiotemporal feature extraction layer and a prediction layer, where: The spatiotemporal feature extraction layer includes a spatial Transformer module and a temporal Transformer module, which jointly extract spatiotemporal features in the context of dynamic dependencies; The spatial Transformer module consists of a position embedding layer, a dynamic graph convolution attention module, a fixed graph convolution layer, and a gating mechanism for feature fusion; The temporal Transformer module consists of a position embedding layer, a dynamic graph convolution attention module, and a gating mechanism for feature fusion; The prediction layer uses two 1×1 convolutional layers to aggregate the spatiotemporal features extracted by the spatiotemporal feature extraction layer to predict vehicle content requests; Step 32: Spatial feature extraction (1) Use the graph adjacency matrix to initialize as the spatial position matrix Dimension expansion along the time axis yields D s ∈R M×N×N , the one-hot time encoding is initialized as a time position matrix The dimension is expanded along the spatial axis to obtain D T ∈R M×N×M , in the spatial features Get a fixed dimension d G of Embedding features; (2) X' S The two-dimensional tensor of any time step is regarded as (3) Embedding features of each time step Mapped to a high-dimensional latent subspace through a feedforward neural network, for each single-headed self-attention mechanism model, the latent subspace in the node is divided into query subspace, key subspace, and value subspace: In the formula, Q S , K S and V S The weight matrix of Q S and K S The dot product of is calculated to obtain the correlation value, that is, to capture the dynamic dependency of the space S S ∈R N×N : Using S S Update node characteristics: M S =S S V S ; A shared feedforward neural network with nonlinear activation is applied at each node to improve the learned node features M. S The prediction effect: In the formula, W1 S and There are three different weight matrices. A residual connection is added to prevent network degradation. Will U S and M' S Combined Feature fusion for AND gate mechanism: (4) And the feature X obtained by the fixed graph convolution layer G By linear projection f S and f G Convert it into a one-dimensional vector and get the gate g through the sigmoid activation function: Using the gate mechanism and X G Perform weighted calculation and integrate it with the learned spatial features: Output of the Spatial Transformer module Collect M time steps And sent to the subsequent time Transformer module; Step 33: Time feature extraction (1) By inputting feature X T =X S +Y S and time embedding D T to obtain a number of dimensions d G of In order to model the time dependency, the information of any node in G is considered as a two-dimensional tensor (2) The input of the temporal Transformer module is a sliding window with a length of M and d G Time series of channels Dynamically compute temporal dependencies in a high-dimensional latent subspace, also including query subspace, key subspace, and value subspace: In the formula, and is the learned linear mapping, using Q T and K T The dynamic dependency of the dot product calculation S T ∈R N×N : Further V T Value and time characteristics M T The weight S T polymerization: M T =S T V T ; In order to explore the interaction between latent features, T A shared three-layer feed-forward neural network is designed: Residual connection For stable training, for each node, its output is Y T =U T +M' T , by collecting all nodes Get the output After extracting the temporal features, if the layer is the last spatiotemporal feature extraction layer, then X ST =X T +Y T Input prediction layer, otherwise X S =X T +Y T Input to the next spatiotemporal feature extraction layer; Step 34: Content popularity prediction The prediction layer uses two 1×1 convolutional layers to perform multi-step prediction based on the spatiotemporal features of the last spatiotemporal feature extraction layer. Its input is a two-dimensional tensor. The d of N nodes at the previous time step τ ST The multi-step prediction of T future vehicle content requests from N nodes is composed of dimensional spatiotemporal features: Y=Conv(Conv(X ST ))。 2. The method for predicting content popularity based on spatiotemporal features according to claim 1, characterized in that X' S =F t ([X S ,D S ,D T ]), where F t is a 1×1 2D convolutional layer used to transform the concatenated features into d for each node at each time step. G dimensional vector.
3. The method for predicting content popularity based on spatiotemporal features according to claim 1, characterized in that X' T =H t ([X T ,D T ]), where H t is a 1×1 convolutional layer that generates a d for each node at each time step G dimensional vector.
