Flow prediction methods, apparatus, electronic devices and readable storage media
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]然而CNN只能处理欧氏空间中结构化的数据,流量数据在空间的连接关系却呈现出非欧式空间的图结构特性,即无线基站之间关联关系的表达能力较差
Smart Images

Figure CN116910443B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a traffic prediction method, apparatus, electronic device and readable storage medium. Background Technology
[0002] Currently, solutions for traffic forecasting tasks mainly include data-driven methods. Data-driven methods are further divided into statistical learning methods and deep learning methods. Statistical learning methods use statistical knowledge to model traffic information, such as the differential autoregressive moving average model. However, these methods typically predict traffic independently on a single traffic sequence, ignoring the spatial correlation between traffic sequences and making it difficult to simulate the nonlinear traffic changes in complex communication networks. With the improvement of computing resources and the development of related theories, deep learning methods, combining Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs), have begun to be applied to the field of traffic forecasting.
[0003] However, CNNs can only process structured data in Euclidean space, while traffic data exhibits graph structure characteristics in non-Euclidean space, meaning they have a poor ability to express the relationships between wireless base stations. Summary of the Invention
[0004] This invention provides a traffic prediction method, apparatus, electronic device, and readable storage medium to improve the ability to express the correlation between wireless base stations.
[0005] To solve the above problems, the present invention is implemented as follows:
[0006] In a first aspect, embodiments of the present invention provide a traffic prediction method, the method comprising:
[0007] Obtain the location information and traffic timing data of each base station in the wireless network;
[0008] A distance map is constructed based on the location information of each base station, and a semantic map is generated based on the traffic time-series data of each base station.
[0009] An adaptive graph is constructed by embedding learning from each base station;
[0010] Traffic features are obtained by computation using a graph convolutional network based on the distance graph, semantic graph, and adaptive graph.
[0011] Based on the traffic characteristics and the received prediction instructions, a traffic prediction result corresponding to the prediction instructions is obtained through a preset fully connected network.
[0012] Secondly, embodiments of the present invention provide a traffic flow prediction device, the device comprising:
[0013] The first acquisition module is used to: acquire the location information of each base station in the wireless network and the traffic time sequence data of each base station;
[0014] The distance map construction module is used to construct a distance map based on the location information of each base station.
[0015] The semantic graph construction module is used to construct semantic graphs based on the traffic time-series data of each base station;
[0016] The adaptive graph construction module is used to construct an adaptive graph through embedding learning from each base station;
[0017] The feature acquisition module is used to calculate traffic features based on the distance graph, semantic graph, and adaptive graph through a graph convolutional network;
[0018] The prediction module is used to obtain the traffic prediction result corresponding to the prediction instruction through a preset fully connected network based on the traffic characteristics and the received prediction instruction.
[0019] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a program stored in the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps in the traffic prediction method as described in the first aspect.
[0020] Fourthly, embodiments of the present invention also provide a readable storage medium for storing a program that, when executed by a processor, implements the steps in the traffic prediction method as described in the first aspect.
[0021] This invention acquires the location information and traffic time-series data of each base station in a wireless network; then constructs a distance map based on the location information of each base station and a semantic map based on the traffic time-series data of each base station; an adaptive map is constructed through embedding learning of each base station; based on the constructed distance map, semantic map, and adaptive map, a graph convolutional network is used to calculate and obtain traffic features. The obtained traffic features include multiple types of information, enriching the traffic feature information and enhancing the expressive power of the traffic features; thus, based on the obtained traffic features and the received prediction instructions, a preset fully connected network is used to obtain the traffic prediction result corresponding to the prediction instructions, which can improve the accuracy of the traffic prediction results. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of the structure of a wireless network system to which embodiments of the present invention can be applied;
[0024] Figure 2 This is one of the flowcharts of the traffic prediction method provided in the embodiments of the present invention;
[0025] Figure 3 This is a second schematic flowchart of the traffic prediction method provided in the embodiments of the present invention;
[0026] Figure 4 This is a schematic diagram of the flow prediction device provided in this invention.
[0027] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] In the embodiments of this invention, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this invention indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: including A alone, B alone, C alone, both A and B present, both B and C present, both A and C present, and A, B, and C present.
[0030] Please see Figure 1 , Figure 1 This is a structural diagram of a wireless network system to which embodiments of the present invention can be applied, such as... Figure 1As shown, this includes multiple base stations, assuming they are: base station 11, base station 12, base station 13, base station 14, etc. These base stations can communicate with each other directly or indirectly.
[0031] The following describes the traffic prediction method provided in the embodiments of the present invention.
[0032] See Figure 2 , Figure 2 This is one of the flowcharts illustrating the traffic prediction method provided in this embodiment of the invention. The traffic prediction method may include the following steps:
[0033] Step 210: Obtain the location information of each base station in the wireless network and the traffic time sequence data of each base station;
[0034] The flow prediction method described in this application can be applied to... Figure 1 The method can be applied to any of the aforementioned base stations, or to servers / electronic devices connected to at least one of the base stations. In specific implementations, the electronic device may be located on a particular base station. This embodiment uses the application of the traffic prediction method to an electronic device as an example for illustration.
[0035] Electronic devices can communicate with each base station to obtain its location information and traffic timing data. As an example, the latitude and longitude of each base station can be used as its location information. Alternatively, other coordinate systems can be used.
[0036] Step 220: Construct a distance map based on the location information of each base station, and construct a semantic map based on the traffic time-series data of each base station;
[0037] Based on the location information of each base station obtained in step 210, the distance between each base station is calculated, and a distance map A is constructed based on the obtained distances between each base station. dis .
[0038] Construct semantic graph A based on the traffic time series data obtained in step 210. sim As an example, the traffic time series data obtained in step 210 can be used to construct a semantic graph through the DTW algorithm (Dynamic Time Warping). The specific process of the DTW algorithm can be found in existing technologies and will not be elaborated here.
[0039] Step 230: Construct an adaptive graph through embedding learning from each base station;
[0040] Specifically, in this embodiment, an adaptive graph A is constructed by learning the base station (node) representation embedding. apt The relationships between base stations (nodes) are learned adaptively entirely through learnable parameters. The formula for calculating the adaptive graph is as follows:
[0041]
[0042] Where E1 is the embedding of the source base station, and E2 is the embedding of the target base station. It is the transpose of E2, where both the source base station and the target base station are base stations in the wireless network.
[0043] Step 240: Based on the distance graph, semantic graph, and adaptive graph, a graph convolutional network is used to calculate and obtain traffic features;
[0044] Based on the distance map A obtained above dis Semantic graph A sim And adaptive graph A apt Flow characteristics are obtained through graph convolution operations. Specifically, the flow characteristics are obtained using the following formula:
[0045]
[0046] Where K is the order of the adjacency matrix diffusion, A dis Represents a distance graph, A sim Represents a semantic graph, A apt Represents an adaptive graph, W k1 W k2 W k3 It is a learnable parameter, X t M represents the first feature. t This represents the flow characteristics. The first feature, X. t It is obtained based on each traffic time series data. Specifically, each traffic time series data has a corresponding acquisition time (i.e., the time when the base station acquires the traffic time series). Each traffic time series is simply sorted. For example, the acquisition time corresponding to the first acquired traffic time series data is recorded as 1, the acquisition time corresponding to the second acquired traffic time series data is recorded as 2, and so on, so as to obtain the time corresponding to each traffic time series data. The time local dependency between each traffic time series data is captured by a gated recurrent network to obtain the first feature.
[0047] The above steps continuously transform the time-series traffic data through processes such as convolution, mapping, and embedding, converting it into corresponding traffic features and ultimately improving the spatial correlation of these traffic features.
[0048] Step 250: Based on the traffic characteristics and the received prediction instruction, obtain the traffic prediction result corresponding to the prediction instruction through a preset fully connected network.
[0049] Based on the traffic characteristics obtained from the above steps, and the prediction instruction outputting the traffic data of the future P steps through a two-layer fully connected layer as the final target base station traffic prediction result in the wireless network, the prediction instruction includes the future time to be predicted (i.e. the future P steps). This process can refer to existing technologies and will not be elaborated here.
[0050] This invention acquires the location information and traffic time-series data of each base station in a wireless network; then constructs a distance map based on the location information of each base station and a semantic map based on the traffic time-series data of each base station; an adaptive map is constructed through embedding learning of each base station; based on the constructed distance map, semantic map, and adaptive map, a graph convolutional network is used to calculate and obtain traffic features. The obtained traffic features include multiple types of information, enriching the traffic feature information and enhancing the expressive power of the traffic features; thus, based on the obtained traffic features and the received prediction instructions, a preset fully connected network is used to obtain the traffic prediction result corresponding to the prediction instructions, which can improve the accuracy of the traffic prediction results.
[0051] Optionally, to strengthen the temporal dependencies between traffic features and improve prediction results, in some embodiments, before obtaining traffic features by computing through a graph convolutional network based on the distance graph, semantic graph, and adaptive graph, the following steps are included:
[0052] Obtain the global time embedding and / or local time embedding corresponding to the traffic time series data;
[0053] The global time embedding and / or local time embedding are incorporated into the traffic time series data.
[0054] Existing technologies often only learn from traffic time-series data, neglecting the utilization of temporal features. In this embodiment, the global and / or local time embeddings corresponding to the traffic time-series data are further obtained, and then the global and / or local time embeddings are integrated into the traffic time-series data. Specifically, this includes the following methods:
[0055] Method 1: Incorporating the global time embedding and / or local time embedding into the traffic time series data, including:
[0056] Local time embedding is obtained based on the relative position of traffic time series data;
[0057] The traffic time series data is incorporated according to the local time embedding.
[0058] Specifically, each traffic time series data has a corresponding acquisition order (i.e., the time order in which the base station acquires the traffic time series). Based on the acquisition order of each traffic time series data, a simple sorting is performed. The acquisition time corresponding to the first acquired traffic time series data is recorded as 1, the acquisition time corresponding to the second acquired traffic time series data is recorded as 2, and so on, so as to obtain the time corresponding to each traffic time series data. This is defined as local time embedding. The obtained local time embedding is integrated into the corresponding traffic time series data, so that each traffic time series data obtains relative position information.
[0059] Method 2, incorporating the global time embedding and / or local time embedding into the traffic time series data, further includes:
[0060] Obtain the time information corresponding to the traffic time series data, and encode the time information into a time vector to obtain the global time embedding corresponding to the traffic time series data;
[0061] The global time is embedded into the traffic time series data through a one-dimensional convolution operation.
[0062] Specifically, each traffic time series data point corresponds to a specific acquisition time (e.g., the acquisition time of a traffic time series data point is 13:14:52 on November 3, 2016). This time information is encoded into a time vector to obtain a corresponding global time embedding. This global time embedding is then integrated into the corresponding traffic time series data points, thus providing each traffic time series data point with its own time information. Method two, using global time embedding, compared to Method one's local time embedding, ultimately yields more accurate time information in the resulting traffic time series data.
[0063] Method 3, incorporating the global time embedding and / or local time embedding into the traffic time series data, further includes:
[0064] Obtain the time information corresponding to the traffic time series data, and encode the time information into a time vector to obtain the global time embedding corresponding to the traffic time series data;
[0065] The global time is embedded into the traffic time series data through a one-dimensional convolution operation;
[0066] Local time embedding is obtained based on the relative position of the fused traffic time series data;
[0067] The traffic time series data is incorporated according to the local time embedding.
[0068] In this embodiment, the difference between Method 2 and Method 1 lies in that, firstly, the global time embedding corresponding to the traffic time series data is obtained. After integrating the global time embedding into the process time series data, a local time embedding is obtained based on the relative position of each traffic time series data (this relative position can be determined based on the time of the obtained traffic, i.e., the receiving order of each traffic time series data). Then, the local time embedding is further integrated, that is, the global time embedding and the local time embedding are integrated into the traffic time series data sequentially. This results in more accurate time and position information for each traffic time series data.
[0069] Method 4, incorporating the global time embedding and / or local time embedding into the traffic time series data, further includes:
[0070] The global time embedding and local time embedding are incorporated into the traffic time series data using the following calculation formula:
[0071]
[0072] Among them, X t Represents traffic time-series data, GE t Represents global time embedding, LE t This indicates local temporal embedding, and Linear indicates a linear mapping. This indicates a concatenation operation.
[0073] Specifically, in this implementation, the global and local time embeddings of each traffic time series data are first obtained. The specific acquisition process of the global and local time embeddings can refer to Method 1 and Method 2 mentioned above. Then, the global and local time embeddings are integrated into the traffic time series data, thereby obtaining more accurate time and location information for each traffic time series data.
[0074] Furthermore, for ease of subsequent use, the global time embedding GE in the above method... t = {y, m, w, d, t}, where y represents year, m represents month, w represents week, d represents day, and t represents time. Recording these five time categories for various traffic flow time series data can improve the expressive power of the data.
[0075] Furthermore, in some embodiments, the step of obtaining traffic features based on the distance graph, semantic graph, and adaptive graph through a graph convolutional network includes:
[0076] Temporal dependencies not present in traffic time series data are filtered out by a preset mask attention network and incorporated into global and local temporal embeddings.
[0077] The traffic time series data filtered by the preset mask attention network is mapped to a preset number of subspaces using a preset attention mechanism, and the mapped data is then concatenated.
[0078] The spliced data is mapped to establish long-term time step dependencies between different traffic time series data.
[0079] The first feature is obtained by capturing the temporal local dependency between various traffic time-series data through a pre-defined gated recurrent network.
[0080] The traffic features are obtained by computing the first feature, distance map, semantic map, and adaptive map through a graph convolutional network.
[0081] The step of using a preset attention mechanism to map the traffic time-series data filtered by a preset mask attention network to a preset number of subspaces, and then concatenating the mapped data, includes:
[0082] Obtain attention from each traffic time-series data;
[0083] A multi-head attention mechanism is used to map the attention of each traffic time series data to a preset number of subspaces and then concatenate the mapped data.
[0084] Specifically, as an example, we capture the temporal correlation of features using a masked attention network and a GRU. First, we introduce the masked attention network, which first obtains three class vectors Q, K, and V from the input traffic time-series data X through a linear mapping:
[0085] Q = XW Q K = XW k V = XW V
[0086] Among them W Q W K W V These are learnable parameters.
[0087] The mask matrix M is used to filter out time dependencies that do not yet exist in the current time step:
[0088]
[0089] For the i-th time step, where j is the time after i, when performing attention calculations, it should only be associated with historical time steps. Therefore, we need a mask matrix to cover inputs from the future.
[0090] The formula for calculating attention is:
[0091]
[0092] Where dh is the dimension of the features, ⊙ is the element-wise dot product, and M is the mask matrix. Furthermore, we use a multi-head attention mechanism to map the features to S subspaces, obtaining richer features. The final output of the attention module is obtained by concatenating and linearly mapping the hidden states obtained from the S subspaces, as shown in the following mathematical expression:
[0093]
[0094] in W represents the concatenation operation. o Let h1, h2...h represent linear mapping matrices. s These represent the values in each subspace.
[0095] The input features establish long-term dependencies across time steps using a masked attention module, and then capture local dependencies between time steps using a gated recurrent network (GRU) module. GRU is a variant of LSTM (Long Short-Term Memory Network), which is better at handling long-term memory and gradient problems in backpropagation compared to RNNs, and is more computationally efficient than LSTMs. The specific operation of GRU is as follows:
[0096] R t =σ(W r X t +V r H t-1 )+b r
[0097] Z t =σ(W z X t +V Z H t-1 )+b z
[0098]
[0099]
[0100] Where X t This is the traffic characteristic obtained by the current GRU unit, H t-1 It is the hidden state output by the previous GRU unit, R t It is the output of the reset gate, Z t It updates the output of the gate, W. r V r W h V h W z V Z b r b z bh is a learnable parameter, and ⊙ is the element-wise dot product.
[0101] Furthermore, in some embodiments, the step of calculating traffic pattern similarity based on the traffic time-series data of each base station and constructing a semantic graph based on the traffic pattern similarity includes:
[0102] The traffic time-series data of each base station is divided into a preset number of subsequences;
[0103] Calculate the median of each subsequence, compare each value in each subsequence with the median, and discretize each value in each subsequence into a first value and a second value based on the comparison result;
[0104] The first and second values corresponding to each subsequence are merged to obtain the third value corresponding to each base station;
[0105] Set the third value, which is greater than the fourth value, as the fifth value; set the third value, which is less than or equal to the fourth value, as the sixth value.
[0106] Calculate the Hamming distance between any two base stations based on the fifth or sixth value of each base station;
[0107] A semantic graph of each base station is constructed based on the Hamming distance.
[0108] Specifically, the process of constructing a semantic graph may include:
[0109] Segmentation: The sequence of traffic data captured by the i-th base station Divided into several subsequences T is the length of Xi, and k is the length of each subsequence. Considering that the traffic data has a strong daily periodicity, the subsequences will be divided according to the daily periodicity.
[0110] Discretization: To save computation time, subsequences Each value in Through the values in the sequence The comparison discretizes the values to 1 and -1, representing only the trend change of the sequence. The mathematical formula is as follows:
[0111]
[0112] Median is the median function, where the first value is 1 and the second value is -1. In practice, the first and second values can be set to other values.
[0113] Vector fusion: Time series X of the i-th node (base station) i The fusion will be performed according to the following formula:
[0114]
[0115] in This represents the l-th subsequence of the i-th node (base station). The above segmentation to vector fusion process is equivalent to splitting and processing the traffic time-series data of each base station, and then fusing them. After fusion, if Em i If an element in the set is greater than the fourth value (which is 0 in this case), it is set to the fifth value (for example, the fifth value is 1); otherwise, it is set to the sixth value (for example, the sixth value is 0).
[0116] Calculate the Hamming distance: The distance between node i and node j is defined as Em. i and Em j The smaller the Hamming distance between two nodes, the higher the temporal similarity between them. For each node, the top m nodes with the highest temporal similarity are selected using the following formula to construct the semantic graph A. sim :
[0117]
[0118] Where e is the natural constant and σ is the hyperparameter.
[0119] By using the above method, compared to using the DTW algorithm, this embodiment greatly simplifies the computational overhead.
[0120] Furthermore, to improve the accuracy of the prediction results, real future traffic data is obtained during the operation. Then, the parameters of the fully connected network are corrected in reverse based on the prediction results and the real flow data, thereby further improving the accuracy of the prediction results.
[0121] As one example, see Figure 3 The traffic prediction method includes:
[0122] Obtain the location information and traffic time-series data of each base station in the wireless network. Calculate the distances between each base station based on the obtained location information, and construct a distance map A based on these distances. dis Semantic graph A is constructed based on the obtained traffic time series data. sim By learning the embeddings of each base station, an adaptive graph is constructed to obtain the global and local temporal embeddings of each traffic time series data. The temporal dependencies that are not present in the global and local temporal embeddings of the traffic time series data are filtered by a deep convolutional network and a preset mask attention network. The traffic time series data filtered by the preset mask attention network are mapped to a preset number of subspaces using a preset attention mechanism, and the mapped data are concatenated. The concatenated data is then mapped to establish long-term dependencies of time steps between each traffic time series data.
[0123] Next, a gated recurrent network is used to capture the temporal local dependencies between the time-series traffic data to obtain the first feature. Based on the first feature, distance map, semantic map, and adaptive map, a graph convolutional network is used to calculate the traffic feature. Finally, the traffic feature is passed through a two-layer fully connected layer to output the traffic data for the next P steps (by parsing the prediction instructions to obtain the predicted p steps in the future) as the final wireless network base station traffic prediction result. The specific processes can be referred to the above embodiment, and will not be repeated here.
[0124] The various optional implementation methods described in the embodiments of the present invention can be combined with each other or implemented individually without conflict, and the embodiments of the present invention do not limit this.
[0125] See Figure 4 , Figure 4 This is one of the structural diagrams of the flow prediction device provided in the embodiments of the present invention. For example... Figure 4 As shown, the flow prediction device includes:
[0126] The first acquisition module 410 is used to: acquire the location information of each base station in the wireless network and the traffic timing data of each base station;
[0127] The distance map construction module 420 is used to construct a distance map based on the location information of each base station.
[0128] Semantic graph construction module 430 is used to construct a semantic graph based on the traffic time-series data of each base station;
[0129] The adaptive graph construction module 440 is used to construct an adaptive graph through embedding learning from each base station;
[0130] The feature acquisition module 450 is used to obtain traffic features by calculating through a graph convolutional network based on the distance graph, semantic graph, and adaptive graph;
[0131] The prediction module 460 is used to obtain the traffic prediction result corresponding to the prediction instruction through a preset fully connected network based on the traffic characteristics and the received prediction instruction.
[0132] In one embodiment, the traffic prediction device further includes:
[0133] The second acquisition module (not shown in the figure) is used to obtain the global time embedding and / or local time embedding corresponding to the traffic time series data;
[0134] An integration module (not shown in the figure) is used to integrate the global time embedding and / or local time embedding into the traffic time series data.
[0135] In one embodiment, the integration module (not shown) is also used for:
[0136] Local time embedding is obtained based on the relative position of traffic time series data;
[0137] The traffic time series data is incorporated according to the local time embedding.
[0138] In one embodiment, the integration module (not shown) is also used for:
[0139] Obtain the time information corresponding to the traffic time series data, and encode the time information into a time vector to obtain the global time embedding corresponding to the traffic time series data;
[0140] The global time is embedded into the traffic time series data through a one-dimensional convolution operation.
[0141] In one embodiment, the integration module (not shown) is also used for:
[0142] Local time embedding is obtained based on the relative position of the fused traffic time series data;
[0143] The traffic time series data is incorporated according to the local time embedding.
[0144] In one embodiment, the integration module (not shown) is also used for:
[0145] The global time embedding and local time embedding are incorporated into the traffic time series data using the following calculation formula:
[0146]
[0147] Among them, X t Represents traffic time-series data, GE t Represents global time embedding, LE t This indicates local temporal embedding, and Linear indicates a linear mapping. This indicates a concatenation operation.
[0148] In one embodiment, GE t = {y, m, w, d, t}, where y represents the year, m represents the month, w represents the week, d represents the day, and t represents the time.
[0149] In one embodiment, the feature acquisition module 450 is further configured to:
[0150] Temporal dependencies not present in traffic time series data are filtered out by a preset mask attention network and incorporated into global and local temporal embeddings.
[0151] The traffic time series data filtered by the preset mask attention network is mapped to a preset number of subspaces using a preset attention mechanism, and the mapped data is then concatenated.
[0152] The spliced data is mapped to establish long-term time step dependencies between different traffic time series data.
[0153] The first feature is obtained by capturing the temporal local dependency between various traffic time-series data through a pre-defined gated recurrent network.
[0154] The traffic features are obtained by computing the first feature, distance map, semantic map, and adaptive map through a graph convolutional network.
[0155] In one embodiment, the feature acquisition module 450 is further configured to:
[0156] Obtain attention from each traffic time-series data;
[0157] A multi-head attention mechanism is used to map the attention of each traffic time series data to a preset number of subspaces and then concatenate the mapped data.
[0158] In one embodiment, the feature acquisition module 450 is further configured to:
[0159] The flow characteristics are obtained using the following calculation formula:
[0160]
[0161] Where K is the order of the adjacency matrix diffusion, A dis Represents a distance graph, A sim Represents a semantic graph, A apt Represents an adaptive graph, W k1 W k2 W k3 It is a learnable parameter, X t M represents the first feature. t This indicates the characteristics of the flow.
[0162] In one embodiment, the semantic graph construction module 430 is used for:
[0163] The traffic time-series data of each base station is divided into a preset number of subsequences;
[0164] Calculate the median of each subsequence, compare each value in each subsequence with the median, and discretize each value in each subsequence into a first value and a second value based on the comparison result;
[0165] The first and second values corresponding to each subsequence are merged to obtain the third value corresponding to each subsequence;
[0166] Set the subsequence with the third value greater than the fourth value as the fifth value, and set the remaining subsequences as the sixth value;
[0167] Calculate the Hamming distance between any two base stations based on the fifth or sixth value of each base station;
[0168] A semantic graph of each base station is constructed based on the Hamming distance.
[0169] The flow prediction device can implement each process of any of the above-described flow prediction method embodiments in the present invention and achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0170] This invention also provides an electronic device. Please refer to [link to relevant documentation]. Figure 5 The electronic device may include a processor 501, a memory 502, and a program 5021 stored in the memory 502 and capable of running on the processor 501.
[0171] When the communication device is a terminal, when the program 5021 is executed by the processor 501, it can implement any step in the method embodiment corresponding to any of the above embodiments and achieve the same beneficial effect, which will not be repeated here.
[0172] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by hardware related to program instructions, and the program can be stored in a readable medium. The present invention also provides a readable storage medium storing a computer program, which, when executed by a processor, can implement the above-described methods. Figure 2 , Figure 3 or Figure 4 Any step in the corresponding method embodiment can achieve the same technical effect, and will not be repeated here to avoid repetition.
[0173] The storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0174] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A flow prediction method, characterized in that, The method includes: Obtain the location information and traffic timing data of each base station in the wireless network; A distance map is constructed based on the location information of each base station, and a semantic map is constructed based on the traffic time-series data of each base station; An adaptive graph is constructed by embedding learning from each base station; Traffic features are obtained by computation using a graph convolutional network based on the distance graph, semantic graph, and adaptive graph. Based on the traffic characteristics and the received prediction instructions, a traffic prediction result corresponding to the prediction instructions is obtained through a preset fully connected network; wherein, the prediction instructions include the future time to be predicted; Before obtaining traffic features by computing through a graph convolutional network based on the distance graph, semantic graph, and adaptive graph, the process includes: Obtain the global time embedding and / or local time embedding corresponding to the traffic time series data; The global time embedding and / or local time embedding are incorporated into the traffic time series data; The construction of a semantic graph based on the traffic time-series data of each base station includes: The traffic time-series data of each base station is divided into a preset number of subsequences; Calculate the median of each subsequence, compare each value in each subsequence with the median, and discretize each value in each subsequence into a first value and a second value based on the comparison result; The first and second values corresponding to each subsequence are merged to obtain the third value corresponding to each base station; Set the third value, which is greater than the fourth value, as the fifth value; set the third value, which is less than or equal to the fourth value, as the sixth value. Calculate the Hamming distance between any two base stations based on the fifth or sixth value of each base station; A semantic graph of each base station is constructed based on the Hamming distance.
2. The method according to claim 1, characterized in that, The process of integrating the global time embedding and / or local time embedding into the traffic time series data includes: Local time embedding is obtained based on the relative position of traffic time series data; The traffic time series data is incorporated according to the local time embedding.
3. The method according to claim 1, characterized in that, The step of incorporating the global time embedding and / or local time embedding into the traffic time series data further includes: Obtain the time information corresponding to the traffic time series data, and encode the time information into a time vector to obtain the global time embedding corresponding to the traffic time series data; The global time is embedded into the traffic time series data through a one-dimensional convolution operation.
4. The method according to claim 2, characterized in that, The step of incorporating the global time embedding and / or local time embedding into the traffic time series data further includes: Local time embedding is obtained based on the relative position of the fused traffic time series data; The traffic time series data is incorporated according to the local time embedding.
5. The method according to claim 1, characterized in that, The step of incorporating the global time embedding and / or local time embedding into the traffic time series data further includes: The global time embedding and local time embedding are incorporated into the traffic time series data using the following calculation formula: ; in, Represents traffic time-series data, Indicates global time embedding. Indicates local temporal embedding. Represents a linear mapping. This indicates a concatenation operation.
6. The method according to claim 5, characterized in that, ={y, m, w, d, t}, where y represents the year, m represents the month, w represents the week, d represents the day, and t represents the time.
7. The method according to claim 5, characterized in that, The process of obtaining traffic features based on the distance graph, semantic graph, and adaptive graph through a graph convolutional network includes: Temporal dependencies not present in traffic time series data are filtered out by a preset mask attention network and incorporated into global and local temporal embeddings. The traffic time series data filtered by the preset mask attention network is mapped to a preset number of subspaces using a preset attention mechanism, and the mapped data is then concatenated. The spliced data is mapped to establish long-term time step dependencies between different traffic time series data. The first feature is obtained by capturing the temporal local dependency between various traffic time-series data through a pre-defined gated recurrent network. The traffic features are obtained by computing the first feature, distance map, semantic map, and adaptive map through a graph convolutional network.
8. The method according to claim 7, characterized in that, The process of using a preset attention mechanism to map the traffic time-series data filtered by a preset mask attention network to a preset number of subspaces, and then concatenating the mapped data, includes: Obtain attention from each traffic time-series data; A multi-head attention mechanism is used to map the attention of each traffic time series data to a preset number of subspaces and then concatenate the mapped data.
9. The method according to claim 7, characterized in that, The step of obtaining traffic features through a graph convolutional network based on the distance graph, semantic graph, and adaptive graph also includes: The flow characteristics are obtained using the following calculation formula: ; Where K is the order of the adjacency matrix diffusion, A dis Represents a distance graph, A sim Represents a semantic graph, A apt Represents an adaptive graph, W k1 W k2 W k3 It is a learnable parameter, X t M represents the first feature. t This indicates the characteristics of the flow.
10. A flow prediction device, characterized in that, include: The first acquisition module is used to: acquire the location information of each base station in the wireless network and the traffic time sequence data of each base station; The distance map construction module is used to construct a distance map based on the location information of each base station. The semantic graph construction module is used to construct semantic graphs based on the traffic time-series data of each base station; The adaptive graph construction module is used to construct an adaptive graph through embedding learning from each base station; The feature acquisition module is used to calculate traffic features based on the distance graph, semantic graph, and adaptive graph through a graph convolutional network; The prediction module is used to obtain a traffic prediction result corresponding to the prediction instruction through a preset fully connected network based on the traffic characteristics and the received prediction instruction; wherein the prediction instruction includes the future time to be predicted; The second acquisition module is used to obtain the global time embedding and / or local time embedding corresponding to the traffic time series data; An integration module is used to integrate the global time embedding and / or local time embedding into the traffic time series data; The semantic graph construction module is used for: The traffic time-series data of each base station is divided into a preset number of subsequences; Calculate the median of each subsequence, compare each value in each subsequence with the median, and discretize each value in each subsequence into a first value and a second value based on the comparison result; The first and second values corresponding to each subsequence are merged to obtain the third value corresponding to each subsequence; Set the subsequence with the third value greater than the fourth value as the fifth value, and set the remaining subsequences as the sixth value; Calculate the Hamming distance between any two base stations based on the fifth or sixth value of each base station; A semantic graph of each base station is constructed based on the Hamming distance.
11. An electronic device, comprising: A memory, a processor, and a program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program in the memory to implement the steps of the traffic prediction method as described in any one of claims 1 to 9.
12. A readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps in the traffic prediction method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Base station traffic prediction method and system, storage medium and equipment
CN113660676A