Flow prediction method, apparatus and readable storage medium
By constructing a traffic prediction model based on graph convolutional networks and one-dimensional convolutional networks, and combining the location and traffic information of network devices, the problems of high computational complexity and low accuracy in existing technologies are solved, and fast and accurate traffic prediction is achieved.
Patent Information
- Application Number
- CN202211163945.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-09-23
AI Technical Summary
Existing network device traffic prediction methods are computationally complex and have low accuracy, and fail to effectively consider the connections between different network devices.
A traffic prediction model based on graph convolutional networks and one-dimensional convolutional networks is adopted. Combining the location information and traffic information of network devices, the spatial and temporal traffic characteristics are determined by graph convolutional networks, and traffic prediction is performed by one-dimensional convolutional networks.
It improves the accuracy of traffic forecasting and reduces computational complexity, enabling fast and accurate traffic forecasting.
Smart Images

Figure CN115567968B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a traffic prediction method, apparatus and readable storage medium. Background Technology
[0002] With the development of 5G mobile communication technology, the number of network devices is constantly increasing, and the energy consumption of these devices is also increasing several times over. By predicting the traffic of each network device, data support can be provided for the design of subsequent energy-saving strategies.
[0003] Existing methods for predicting network device traffic are computationally complex and have low accuracy. Therefore, how to quickly and accurately predict network device traffic has become an urgent technical problem to be solved. Summary of the Invention
[0004] This application provides a traffic prediction method, apparatus, and readable storage medium for quickly and accurately predicting the traffic of network devices.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] Firstly, a traffic prediction method is provided, comprising: acquiring location information of multiple network devices and traffic information of the multiple network devices within a first time period; the traffic information includes multiple time points, the traffic of each network device at each time point, and the number of users corresponding to each time point; determining the traffic prediction value of the multiple network devices within a target time period based on the location information, the traffic information of the multiple network devices within the first time period, and a preset traffic prediction model; the traffic prediction model is constructed based on a graph convolutional network and a one-dimensional convolutional network, wherein the graph convolutional network is used to determine the spatial and temporal traffic characteristics of the multiple network devices based on the location information and traffic information, and the one-dimensional convolutional network is used to determine the traffic prediction value based on the traffic characteristics; the target time period is the time period after the first time period.
[0007] Based on the technical solution provided in this application, the traffic prediction device, in addition to acquiring traffic information within a first time period, also includes the location information of multiple network devices. Furthermore, the graph convolutional network included in the traffic prediction device is used to determine the spatial and temporal traffic characteristics of multiple network devices based on the location and traffic information, taking into account the connections between different network devices, thereby improving the accuracy of traffic prediction. The traffic prediction model is constructed based on one-dimensional convolutional network algorithms and graph convolutional network algorithms. One-dimensional convolutional networks, due to their simple structural characteristics, have lower computational complexity for predicting traffic, which can improve the speed of traffic prediction.
[0008] Optionally, based on location information, traffic information of multiple network devices within a first time period, and a preset traffic prediction model, the predicted traffic values for multiple network devices within a target time period are determined, including: determining the adjacency matrix of multiple network devices based on a preset Gaussian kernel function and location information; merging the adjacency matrix and the traffic information of each network device within the first time period to obtain a merged matrix for each network device; inputting the merged matrix of each network device into a graph convolutional network to obtain the feature matrix of each network device; merging the feature matrices of multiple network devices to obtain traffic features; and determining the predicted traffic values based on the traffic features and the one-dimensional convolutional network.
[0009] Optionally, traffic information of multiple network devices in a second time period is obtained, where the second time period is the time period before the first time period; a traffic prediction model is trained based on the traffic information in the second time period and the location information of the multiple network devices corresponding to the traffic information.
[0010] Optionally, the original location information of multiple network devices and the original traffic information of multiple network devices within a first time period are obtained; invalid data in the original location information and the original traffic information within the first time period are supplemented to obtain the location information of multiple network devices and the traffic information of multiple network devices within the first time period. Invalid data refers to data with null values.
[0011] Optionally, the accuracy of the predicted flow rate is determined based on preset evaluation indicators; the preset evaluation indicators include at least one of mean absolute error, root mean square error, and weighted average absolute error percentage.
[0012] Secondly, a traffic prediction device is provided, comprising an acquisition unit and a determination unit. The acquisition unit is used to acquire location information of multiple network devices and traffic information of the multiple network devices within a first time period. The traffic information includes multiple time points, the traffic of each network device at each time point, and the number of users corresponding to each time point. The determination unit is used to determine the traffic prediction value of the multiple network devices within a target time period based on the location information, the traffic information of the multiple network devices within the first time period, and a preset traffic prediction model. The traffic prediction model is constructed based on a graph convolutional network and a one-dimensional convolutional network. The graph convolutional network is used to determine the spatial and temporal traffic characteristics of the multiple network devices based on the location information and traffic information, and the one-dimensional convolutional network is used to determine the traffic prediction value based on the traffic characteristics. The target time period is the time period after the first time period.
[0013] Optionally, the determining unit is specifically used for: determining the adjacency matrix of multiple network devices based on a preset Gaussian kernel function and location information; merging the adjacency matrix and the traffic information of each network device in the first time period to obtain the merged matrix of each network device; inputting the merged matrix of each network device into a graph convolutional network to obtain the feature matrix of each network device; merging the feature matrices of multiple network devices to obtain traffic features; and determining the traffic prediction value based on the traffic features and the one-dimensional convolutional network.
[0014] Optionally, the traffic prediction device also includes a training unit and an acquisition unit, which are further used to acquire traffic information of multiple network devices in a second time period, the second time period being the time period before the first time period; the training unit is used to train a traffic prediction model based on the traffic information in the second time period and the location information of the multiple network devices corresponding to the traffic information.
[0015] Optionally, the acquisition unit is specifically used to: supplement invalid data in the traffic information within the first time period in order to obtain the location information of multiple network devices and the traffic information of multiple network devices within the first time period. Invalid data refers to data in which the value of traffic usage is empty.
[0016] Optionally, the determining unit is further configured to: determine the accuracy of the predicted value of the usage flow based on a preset evaluation index; the preset evaluation index includes at least one of mean absolute error, root mean square error, and weighted average absolute error percentage.
[0017] Thirdly, a traffic prediction device is provided, which can be a server, a chip within a server, or a system-on-a-chip. This traffic prediction device can implement the functions performed by the traffic prediction device in the above-mentioned aspects or possible designs. These functions can be implemented in hardware. For example, in one possible design, the traffic prediction device may include a processor and a communication interface. The processor can be used to support the traffic prediction device in implementing the functions involved in the first aspect or any possible design of the first aspect. For example, the processor receives a first request message through the communication interface.
[0018] In another possible design, the flow prediction device may further include a memory for storing necessary computer execution instructions and data. When the flow prediction device is running, the processor executes the computer execution instructions stored in the memory to cause the flow prediction device to perform the flow prediction method described in the first aspect or any of the possible designs of the first aspect.
[0019] Fourthly, a computer-readable storage medium is provided, which may be a readable non-volatile storage medium storing computer instructions or programs that, when executed on a computer, enable the computer to perform the traffic prediction method described in the first aspect or any possible design of the above aspects.
[0020] Fifthly, a computer program product containing instructions is provided, which, when run on a computer, enables the computer to perform the traffic prediction method described in the first aspect or any possible design of the above aspects.
[0021] In a sixth aspect, a traffic prediction apparatus is provided. This apparatus can be a server, a chip within a server, or a system-on-a-chip. The traffic prediction apparatus includes one or more processors and one or more memories. The one or more memories are coupled to the one or more processors and are used to store computer program code, including computer instructions. When the one or more processors execute the computer instructions, the traffic prediction apparatus causes it to perform the traffic prediction method as described in the first aspect or any possible design of the first aspect.
[0022] In a seventh aspect, a chip system is provided, comprising a processor and a communication interface. This chip system can be used to implement the functions performed by the traffic prediction device in the first aspect or any possible design of the first aspect, such as the processor acquiring a first request message from a terminal device via the communication interface. In one possible design, the chip system further includes a memory for storing program instructions and / or data. The chip system can be composed of chips or may include chips and other discrete devices, without limitation. Attached Figure Description
[0023] Figure 1 A schematic diagram of a network architecture provided in an embodiment of this application;
[0024] Figure 2 A schematic diagram of yet another network architecture provided in an embodiment of this application;
[0025] Figure 3 This is a schematic diagram of the structure of a flow prediction device provided in an embodiment of this application;
[0026] Figure 4 A flowchart illustrating a traffic prediction method provided in an embodiment of this application;
[0027] Figure 5 A flowchart illustrating another traffic prediction method provided in an embodiment of this application;
[0028] Figure 6 A flowchart illustrating another traffic prediction method provided in an embodiment of this application;
[0029] Figure 7 A flowchart illustrating another traffic prediction method provided in an embodiment of this application;
[0030] Figure 8 A flowchart illustrating another traffic prediction method provided in an embodiment of this application;
[0031] Figure 9 A schematic diagram illustrating the predicted and actual values of traffic flow provided in an embodiment of this application;
[0032] Figure 10 A schematic diagram illustrating the predicted and actual values of traffic flow provided in another embodiment of this application;
[0033] Figure 11 A flowchart illustrating another traffic prediction method provided in an embodiment of this application;
[0034] Figure 12 This is a schematic diagram of the structure of a flow prediction device provided in an embodiment of this application. Detailed Implementation
[0035] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0036] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0037] It should also be understood that the term "comprising" indicates the presence of the described feature, whole, step, operation, element and / or component, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements and / or components.
[0038] With the development of 5G mobile communication technology, the number of network devices is constantly increasing, and the energy consumption of these devices is also increasing several times over. By predicting the traffic of each network device, we can provide data support for the design of subsequent energy-saving strategies.
[0039] To predict network device traffic, methods such as traditional statistical learning and deep learning can be used.
[0040] Traditional statistical learning methods can predict network device traffic using autoregressive integrated moving average (ARIMA) models or Holt-Winters models. Deep learning methods can predict network device traffic using long short-term memory (LSTM) models or recurrent neural network-graph neural network (RNN-GNN) models.
[0041] Among them, the ARIMA model refers to predicting the traffic of network devices by using historical traffic information to change over time, but the accuracy of network device traffic prediction is relatively poor.
[0042] The Holt-Winters model predicts network device traffic based on historical traffic averages, trends, and seasonality. However, this prediction method has relatively poor accuracy.
[0043] The LSTM model refers to predicting network device traffic using historical traffic information over a long period of time. However, the large amount of historical traffic information over a long period of time results in low efficiency in predicting network device traffic.
[0044] The RNN-GNN model refers to the combination of recurrent neural networks and graph neural networks to predict the traffic of network devices. However, the RNN-GNN model has a complex structure and low efficiency in predicting network device traffic.
[0045] Existing methods for predicting network device traffic are computationally complex and do not consider the connections between different network device nodes, resulting in low accuracy. Therefore, how to quickly and accurately predict network device traffic has become an urgent technical problem to be solved.
[0046] In view of this, embodiments of this application provide a traffic prediction method, including: acquiring location information of multiple network devices and traffic information of the multiple network devices within a first time period; the traffic information includes multiple times, the traffic of each network device at each time, and the number of users corresponding to each time; determining the traffic prediction value of the multiple network devices within a target time period based on the location information, the traffic information of the multiple network devices within the first time period, and a preset traffic prediction model; the traffic prediction model is constructed based on a graph convolutional network and a one-dimensional convolutional network, the graph convolutional network is used to determine the spatial and temporal traffic characteristics of the multiple network devices based on the location information and traffic information, and the one-dimensional convolutional network is used to determine the traffic prediction value based on the traffic characteristics; the target time period is the time period after the first time period.
[0047] The methods provided in the embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0048] It should be noted that the network system described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network systems and the emergence of other network systems, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0049] Figure 1 This diagram illustrates a network architecture provided in an embodiment of this application. Figure 1 As shown, the network architecture may include a traffic prediction device 11 and a network device 12. The traffic prediction device 11 is connected to the network device 12. For example, the traffic prediction device 11 may be connected to the network device 12 wirelessly.
[0050] The traffic prediction device 11 involved in the embodiments of this application may also be referred to as a server, data center, etc. The embodiments of this application do not limit the specific technology, quantity, or form of the traffic prediction device 11.
[0051] In the embodiments of this application, the network device 12 may be: an evolved node B (eNB), a home base station, an access point (AP) in a wireless fidelity (WIFI) system, a wireless relay node, a wireless backhaul node, a transmission point (TP), or a transmission and reception point (TRP), etc. In the embodiments of this application, the specific technology and device form used for the network device 12 are not limited.
[0052] The network device 12 is used to send its own traffic information and location information within a preset time period to the traffic prediction device 11. The traffic prediction device 11 is used to receive its own traffic information and location information within the preset time period sent by the network device 11, and determine the traffic prediction value of the network device 11 within a target time period based on the traffic information and location information sent by the network device 11 within the preset time period.
[0053] It should be noted that, Figure 1 This is just an example framework diagram. Figure 1 The names of the various devices included are unrestricted, and except for Figure 1 In addition to the functional nodes shown, other nodes may also be included, but this application embodiment does not limit this.
[0054] Figure 2 This diagram illustrates yet another network architecture provided in an embodiment of this application. Figure 2 As shown, the network architecture may include an input module, a graph structure generation module, a graph convolutional network module, a one-dimensional convolutional network module, and an output module. The connections between these modules can be as follows: Figure 2 As shown, no further details will be provided.
[0055] The system comprises the following modules: an input module for inputting location information and traffic information of multiple network devices within a first time period; a graph structure generation module for determining the adjacency matrix of multiple network devices based on their location information; a graph convolutional network module for determining the spatial and temporal traffic characteristics of multiple network devices based on their location and traffic information; and a one-dimensional convolutional network module for determining traffic prediction values based on these traffic characteristics.
[0056] In practical implementation, Figure 1 and Figure 2 Each device in the process can be adopted Figure 3 The shown composition structure, or including Figure 3 The components shown. Figure 3 This is a schematic diagram illustrating the composition of a path planning device 200 provided in an embodiment of this application. The path planning device 200 can be a chip or system-on-a-chip in a terminal device. Alternatively, the path planning device 200 can be a chip or system-on-a-chip in a server. Figure 3 As shown, the path planning device 200 includes a processor 201, a communication interface 202, and a communication line 203.
[0057] Furthermore, the path planning device 200 may also include a memory 204. The processor 201, memory 204, and communication interface 202 can be connected via a communication line 203.
[0058] The processor 201 can be a CPU, a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 201 can also be other devices with processing capabilities, such as circuits, devices, or software modules, without limitation.
[0059] Communication interface 202 is used to communicate with other devices or other communication networks. Communication interface 202 can be a module, circuit, communication interface, or any device capable of enabling communication.
[0060] Communication line 203 is used to transmit information between the components included in the path planning device 200.
[0061] Memory 204 is used to store instructions. These instructions can be computer programs.
[0062] The memory 204 can be a read-only memory (ROM) or other type of static storage device that can store static information and / or instructions; it can also be a random access memory (RAM) or other type of dynamic storage device that can store information and / or instructions; it can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, etc., without limitation.
[0063] It should be noted that the memory 204 can exist independently of the processor 201 or can be integrated with the processor 201. The memory 204 can be used to store instructions, program code, or some data, etc. The memory 204 can be located inside or outside the path planning device 200, without limitation. The processor 201 is used to execute the instructions stored in the memory 204 to implement the path planning method provided in the following embodiments of this application.
[0064] In one example, processor 201 may include one or more CPUs, for example, Figure 3 CPU0 and CPU1 in the CPU.
[0065] As an optional implementation, the path planning device 200 includes multiple processors, for example, besides Figure 3 In addition to processor 201, it may also include processor 205.
[0066] It should be pointed out that, Figure 3 The composition shown does not constitute a basis for this. Figure 1 The limitations of each device in the process, except Figure 3 In addition to the components shown, Figure 1 The various devices may include more Figure 3 More or fewer components, or combinations of certain components, or different arrangements of components.
[0067] In this embodiment of the application, the chip system may be composed of chips or may include chips and other discrete devices.
[0068] Furthermore, the actions, terms, etc., involved in the various embodiments of this application can be referenced interchangeably without limitation. The message names or parameter names in the messages exchanged between the various devices in the embodiments of this application are merely examples, and other names may be used in specific implementations without limitation.
[0069] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0070] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0071] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0072] The following is combined with Figure 1 The network architecture shown illustrates the traffic prediction method provided in the embodiments of this application.
[0073] Figure 4 This application provides a traffic prediction method, which can be applied to a traffic prediction device, a terminal device, or a server. The traffic prediction device can be... Figure 1 The flow prediction device 11 in the flow prediction device 11 can also be a component, such as a chip. For example... Figure 4 As shown, the method includes the following steps S301-S302:
[0074] S301, The traffic prediction device acquires the location information of multiple network devices and the traffic information of the multiple network devices in a first time period.
[0075] Among them, network devices can be Figure 1 The network device 12 can also be a component in the network device 12, such as a chip.
[0076] The first time period can be any duration preceding the current time. For example, the first time period could be the 24 hours before the current time, the 48 hours before the current time, or even the 12 hours before the current time; this application does not impose any restrictions on this. Traffic information includes the time of traffic usage, the amount of traffic used, and the number of users using the traffic.
[0077] It should be noted that the embodiments of this application do not limit the smallest unit of time. For example, the time unit can be accurate to the second, such as the instantaneous flow data at 12:30:01. Another example is that the time unit can be accurate to the millisecond. Yet another example is that the time unit can be accurate to the nanosecond.
[0078] As one possible implementation, the traffic prediction device can respond to the first operation by sending a traffic information request message to the network device. Correspondingly, the network device receives the traffic information request message from the terminal device and sends the traffic information for a first time period and the location information of multiple network devices corresponding to the traffic information to the traffic prediction device.
[0079] As another possible implementation, network devices can also proactively send first information to the traffic prediction device at a preset period. This first information includes traffic information within a first time period and the location information of multiple network devices corresponding to that traffic information. Correspondingly, the traffic prediction device can obtain the traffic information of the network devices within the first time period and the location information of the multiple network devices corresponding to that traffic information by receiving the first information sent by the network devices.
[0080] For example, the preset period can be 1 minute. Or, for example, 5 minutes. Or, for example, 15 minutes.
[0081] The operating system and corresponding parameters used by the flow prediction device can be set as needed. For example, they can be shown in Table 1 below.
[0082] Table 1. Operating System and Corresponding Parameters
[0083] operating system parameter CPU i7-10870H Image Processor RTX 3060 Memory 32G Python 3.6.5 Pytorch 1.8.0+cu111
[0084] It should be noted that the data in Table 1 is merely exemplary. In this embodiment of the application, the operating system may also include other types and corresponding parameters, which are not limited thereto.
[0085] S302. The traffic prediction device determines the traffic prediction value of multiple network devices in the target time period based on the location information, the traffic information of multiple network devices in the first time period, and the preset traffic prediction model.
[0086] The preset traffic prediction model is constructed based on a one-dimensional convolutional network algorithm and a graph convolutional network algorithm. The graph convolutional network is used to determine the spatial and temporal traffic characteristics of multiple network devices based on location and traffic information, while the one-dimensional convolutional network is used to determine the traffic prediction value based on the traffic characteristics; the target time period is the time period following the first time period.
[0087] For example, assuming the current time is September 1, 2022, the first time period is the 48 hours preceding the current time, i.e., August 30, 2022 - August 31, 2022. The target time period is the 24 hours following the current time, i.e., September 1, 2022. Then, the traffic and location information from August 30, 2022 - August 31, 2022 can be input into a preset traffic prediction model to obtain the predicted traffic usage on September 1, 2022.
[0088] The parameters of the traffic prediction model can be set as needed. For example, they can be shown in Table 2 below.
[0089] Table 2. Operating System and Corresponding Parameters
[0090] Training batch size 4 Number of iterations (epochs) 50 Learning rate 0.001 Random dropout 0.3 Weight decay rate 0.0001 Clipping parameters 5 Number of layers in a graph convolutional network (GCN) 2
[0091] It should be noted that the data in Table 2 is merely exemplary. In the embodiments of this application, the traffic prediction model may also include other parameters, which are not limited thereto.
[0092] It should be noted that the graph convolutional network algorithm can satisfy the following formula 1.
[0093]
[0094] Where H represents a layer, l+1 represents the layer number, σ represents the activation function, and W represents the weight matrix between layers. A represents the adjacency matrix, and I represents the identity matrix. express The frequency matrix, This indicates a symmetrical normalization of A.
[0095] It should be noted that the one-dimensional convolutional network algorithm can satisfy the following formula 2.
[0096]
[0097] Where f represents the convolution operation of the x-th convolutional layer, X represents the input of the current layer, Fx represents the output feature map of the x-th layer, Conv represents a one-dimensional convolution operation, and m×n represents the kernel size of the convolution. For example, m×n can be 1×3, 2×3, 2×2, etc., without restriction.
[0098] Based on the above steps S301-S302, the traffic prediction device, in addition to acquiring traffic information within the first time period, also includes the location information of multiple network devices. Furthermore, the graph convolutional network included in the traffic prediction device is used to determine the spatial and temporal traffic characteristics of multiple network devices based on the location and traffic information, taking into account the connections between different network devices, thereby improving the accuracy of traffic prediction. The traffic prediction model is constructed based on one-dimensional convolutional network algorithms and graph convolutional network algorithms. One-dimensional convolutional networks, due to their simple structure, have lower computational complexity for predicting traffic, which can improve the speed of traffic prediction.
[0099] One possible implementation, such as Figure 5 As shown, in order to determine the traffic prediction values of multiple network devices within a target time period, the above-mentioned S302 may specifically include the following S401-S405:
[0100] S401, The traffic prediction device determines the adjacency matrix of multiple network devices based on a preset Gaussian kernel function and location information.
[0101] The preset Gaussian kernel function can be shown in Formula 3:
[0102]
[0103] Here, x and x′ represent any two distinct network devices, and k(x, x′) represents the Gaussian kernel value between network devices x and x′. x1 represents the location information of network device x, and x1′ represents the location information of network device x′, which can be the latitude and longitude data of the network devices. σ represents the average distance between the clustered regions of network devices.
[0104] Furthermore, adjacency matrices for multiple network devices can be determined based on the Gaussian kernel values between them. For example, to maintain the sparsity of the adjacency matrix, the adjacency value between network device x and network device x′ can be determined to be 0 if the Gaussian kernel value between them is greater than 0.1, and the adjacency value between them can be determined to be 1 if the Gaussian kernel value is less than or equal to 0.1.
[0105] For example, when the Gaussian kernel value between network device x and network device x′ is less than or equal to 0.1, the adjacency matrix between network device x and network device x′ can be represented by the following matrix A.
[0106]
[0107] S402. The traffic prediction device merges the adjacency matrix and the traffic information of each network device in the first time period to obtain the merged matrix of each network device.
[0108] As one possible implementation, the traffic prediction device can construct a three-dimensional matrix from the traffic information of each network device in the first time period, and then merge the adjacency matrix and the three-dimensional matrix.
[0109] In one example, the merge matrix for each network device can be represented by the following formula four.
[0110] G = {G1, G2, ... G} T Formula 4
[0111] Where G represents the merge matrix for each network device. T G represents the merge matrix for each network device within the T-th unit time interval of the first time interval. T ={A,V i},V i ={f t u i T i}, where A represents the adjacency matrix of multiple network devices, V i This indicates that the traffic information of each network device within the first time period is constructed as a three-dimensional matrix, f. t This represents the traffic of each network device at any given time, u i T represents the number of users at each time point; i Indicates the moment when traffic is used.
[0112] For example, taking a first time period of 24 hours, with the smallest unit of time for using data traffic being 1 hour. G = {G1, G2, ... G} 24}
[0113] S403 The traffic prediction device inputs the merged matrix of each network device into the graph convolutional network to obtain the feature matrix of each network device.
[0114] In one example, the feature matrix of each network device can be represented by the following formula five.
[0115] H T =GCN{G T Formula 5
[0116] Among them, H T Let represent the feature matrix of each network device at time T in the first time period, and W represent the training parameters in the graph convolutional network. These training parameters can be pre-set and are not restricted. GCN represents the graph convolution reference, which can be referred to Formula 1 above for details, and will not be elaborated further.
[0117] S404 The traffic prediction device merges the feature matrices of multiple network devices to obtain traffic features.
[0118] In one example, taking a first time period of 24 hours and the smallest unit of time for using traffic as 1 hour, Z = [H1, H2…H T ]. Where Z represents the flow characteristic.
[0119] S405. The flow prediction device determines the flow prediction value based on the flow characteristics and a one-dimensional convolutional network.
[0120] The one-dimensional convolutional network algorithm includes multiple residual blocks, and each residual block includes multiple convolutional layers.
[0121] In one example, the predicted value of the flow can be expressed as
[0122] in, This represents the predicted usage traffic of the D-th network device at time t+1.
[0123] O represents the weight matrix of the fully connected layer. g represents the bias term of the fully connected layer. B represents the number of residual blocks, and L represents the number of convolutional layers contained in each residual block. This represents the result of dilated convolution and adding residual connections for the traffic characteristics of multiple network devices at time t, where K represents the dilated convolution and adding residual connections operations.
[0124] One possible implementation, such as Figure 6 As shown, in order to obtain the traffic prediction model, the embodiments of this application may further include the following S501-S502:
[0125] S501, The flow prediction device acquires flow information within the second time period.
[0126] The second time period is the period preceding the first time period. For example, the second preset time period can be 5 days before the current time, or it can be the week before the current time, or the first time period can be the two weeks before the current time. This application does not impose any restrictions on this.
[0127] It should be noted that the method by which the flow prediction device obtains the flow information in the second time period can be referred to the description of S301 above, and will not be repeated here.
[0128] S502, The traffic prediction device trains a traffic prediction model based on the traffic information in the second time period and the location information of multiple network devices corresponding to the traffic information.
[0129] As one possible implementation, to train the traffic prediction model, the traffic prediction device uses traffic information within a second time period and the location information of multiple network devices corresponding to that traffic information as sample features, and uses the sample traffic as a supervision signal to train the traffic prediction model. If the difference between the predicted value of the usage traffic and the sample traffic is greater than a preset threshold, the parameters of the traffic prediction model are adjusted, and the traffic prediction is iteratively trained until the difference between the predicted value of the usage traffic and the sample traffic is less than or equal to the preset threshold.
[0130] In one example, the number of sample data can be 3204. The traffic prediction device can divide the sample data into a training set, a validation set, and a test set in a ratio of 8:1:1, that is, the number of samples in the training set is 2564, the number of samples in the validation set is 320, and the number of samples in the test set is 320.
[0131] It should be noted that the flow prediction device can normalize the entire dataset using the following formula six to uniformly map the data to the [0,1] interval, as shown in Formula six below:
[0132]
[0133] Where, x * This represents the normalized standard value. `max` represents the maximum value in the dataset. `min` represents the minimum value in the dataset.
[0134] One possible implementation, such as Figure 7 As shown, in order to improve the reliability of traffic information and location information, embodiments of this application may further include the following S601-S602:
[0135] S601, The traffic prediction device acquires the original location information of multiple network devices and the original traffic information of multiple network devices in the first time period.
[0136] The raw location information and raw traffic information are unprocessed information.
[0137] It should be noted that the specific implementation method of this step can be referred to the description of S301 above, and will not be repeated here.
[0138] S602, The traffic prediction device supplements invalid data in the original location information and traffic information in the first time period to obtain the location information of multiple network devices and the traffic information of multiple network devices in the first time period.
[0139] Invalid data refers to data with empty values.
[0140] As one possible implementation, the traffic prediction device can supplement invalid data in the traffic information within a first time period using a preset formula. For example, the preset formula could be the following formula seven:
[0141]
[0142] Where m represents the total number of times the network device collects traffic information. ikj This indicates that the data in the j-th dimension (row) of the traffic information collected by the i-th network device in the k-th collection is invalid data.
[0143] One possible implementation, such as Figure 8 As shown, in order to evaluate the accuracy of the predicted data on usage, embodiments of this application may further include the following S701:
[0144] S701, The flow prediction device determines the accuracy of the predicted flow rate based on preset evaluation indicators.
[0145] Multiple preset evaluation algorithms can be set as needed. For example, it can be at least one of mean absolute error (MAE), root mean square error (RMSE), and weighted mean absolute percentage error (WMAPE).
[0146] As one possible implementation, a preset mapping relationship is set between the index values corresponding to various preset evaluation indicators and the accuracy of the predicted value of the usage flow. The flow prediction device can determine the accuracy of the predicted value of the usage flow based on the preset mapping relationship.
[0147] For example, when the MAE value is in the range of 0-0.2, the RMSE value is in the range of 0-0.4, and the RMSE value is in the range of 0-0.4, the accuracy of the predicted value of the flow rate determined by the flow rate prediction device is high.
[0148] When the MAE value is in the range of 0.2-0.4, the RMSE value is in the range of 0.4-0.6, and the RMSE value is in the range of 0.4-0.6, the accuracy of the predicted value of the flow rate determined by the flow rate prediction device is generally considered to be average.
[0149] When the MAE value is in the range of 0.4-1, the RMSE value is in the range of 0.6-1, and the RMSE value is in the range of 0.6-1, the accuracy of the predicted value of the flow rate determined by the flow prediction device is low.
[0150] In one example, MAE can be represented according to the following formula.
[0151]
[0152] Among them, A t F t Let t represent the actual value and the predicted value at time t, respectively. n represents the number of samples.
[0153] It needs to be explained that A t F t The larger the error, the larger the MAE value. When the predicted value of the flow rate matches the actual value perfectly, the MAE value is 0.
[0154] In one example, RMSE can be represented by the following formula nine.
[0155]
[0156] In one example, WMAPE can be represented by the following formula.
[0157]
[0158] In one example, such as Figure 9 and Figure 10 The diagram illustrates two different traffic forecast values and actual traffic values. The first time period is 0-24 hours, and the second time period is 24-36 hours.
[0159] Furthermore, the flow prediction device can be based on Figure 9 The diagram showing the predicted and actual traffic flow values, along with the parameter values corresponding to various preset evaluation indicators determined by Formulas 8, 9, and 10 above, are shown in Table 3.
[0160] Table 3. Schematic diagram of various preset evaluation indicators
[0161] Hour MAE (%) RMSE (%) WMAPE (%) 27 13.19 35.0 34.67 30 13.70 36.17 36.0 36 14.38 36.83 38.21
[0162] It should be noted that the data in Table 3 is for illustrative purposes only. In the embodiments of this application, the parameter values corresponding to the preset evaluation indicators can also be other values, and there are no restrictions.
[0163] One possible implementation, such as Figure 11 As shown, embodiments of this application may further include the following S1-S8.
[0164] S1. The traffic prediction device acquires the location information of multiple network devices and the traffic information of multiple network devices in the first time period.
[0165] The specific details of this step can be found in S301 above, and will not be repeated here.
[0166] S2. The flow prediction device cleans the flow information within the first time period.
[0167] The specific details of this step can be found in S601 above, and will not be repeated here.
[0168] S3. The traffic prediction device divides the acquired data set into a training set, a validation set, and a test set according to a preset ratio.
[0169] For a detailed explanation of this step, please refer to S502 above, which will not be repeated here.
[0170] S4. The flow prediction device normalizes the flow information within the first time period.
[0171] For a detailed explanation of this step, please refer to S502 above, which will not be repeated here.
[0172] S5. The traffic prediction device calculates the adjacency matrix between multiple network devices based on the location information of multiple network devices corresponding to the traffic information, so as to construct a traffic prediction model.
[0173] For a detailed explanation of this step, please refer to S502 above, which will not be repeated here.
[0174] S6. The flow prediction device iteratively trains the flow prediction model.
[0175] It should be noted that S6 is repeated if the error on the validation set continues to decrease.
[0176] If the error on the validation set no longer continues to decrease, proceed with S7 as follows.
[0177] S7. The flow prediction device uses a trained flow prediction model to obtain the flow prediction value within the target time period.
[0178] For a detailed explanation of this step, please refer to S302 above, which will not be repeated here.
[0179] S8. The flow prediction device determines the accuracy of the predicted flow rate based on preset evaluation indicators.
[0180] The specific details of this step can be found in S701 above, and will not be repeated here.
[0181] The various solutions in the above embodiments of this application can be combined without contradiction.
[0182] This application embodiment can divide the flow prediction device into functional modules or functional units according to the above method example. For example, each function can be divided into a separate functional module or functional unit, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or in software functional modules or functional units. The module or unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0183] When dividing each function into modules according to its corresponding function. Figure 12 A schematic diagram of a traffic prediction device is shown. This traffic prediction device can be a server or a chip applied to a server. This traffic prediction device can be used to perform the server functions involved in the above embodiments. Figure 12 The flow prediction device shown may include: an acquisition unit 801 and a determination unit 802.
[0184] The acquisition unit 801 is used to acquire the location information of multiple network devices and the traffic information of multiple network devices in a first time period. The traffic information includes multiple times, the traffic of each network device at each time, and the number of users corresponding to each time.
[0185] The determining unit 802 is used to determine the traffic prediction value of multiple network devices in a target time period based on location information, traffic information of multiple network devices in a first time period, and a preset traffic prediction model. The traffic prediction model is constructed based on graph convolutional networks and one-dimensional convolutional networks. The graph convolutional network is used to determine the spatial and temporal traffic characteristics of multiple network devices based on location information and traffic information, and the one-dimensional convolutional network is used to determine the traffic prediction value based on the traffic characteristics. The target time period is the time period after the first time period.
[0186] In one possible design, the determining unit 802 is specifically used to: determine the adjacency matrix of multiple network devices based on a preset Gaussian kernel function and location information; merge the adjacency matrix and the traffic information of each network device in the first time period to obtain the merged matrix of each network device; input the merged matrix of each network device into a graph convolutional network to obtain the feature matrix of each network device; merge the feature matrices of multiple network devices to obtain traffic features; and determine the traffic prediction value based on the traffic features and the one-dimensional convolutional network.
[0187] In one possible design, the traffic prediction device further includes a training unit 803 and an acquisition unit 801, which is also used to acquire traffic information of multiple network devices in a second time period, the second time period being the time period before the first time period; the training unit 803 is used to train a traffic prediction model based on the traffic information in the second time period and the location information of the multiple network devices corresponding to the traffic information.
[0188] In one possible design, the acquisition unit 801 is specifically used to: acquire the original location information of multiple network devices and the original traffic information of multiple network devices within a first time period; supplement invalid data in the original location information and the original traffic information within the first time period to acquire the location information of multiple network devices and the traffic information of multiple network devices within the first time period, wherein invalid data is data with null values.
[0189] In one possible design, the determining unit 802 is further configured to: determine the accuracy of the predicted value of the usage flow based on a preset evaluation index; the preset evaluation index includes at least one of mean absolute error, root mean square error, and weighted average absolute error percentage.
[0190] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be implemented by a computer program instructing related hardware. This program can be stored in the computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be an internal storage unit of the traffic prediction device (including a data sender and / or a data receiver) of any of the foregoing embodiments, such as the hard disk or memory of the traffic prediction device. The computer-readable storage medium can also be an external storage device of the terminal device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the terminal device. Further, the computer-readable storage medium can include both the internal storage unit of the traffic prediction device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the traffic prediction device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0191] It should be noted that the terms "first" and "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. 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 apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0192] It should be understood that in this application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three or more, and "and / or" is used to describe the relationship between related objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0193] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0194] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0195] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0196] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0197] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0198] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A traffic prediction method characterized by, The method comprises: obtaining position information of a plurality of network devices and traffic information of the plurality of network devices in a first time period, the traffic information comprising a plurality of time points, traffic of each network device at each time point, and a corresponding number of users at each time point; determining a traffic prediction value of the plurality of network devices in a target time period according to the position information and the traffic information of the plurality of network devices in the first time period and a preset traffic prediction model, the traffic prediction model being constructed based on a graph convolution network and a one-dimensional convolution network, the graph convolution network being used to determine traffic features of the plurality of network devices in space and time according to the position information and the traffic information, and the one-dimensional convolution network being used to determine a traffic prediction value according to the traffic features, the target time period being a time period after the first time period; the determining of the traffic prediction value of the plurality of network devices in the target time period according to the position information and the traffic information of the plurality of network devices in the first time period and the preset traffic prediction model comprises: determining an adjacency matrix of the plurality of network devices according to a preset Gaussian kernel function and the position information; merging the adjacency matrix and the traffic information of each network device in the first time period to obtain a merged matrix of each network device; inputting the merged matrix of each network device into the graph convolution network to obtain a feature matrix of each network device; merging the feature matrices of the plurality of network devices to obtain the traffic features; determining the traffic prediction value according to the traffic features and the one-dimensional convolution network.
2. The method of claim 1, wherein, The method further comprises: obtaining the traffic information of the plurality of network devices in a second time period, the second time period being a time period before the first time period; training the traffic prediction model according to the traffic information in the second time period and position information of a plurality of network devices corresponding to the traffic information.
3. The method of claim 1, wherein, The obtaining of the position information of the plurality of network devices and the traffic information of the plurality of network devices in the first time period comprises: obtaining original position information of the plurality of network devices and original traffic information of the plurality of network devices in the first time period; supplementing invalid data in the original position information and the original traffic information in the first time period to obtain the position information of the plurality of network devices and the traffic information of the plurality of network devices in the first time period, the invalid data being data with a null value.
4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: determining an accuracy of the traffic prediction value according to a preset evaluation index, the preset evaluation index comprising at least one of a mean absolute error, a root mean square error, and a weighted average absolute error percentage.
5. A flow prediction device, characterized by, The apparatus comprises an obtaining unit and a determining unit; the obtaining unit is configured to obtain position information of a plurality of network devices and traffic information of the plurality of network devices in a first time period, the traffic information comprising a plurality of time points, traffic of each network device at each time point, and a corresponding number of users at each time point; The determination unit is configured to determine a traffic prediction value of the plurality of network devices in a target time period according to the position information, the traffic information of the plurality of network devices in the first time period, and a preset traffic prediction model; the traffic prediction model is constructed based on a graph convolution network and a one-dimensional convolution network; the graph convolution network is configured to determine traffic features of the plurality of network devices in space and time according to the position information and the traffic information; the one-dimensional convolution network is configured to determine the traffic prediction value according to the traffic features; and the target time period is a time period after the first time period. The determination unit is specifically configured to: determine an adjacency matrix of the plurality of network devices according to a preset Gaussian kernel function and the position information; merge the adjacency matrix and the traffic information of each network device in the first time period to obtain a merged matrix of each network device; input the merged matrix of each network device into the graph convolution network to obtain a feature matrix of each network device; merge the feature matrices of the plurality of network devices to obtain the traffic features; and determine the traffic prediction value according to the traffic features and the one-dimensional convolution network.
6. The apparatus of claim 5, wherein, The device further includes a training unit, The acquisition unit is further configured to acquire the traffic information of the plurality of network devices in a second time period; and the second time period is a time period before the first time period. The training unit is further configured to train the traffic prediction model according to the traffic information in the second time period and the position information of the plurality of network devices corresponding to the traffic information.
7. The apparatus of claim 5, wherein, The acquisition unit is specifically configured to: acquire original position information of the plurality of network devices and original traffic information of the plurality of network devices in the first time period; and supplement invalid data in the original position information and the original traffic information in the first time period to acquire the position information of the plurality of network devices and the traffic information of the plurality of network devices in the first time period; the invalid data is data with a null value.
8. The apparatus of any one of claims 5-7, wherein, The determination unit is further configured to: determine the accuracy of the traffic prediction value according to a preset evaluation index; and the preset evaluation index includes at least one of a mean absolute error, a root mean square error, and a weighted average absolute error percentage.
9. A computer-readable storage medium, characterized in that, The readable storage medium stores instructions, and when the instructions are executed, the method in any one of claims 1-4 is implemented.
10. A flow prediction device, characterized by, The device includes: a processor, a memory, and a communication interface; the communication interface is configured to enable the traffic prediction device to communicate; the memory is configured to store one or more programs including computer execution instructions; and when the traffic prediction device is running, the processor executes the computer execution instructions stored in the memory to enable the traffic prediction device to perform the method in any one of claims 1-4.
Citation Information
Patent Citations
Network flow prediction method and device, computer equipment and readable storage medium
CN110995520A
Wireless network flow prediction method based on multi-graph convolution
CN112911626A