Traffic delay integrated prediction method and device, electronic equipment and storage medium
By performing graph-structured processing on daily user traffic data and combining time-series graph neural networks and extreme gradient boosting tree models, the problem of low accuracy in traffic delay prediction in existing technologies has been solved, achieving more accurate traffic delay prediction.
Patent Information
- Application Number
- CN202510472708.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, traffic delay prediction relies solely on the previous period's delay data as a benchmark, without considering the influence of other factors, resulting in low prediction accuracy.
By acquiring daily user traffic time series data and user information feature data, graph structure processing is performed, and the time series graph neural network GNN4TS model and the extreme gradient boosting tree XGBoost model are combined to predict whether traffic will be delayed in future time periods.
It improves the accuracy of traffic delay prediction by combining dynamic and static features to enhance the accuracy of prediction results.
Smart Images

Figure CN121000640A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a traffic delay integrated prediction method, apparatus, electronic device, and storage medium. Background Technology
[0002] In related technologies, traffic deferral forecasting typically uses the previous period's deferral data as the benchmark revenue for the current period and adjusts it based on empirical methods. This involves a high degree of human intervention. In reality, traffic deferral is affected by a variety of factors. Existing traffic deferral forecasting only considers the remaining traffic from the previous period and does not take into account the influence of other factors, resulting in low accuracy in traffic deferral forecasting.
[0003] Therefore, how to improve the accuracy of traffic delay prediction is a problem that needs to be solved. Summary of the Invention
[0004] This invention provides a traffic delay integrated prediction method, apparatus, electronic device, and storage medium to at least solve the problem in related technologies where traffic delay prediction is inaccurate because it only uses the previous period's delayed data as the current period's baseline and makes adjustments based on experience. The technical solution of this invention is as follows:
[0005] According to a first aspect of the present invention, a traffic delay integrated prediction method is provided, comprising:
[0006] Acquire daily user traffic time-series data and user information feature data;
[0007] The daily flow time series data is processed into graph structure data to obtain graph structure data;
[0008] Based on the graph structure data, predict future time-series traffic forecast data;
[0009] Based on the time-series data of traffic prediction for the future time period and the user information feature data, predict whether the user's traffic at the end of the month will be deferred.
[0010] Optionally, the step of performing graph-structured processing on the daily traffic time series data to obtain graph-structured data includes:
[0011] Set the sliding window split length;
[0012] The daily flow time series data is slide-segmented according to the set sliding window segmentation length;
[0013] Determine the autocorrelation coefficient between the current moment and the previous preset moment in the daily traffic flow time series data after sliding segmentation;
[0014] Based on the autocorrelation coefficient, the daily flow time series data after sliding segmentation is processed into graph structured data.
[0015] Optionally, the time-series data for predicting future traffic flow based on the graph structure data includes:
[0016] The graph structured data is input into the time series graph neural network GNN4TS model in the trained traffic delay prediction model to extract user dynamic behavior features. The GNN4TS model is a model trained based on the spatial domain graph convolutional neural network GraphSAGE.
[0017] Based on the temporal and spatial characteristics of the user's dynamic behavior features, predict traffic forecast time series data for future time periods.
[0018] Optionally, predicting whether the user's traffic is deferred based on the traffic prediction time-series data for the future time period and the user information feature data includes:
[0019] The traffic prediction time series data for the future time period and the user information feature data are input into the Extreme Gradient Boosting Tree (XGBoost) model in the traffic deferred prediction model for prediction, and the classification prediction results are obtained.
[0020] Based on the classification and prediction results, it is determined whether the user's end-of-month traffic is deferred.
[0021] Optionally, the method further includes: pre-training a traffic delay prediction model in the following manner to obtain a trained traffic delay prediction model, wherein the traffic delay prediction model includes: a time series graphical neural network (GNN4TS) model and an extreme gradient boosting tree (XGBoost) model:
[0022] Obtain the training sample dataset and the label probability of the training sample dataset. The training sample dataset includes: time series sample data of daily traffic data and user information feature data.
[0023] The daily traffic flow time-series sample data from the training sample dataset is input into the GNN4TS model of the traffic delay prediction model for training. The output of the GNN4TS model and the user information feature data are input into the XGBoost model of the traffic delay prediction model for training. The output of the XGBoost model is compared with the label probability of the input training sample dataset, the difference is calculated, and the difference is used as the loss value. The loss value is minimized by the gradient descent algorithm. Based on the minimized loss value, iterative training is performed using the backpropagation mechanism, and the hyperparameters of the traffic delay prediction model are adjusted until the loss value meets the set conditions or the traffic delay prediction model converges, thus obtaining the trained traffic delay prediction model.
[0024] Optionally, the pre-trained traffic delay prediction model, to obtain the trained traffic delay prediction model, further includes:
[0025] A regularization term for the tree is introduced into the gradient descent algorithm in each iteration to control the complexity of the tree when minimizing the loss function.
[0026] Optionally, the pre-trained traffic delay prediction model, to obtain the trained traffic delay prediction model, further includes:
[0027] When the objective function of each iteration optimization is continuously greater than the set threshold, the automatic optimizer is selected to optimize the hyperparameters of the traffic delay prediction model.
[0028] According to a second aspect of the present invention, a traffic delay integrated prediction apparatus is provided, comprising:
[0029] The acquisition module is used to acquire daily traffic time-series data and user information feature data.
[0030] The structured processing module is used to perform graph structured processing on the daily flow time series data to obtain graph structured data;
[0031] The first prediction module is used to predict traffic forecast time series data for future time periods based on the graph structure data;
[0032] The second prediction module is used to predict whether the user's end-of-month traffic will be delayed based on the traffic prediction time series data for the future time period and the user information feature data.
[0033] Optionally, the structured processing module includes:
[0034] The settings module is used to set the sliding window split length;
[0035] The segmentation module is used to perform sliding segmentation on the daily flow time series data according to the set sliding window segmentation length;
[0036] The correlation determination module is used to determine the autocorrelation coefficient between the current moment and the previous preset moment of the daily traffic time series data after sliding segmentation by the segmentation module;
[0037] The graph structuring module is used to perform graph structuring on the daily flow time series data after sliding segmentation according to the autocorrelation coefficient to obtain graph structured data.
[0038] Optionally, the first prediction module includes:
[0039] The extraction module is used to input the graph structured data into the time series graph neural network GNN4TS model in the trained traffic delay prediction model to extract user dynamic behavior features. The GNN4TS model is a model trained based on the spatial domain graph convolutional neural network GraphSAGE.
[0040] The traffic prediction module is used to predict traffic forecast time series data for future time periods based on the temporal and spatial characteristics in the user dynamic behavior features.
[0041] Optionally, the second prediction module includes:
[0042] The classification prediction module is used to input the traffic prediction time series data for the future time period and the user information feature data into the Extreme Gradient Boosting Tree (XGBoost) model in the traffic deferred prediction model for prediction, and obtain the classification prediction result.
[0043] The determination module is used to determine whether the user's end-of-month traffic is deferred based on the classification prediction results of the classification prediction module.
[0044] Optionally, the device further includes:
[0045] The training module is used to pre-train the traffic delay prediction model to obtain the trained traffic delay prediction model, which includes: a time series graph neural network GNN4TS model and an extreme gradient boosting tree XGBoost model.
[0046] Optionally, the training module includes:
[0047] The training set acquisition module is used to acquire the training sample dataset and the label probability of the training sample dataset. The training sample dataset includes: daily traffic data time series sample data and user information feature data.
[0048] The model training module is used to input the daily traffic data time-series sample data from the training sample dataset into the GNN4TS model of the traffic delay prediction model for training, and to input the output of the GNN4TS model and the user information feature data into the XGBoost model of the traffic delay prediction model for training; and to compare the output of the XGBoost model with the label probabilities of the input training sample dataset, calculate the difference, use the difference as the loss value, minimize the loss value using the gradient descent algorithm, and perform iterative training using the backpropagation mechanism based on the minimized loss value, and adjust the hyperparameters of the traffic delay prediction model until the loss value meets the set conditions or the traffic delay prediction model converges, thereby obtaining the trained traffic delay prediction model.
[0049] Optionally, the training module is further configured to introduce a regularization term for the tree in each iteration of the gradient descent algorithm to control the complexity of the tree while minimizing the loss function.
[0050] Optionally, the module training module is further configured to select and trigger an automatic optimizer to optimize the hyperparameters of the traffic delay prediction model when the objective function of each round of iteration optimization is continuously greater than a set threshold.
[0051] According to a third aspect of the present invention, an electronic device is provided, comprising:
[0052] processor;
[0053] Memory used to store the processor's executable instructions;
[0054] The processor is configured to execute the instructions to implement the traffic delay integrated prediction method as described above.
[0055] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the flow delay integrated prediction method as described above.
[0056] According to a fifth aspect of the present invention, a computer program product is provided, comprising a computer program or instructions that, when executed by a processor of an electronic device, implement the traffic delay integrated prediction method as described in any one of claims 1 to 7.
[0057] The technical solutions provided by the embodiments of the present invention bring at least the following beneficial effects:
[0058] In this embodiment of the invention, daily traffic time-series data and user information feature data are acquired; the daily traffic time-series data is processed into graph structure data; traffic prediction time-series data for future time periods is predicted based on the graph structure data; and based on the traffic prediction time-series data for future time periods and the user information feature data, it is predicted whether the user's end-of-month traffic will be delayed. In other words, this embodiment of the invention performs graph structure processing on the user's daily traffic time-series data, predicts traffic prediction time-series data for future time periods based on the obtained graph structure data, and combines the traffic prediction time-series data with user information feature data to determine whether the user's end-of-month traffic will be delayed. That is, this embodiment of the invention improves the accuracy of traffic delay prediction by making predictions based on the dynamic and static features in the traffic data.
[0059] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present invention and, together with the description, serve to explain the principles of the invention. They do not constitute an undue limitation of the invention. To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0061] Figure 1 This is a flowchart of a traffic delay integrated prediction method provided in an embodiment of the present invention.
[0062] Figure 2 This is a schematic diagram of a graph structure provided in an embodiment of the present invention.
[0063] Figure 3 This is a schematic diagram of a GNN4TS model provided in an embodiment of the present invention.
[0064] Figure 4 This is a schematic diagram illustrating the training of a traffic delay prediction model provided in an embodiment of the present invention.
[0065] Figure 5 This is a block diagram of a flow delay integrated prediction device provided in an embodiment of the present invention.
[0066] Figure 6 This is a block diagram of a structured processing module provided in an embodiment of the present invention.
[0067] Figure 7 This is a block diagram of a first prediction module provided in an embodiment of the present invention.
[0068] Figure 8 This is a block diagram of an electronic device provided in an embodiment of the present invention.
[0069] Figure 9 This is a block diagram of an apparatus for traffic delay integrated prediction provided in an embodiment of the present invention. Detailed Implementation
[0070] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0071] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention 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 the invention 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 invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0072] Technical terms:
[0073] The Graph Neural Networks for Time Series Analysis (GNN4TS) model refers to a graph neural network model used for time series analysis.
[0074] Data rollover refers to the default service policy implemented by the three major telecom operators for monthly data plan users. This policy ensures that any remaining data in a user's monthly plan is not cleared at the end of the month and can be unconditionally carried over to the end of the following month. For operators' revenue recognition, this month's data revenue = this month's billed data revenue + last month's rolled-back data revenue [recovered] - this month's rolled-back data revenue. Specifically, this month's rolled-back data revenue = total data revenue eligible for rollover this month × (this month's rolled-back data / total data volume eligible for rollover this month).
[0075] Extreme Gradient Boosting (XGBoost) is an ensemble algorithm based on Gradient Boosting Machine (GBM), which improves upon decision trees. This algorithm uses a single decision tree as the base learner, iterates through training data to minimize the loss function using gradient descent optimization, continuously generates subtrees and splits them by traversing all gain features, corrects the negative gradient residuals of the original model, introduces a regularization term to limit the complexity of tree splitting, and finally integrates the results to obtain the final classification prediction.
[0076] Ensemble learning is a machine learning method that constructs a robust composite learning model by integrating the predictions of multiple weak learners. Its core algorithmic features include ensemble strategy, base learner selection, and ensemble weight allocation. The ensemble strategy determines the final prediction result through methods such as voting, averaging, and weighted averaging. Base learner selection involves choosing learners of different types or parameter settings, while ensemble weight allocation determines the contribution weight of each base learner in the final prediction. Ensemble learning improves the model's generalization ability by combining the advantages of multiple learners, making it suitable for customized solutions to various specialized machine learning problems.
[0077] Based on the understanding of the above technical terms, please also refer to the following embodiments.
[0078] Please see Figure 1 This is a flowchart of a traffic delay integrated prediction method provided in an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0079] Step 101: Obtain daily traffic time series data and user information feature data.
[0080] Step 102: Perform graph structuring on the daily flow time series data to obtain graph structured data.
[0081] Step 103: Based on the graph structure data, predict the traffic forecast time series data for future time periods.
[0082] Step 104: Based on the traffic prediction time series data for the future time period and the user information feature data, predict whether the user's end-of-month traffic will be delayed.
[0083] The traffic delay integrated prediction method described in this invention can be applied to terminals, servers, etc., without limitation. The terminal implementation device can be an electronic device such as a smartphone, laptop, tablet, desktop computer, personal digital assistant (PDA), and wearable device. The server can be an independent server, a server cluster, or a server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, or big data and artificial intelligence platforms, etc., without limitation.
[0084] This invention, in its embodiments, constructs a graph structure from daily user traffic time-series data. Based on this graph structure, it predicts future traffic forecast time-series data and combines this traffic forecast time-series data with user information feature data to determine whether a user's end-of-month traffic will be deferred. In other words, this invention improves the accuracy of traffic deferred prediction by making predictions based on both dynamic and static features in the traffic data.
[0085] The following is combined Figure 1 The specific implementation steps of a traffic delay integrated prediction method provided in the embodiments of the present invention will be described in detail.
[0086] In step 101, user daily traffic time series data and user information feature data are obtained.
[0087] In this step, user daily traffic time series data and user information feature data can be obtained from a local database or remotely. This embodiment does not impose any restrictions.
[0088] This includes daily traffic time series data (referred to as traffic time series data). It should be noted that user information feature data (or original user information feature data) is usually user information feature data after anonymization processing. Anonymization processing refers to transforming certain sensitive information according to anonymization rules to reliably protect sensitive privacy data.
[0089] In this step, the acquired user information feature data can be preprocessed. This preprocessing can include basic preprocessing such as outlier removal and missing value imputation, as well as encoding of categorical features.
[0090] The user information feature data is shown in Table 1, and the daily traffic time series data is shown in Table 2, with units in MB. It should be noted that Tables 1 and 2 are merely illustrative examples and are not limited to these in practical applications.
[0091] Table 1
[0092]
[0093] Table 2
[0094]
[0095] In step 102, the daily flow time series data is processed into graph structure data to obtain graph structure data.
[0096] In this step, the daily traffic time series data usually refers to the displayed remaining traffic time series data.
[0097] Specifically, the process of performing graph structuring on the daily traffic flow time series data to obtain graph structured data includes: first, setting a sliding window segmentation length; performing sliding segmentation on the daily traffic flow time series data according to the set sliding window segmentation length; determining the autocorrelation coefficient between the current time and the previous preset time of the segmented daily traffic flow time series data; and performing graph structuring on the daily traffic flow time series data according to the autocorrelation coefficient to obtain graph structured data.
[0098] In this embodiment, the sliding window segmentation length N=7 is first used as an example, but it is not limited to this in specific applications. Then, the daily flow time series data is segmented according to the set sliding window segmentation length N=7.
[0099] Secondly, the autocorrelation function (ACF) is used to determine the correlation (i.e., autocorrelation coefficient) between the current time of the time series after sliding partitioning and the previous preset time (e.g., the first two time points).
[0100] In other words, this embodiment of the invention performs sliding segmentation on time series data according to a sliding window segmentation length N (i.e., a fixed length) to predict traffic data for a future time period. Each node of the sliding time series with a sliding window segmentation length N is used as a vertex V of a weighted directed graph. The edges E of the directed graph represent the relationship between each traffic monitoring point, determined by the autocorrelation function (ACF) test, and its expression is shown in formula (1). That is, the correlation between the current time and the previous k times of the time series after sliding segmentation is calculated using the following formula (1):
[0101]
[0102] The time series after sliding partitioning is: ρ(t,k) represents x t With x t-k The autocorrelation coefficient, t=1,2,3,...,N a N a This indicates the length of the original time series, typically the number of days in each month.
[0103] In this embodiment, each node of the sliding window segmentation length (i.e., fixed length) N is used as a vertex V of a weighted directed graph, referred to as a flow monitoring point. The edges E of the directed graph represent the relationships between the flow monitoring points, determined by the ACF autocorrelation function test. The flow monitoring points possess spatiotemporal characteristics (i.e., including both temporal and spatial features). At time τ, the node characteristics, i.e., the graph signal, can be represented as... Where i = 1, 2, 3, ..., N, and C represents the feature dimension of each node.
[0104] Finally, based on the autocorrelation coefficient, the daily flow time series data after sliding partitioning is processed into graph structured data to obtain graph structured data, that is, the daily flow time series data after sliding partitioning is processed into graph structured data according to... Figure 2 As shown, a graph structure is created to construct flow monitoring points. Figure 2 This is a schematic diagram of a graph structure provided as an embodiment of the present invention. For example... Figure 2 As shown, τ is a certain sliding moment. In this embodiment, τ1 and τ2 are used as examples. λ is an n-dimensional node feature, x is a flow monitoring node, and the vertex in-degree is determined by the value of K.
[0105] The spatiotemporal features in this embodiment may include: whether it is a weekday (C1), whether it is a holiday (C2), whether data usage occurred outside the number's local area (C3), and the weather in the number's local area (C4). It should be noted that this embodiment generally assumes the number's local area is where the card was issued, reflecting the user's location; therefore, the feature dimension of each node in this embodiment is 4. Then, the adjacency matrix A and the node feature dimension matrix X of the directed graph G(V,E) are... i It can be represented as:
[0106]
[0107] In step 103, traffic forecast time series data for future time periods are predicted based on the graph structure data.
[0108] In this step, firstly, the graph-structured data is input into a pre-trained time-series graph neural network (GNN4TS) model within a traffic delay prediction model to extract user dynamic behavior features. The GNN4TS model is trained using a spatial graph convolutional neural network (GraphSAGE). The GNN4TS model includes an input layer, multiple GraphSAGE layers, a Flatten layer, a fully connected layer, and an output layer. Secondly, based on the temporal and spatial features of the user dynamic behavior characteristics, time-series traffic prediction data for future periods is predicted.
[0109] In this step, the graph structure data is input into the time-series graph neural network GNN4TS in the traffic delay prediction model to capture the temporal and spatial characteristics of the traffic data (i.e., user dynamic behavior characteristics). Finally, the traffic flow at the next k time points is predicted using these temporal and spatial characteristics, which can be expressed as:
[0110]
[0111] Where G represents the directed graph G(V,E) with the graph structure number, its structure is as follows: Figure 2 As shown, V represents the nodes of the weighted directed graph that are vertices of the sliding window segmentation length sliding sequence, called flow monitoring points, and the edges E of the directed graph represent the relationships between the flow monitoring points. This represents the predicted time series result of traffic at future points in time, with a length of k, which is a preset value to ensure the correlation between the predicted sequence and the known sequence. F(·) represents the GNN4TS model. The GNN4TS model can employ a spatial domain-based graph convolutional neural network (GraphSAGE, Graph Sample and Aggregate), suitable for graph convolution in directed graphs. It can utilize information from known nodes to generate embeddings for unknown nodes and can capture vertex features of the neighborhood, conforming to the characteristics of time series data. GraphSAGE includes two steps: graph sampling and aggregation. The number of sampling layers is determined by the ACF autocorrelation test result k to ensure sufficient aggregation of adjacent node information. The aggregation method can be average aggregation, expressed by the following formula:
[0112]
[0113] in, W represents the embedded representation of node v in layer k, i.e., the aggregated result of sampling node v in layer k. σ represents the nonlinear activation function. k This represents the learnable weight matrix of the k-th layer.
[0114] In this embodiment, the GNN4TS model based on the GraphSAGE framework includes: an input layer, k GraphSAGE layers, a Flatten layer, a fully connected layer, and an output layer. Specifically... Figure 3 As shown, Figure 3 This is a schematic diagram of a GNN4TS model provided in an embodiment of the present invention. The GNN4TS model is based on the GraphSAGE framework, and the description of each layer of the GNN4TS model is detailed below.
[0115] In this embodiment of the invention, a time-series graph neural network is established based on the directed graph data from the above steps, thereby obtaining a month-end traffic prediction sequence with spatiotemporal characteristics. It should be noted that the method described in this embodiment depends on the deployment and operating environment, such as sample size and running speed. The hardware and software facilities used in this embodiment are shown in Table 3 as examples, but are not limited to these in specific applications; Table 3 is merely an illustrative example.
[0116] Table 3
[0117]
[0118] In this embodiment, the ACF autocorrelation test result k=2 obtained by the above steps means that the current time is correlated with the previous two time points. Therefore, this embodiment can determine two GraphSAGE layers. The calculation process of the algorithm is described below with an example.
[0119] This embodiment constructs a GNN4TS model, specifically as follows: Figure 3 As shown, Figure 3 The figure shows a schematic diagram of a GNN4TS model provided in an embodiment of the present invention. Taking a model including two GraphSAGE layers, one Flatten layer, one fully connected layer and one output layer as an example, the input graph structured data is represented by the data sample structure G(V,E), that is, the input is the flow graph shown in the figure.
[0120] Both the first and second layers are examples of GraphSAGE. In the first layer, GraphSAGE extracts features from the graph-structured data of the input traffic data by aggregating the information of adjacent nodes. Specifically, it is obtained by calculating formula (3), which is detailed above. v k In other words, This represents the embedded representation of node v in layer k (i.e., the feature representation of node v in layer k), which is the aggregation result of node v sampled in layer k.
[0121] Therefore, the calculation of each node in the first layer of GraphSAGE is as shown in formula (4), taking 7 nodes as an example:
[0122]
[0123] The computation method for each node in the second-layer GraphSAGE is similar to that of the first-layer GraphSAGE. The difference lies in the weight matrix W and the node feature dimension matrix X, ultimately yielding the features of each node in the second-layer GraphSAGE.
[0124] The third layer, the Flatten layer, flattens the GraphSAGE result from the second layer. Before flattening, feature pooling is performed on the seven nodes to aggregate the node features. In this example, average pooling is used. Therefore, the calculation formula for the Flatten layer is:
[0125]
[0126] The fourth layer, after the output from the Flatten layer, enters a fully connected layer. This example uses 10 nodes in the fully connected layer, but this is not the only applicable setting. The formula for calculating the output value of each node in the fully connected layer is as follows:
[0127]
[0128] The fifth and final layer is the output layer Y. t Taking 7 nodes as an example for the output layer, the final predicted traffic time series result is as follows: T represents the number of days in the forecast month. In this example, we choose January 2024 as the forecast month, so T = 31. (Time series) This represents the predicted traffic volume for the last 7 days. The calculation formulas for the output values of each node in the output layer are as follows: Corresponding predicted values:
[0129]
[0130] Therefore, in this embodiment, the output is The user's dynamic behavioral features are input into the XGBoost model.
[0131] In step 104, based on the traffic prediction time series data for the future time period and the user information feature data, it is predicted whether the user's end-of-month traffic will be delayed.
[0132] In this step, the traffic prediction time series data for the future time period and the user information feature data are input into the Extreme Gradient Boosting Tree (XGBoost) model in the traffic deferral prediction model for prediction to obtain classification prediction results; based on the classification prediction results, it is determined whether the user's end-of-month traffic is deferral.
[0133] In other words, in this embodiment of the invention, the anonymized user information feature data and the traffic prediction time series data for future time periods (this prediction time series data is based on the extracted spatiotemporal feature data, and undergoes data encoding, data discretization, and other processing to adapt to the data structure of the XGBoost model) are input into the XGBoost model for prediction to obtain a classification prediction result (which can also be understood as a classification prediction probability). The obtained classification prediction result is compared with a preset classification threshold. If it is greater than the preset classification threshold, the user's end-of-month traffic can be deferred; otherwise, it cannot be deferred. Typically, the sum of the prediction results for each user equals 1.
[0134] In this embodiment of the invention, daily traffic time-series data and user information feature data are acquired; the daily traffic time-series data is processed into graph structure data; traffic prediction time-series data for future time periods is predicted based on the graph structure data; and based on the traffic prediction time-series data for future time periods and the user information feature data, it is predicted whether the user's end-of-month traffic will be delayed. In other words, this embodiment of the invention performs graph structure processing on the user's daily traffic time-series data, predicts traffic prediction time-series data for future time periods based on the obtained graph structure data, and combines the traffic prediction time-series data with user information feature data to determine whether the user's end-of-month traffic will be delayed. That is, this embodiment of the invention improves the accuracy of traffic delay prediction by making predictions based on the dynamic and static features in the traffic data.
[0135] Furthermore, in this embodiment of the invention, the daily traffic data of the acquired user is parsed to obtain the user's dynamic data (i.e., user dynamic behavior characteristics or spatiotemporal dynamic data) and static characteristics (i.e., user attribute data or user information characteristic data). Then, a trained traffic deferral prediction model (GNN4TS-XGBoost model) is used to process the spatiotemporal dynamic data and the user's static data respectively. This traffic deferral prediction model conforms to the characteristics of telecommunications traffic data and has an accurate prediction result on whether the user's traffic data at the end of the month can be deferral.
[0136] Optionally, in another embodiment, based on the above embodiments, the method may further include:
[0137] A traffic delay prediction model is pre-trained to obtain a trained traffic delay prediction model, which includes: a time series graph neural network GNN4TS model and an extreme gradient boosting tree XGBoost model.
[0138] Optionally, in another embodiment, based on the above embodiments, the pre-training of the traffic delay prediction model to obtain a trained traffic delay prediction model includes:
[0139] Obtain the training sample dataset and the label probability of the training sample dataset. The training sample dataset includes: time series sample data of daily traffic data and user information feature data.
[0140] The daily traffic flow time-series sample data from the training sample dataset is input into the GNN4TS model of the traffic delay prediction model for training. The output of the GNN4TS model and the user information feature data are then input into the XGBoost model of the traffic delay prediction model for training. The output of the XGBoost model is compared with the label probabilities of the input training sample dataset, the difference is calculated, and this difference is used as the loss value. The loss value is minimized using the gradient descent algorithm. Based on the minimized loss value, iterative training is performed using backpropagation, and the hyperparameters of the traffic delay prediction model are adjusted until the loss value meets the set conditions or the traffic delay prediction model converges, resulting in a trained traffic delay prediction model. The specific training process is detailed below. Figure 4 .
[0141] Optionally, in another embodiment, based on the above embodiments, the pre-training of the traffic delay prediction model to obtain the trained traffic delay prediction model may further include: introducing a regularization term of the tree into the gradient descent algorithm in each iteration to control the complexity of the tree when minimizing the loss function.
[0142] Optionally, in another embodiment, based on the above embodiments, the pre-training of the traffic delay prediction model to obtain the trained traffic delay prediction model may further include: when the objective function of each round of iteration optimization is continuously greater than a set threshold, selecting to trigger an automatic optimizer to optimize the hyperparameters of the traffic delay prediction model.
[0143] In this embodiment of the invention, during the training process of the traffic delay prediction model, an automatic optimizer for the hyperparameters of the basic model is set, and the triggering conditions of the optimizer are set with the loss function as the object, which further improves the prediction accuracy while avoiding increasing the complexity of the model.
[0144] Please also see Figure 4 This is a training diagram of a traffic delay prediction model provided in an embodiment of the present invention. The traffic delay prediction model in this embodiment can also be called an ensemble model. Taking the Time Series Graph Neural Network (GNN4TS) model and the Extreme Gradient Boosting Tree (XGBoost) model as an example, it is simply referred to as the GNN4TS-XGBoost model. It is trained on acquired telecommunications traffic data, and its purpose is to train whether user end-of-month traffic can be delayed for the following month. The process includes:
[0145] 1) The GNN4TS model and XGBoost model of the traffic delay prediction model are pre-constructed. This embodiment uses this model as an example. Of course, a similar model can also be used. This embodiment does not impose any restrictions.
[0146] 2) Obtain the training sample dataset (hereinafter referred to as the training set) and the label probabilities of the training sample dataset. The training sample dataset includes: daily traffic data time series sample data (hereinafter referred to as time series data X). t ) and user information feature data (referred to as user features En);
[0147] 3) Perform data preprocessing on the user features in the acquired training sample dataset to obtain preprocessed user features (i.e., attribute features). Data preprocessing, such as discretization encoding, yields E... t The preprocessed user features are then input into the XGBoost model within the traffic delay prediction model.
[0148] 4) Perform graph structuring on the daily traffic data time-series samples in the training dataset to obtain structured graph data. Then, input the graph-structured data into the GNN4TS model within the traffic delay prediction model for training (i.e., input the graph-structured data h...). v (1) h v (2) , ..., h v (k) The input is sequentially fed into the Flatten layer and the fully connected layer for training, resulting in (the desired outcome).
[0149] In this embodiment, the GNN4TS model includes 2 GraphSAGE layers, 1 Flatten layer, 1 fully connected layer and 1 output layer. The graph data structure input to the GNN4TS model is represented by G(V,E).
[0150] The first layer, GraphSAGE, extracts features from the input graph data structure. Specifically, GraphSAGE extracts features by aggregating neighboring node information. The calculation formula is detailed above and will not be repeated here.
[0151] As shown in the figure, hv(1) represents the embedding representation of v nodes in the first layer, and hv(2) represents the embedding representation of v nodes in the second layer. σ represents the embedding representation of node v in layer k, which is the aggregated result of sampling node v in layer k, and σ represents the nonlinear activation function.
[0152] The calculation formulas for each node in the first layer of GraphSAGE are detailed above and will not be repeated here.
[0153] The second layer of GraphSAGE processes the outputs of the nodes in the first layer. The calculation method for each node in the second layer is the same as in the first layer, except for the weight matrix W and the node feature dimension matrix X. The final node features are then obtained as follows:
[0154] The third layer, Flatten, flattens the output received from the second layer, GraphSAGE. Before flattening, it performs feature pooling on the seven nodes, aggregating the node features. In this example, average pooling is used. Therefore, the calculation formula for the Flatten layer, h... i (3) As detailed above, I will not repeat it here.
[0155] After the output from the Flatten layer, it enters a fully connected layer. In this example, the number of nodes in the fully connected layer can be set to 10. The formula for calculating the output value of each node in the fully connected layer is h. i (4) As detailed above, I will not repeat it here.
[0156] Finally, the output layer is entered. The number of nodes in the output layer can be set to 7. The final predicted time series result is as follows: T represents the number of days in the forecast month. In this example, the forecast month is chosen as January 2024, so T = 31. (Time series) This represents the traffic forecast for the last 7 days. The formula for calculating the output values of each node in the output layer is as follows. As shown above, and Each predicted value is used as a dynamic feature as the output training result of the GNN4TS model, and this output training result is input into the XGBoost model.
[0157] The training results output by the GNN4TS model are input into the XGBoost model, and the XGBoost model iteratively trains the received training results from the GNN4TS model and user features to obtain the optimal weight coefficients of the traffic delay prediction model.
[0158] Specifically, the daily traffic flow time-series data is processed into graph structure data and input into the GNN4TS model of the traffic flow delay prediction model (the structure of the GNN4TS model is detailed in the corresponding embodiment above and will not be repeated here) for training. The output of the GNN4TS model and the user information feature data are input into the XGBoost model of the traffic flow delay prediction model for training. The output of the XGBoost model is compared with the label probability of the input training sample dataset, and the difference is calculated. That is, the XGBoost model uses the result of the predicted output layer of the GNN4TS model as the root split point of the gradient boosting tree after specific exponentiation, which strengthens the directionality of the time-series dynamic features in the gradient tree iterative optimization process, and constructs a sub-delay deviation index to calculate the optimal gain in the subtree split in conjunction with the user static information features. The specific implementation process includes:
[0159] The XGBoost model initializes a single classification tree as the base learner based on the monthly traffic deferred user mode. In the first iteration, the deferred skewness index E, representing the root of the dynamic predictions output by the graph neural network, is used to construct subtrees (i.e., tree-1...tree-n). The deferred skewness index is an improvement on the skewness coefficient in the statistical distribution, and its formula is as follows:
[0160]
[0161] Skewness j Let be the prediction delay skewness index for the j-th user sample. Let λ be the i-th output value of the GNN4TS model for the i-th user sample. j Let j be the total monthly data usage of the user sample. T is the standard deviation of the set of monthly data usage data and model output values for this sample, where n is the number of sample output values. mon This represents the number of days in the month in which the sample is located. This measures the degree and direction of deviation between the user's expected monthly data usage and the total data usage of the subscribed monthly plan. The larger the value of the skewness index (positive number), the more right-skewed the predicted data distribution (without delay); the smaller the value (negative number), the more left-skewed the predicted data distribution (with delay); and close to zero, the data distribution is relatively symmetrical.
[0162] Using the deferred deviation index in equation (3) of formula (8) as the candidate gain feature of the subtree, the CART (Classification and Regression Trees) algorithm is used to traverse all user information feature data (i.e., static data) to determine the information gain point to split the subtree. In each iteration, the model parameters are updated with the predicted values of the new decision tree. Then, the negative gradient (residual) of the previous model is calculated as the optimization objective, and the overall loss function is minimized through the gradient descent algorithm. The objective function optimized in each iteration is as follows:
[0163]
[0164] in, Let y be the loss function for the k-th iteration. i For the actual deferred classification of the samples, For the delayed classification of the samples, the loss function is expanded to be the sum of the overall residuals of the model in the first k-1 rounds and the prediction result f of the k-th tree in the current round. k (x i ), Ω(f k ) represents the regularization term for the tree, which limits the complexity of the tree while minimizing the loss function; α is a constant term. In this round, the k-th tree f is constructed. k (x i Minimize the objective function Obj (k) The algorithm automatically updates the next round's prediction value after each iteration, adding the prediction value of the current round (round k) to the prediction value of the previous k-1 rounds. The next round is updated with a fixed learning rate. The learning rate, maximum tree depth, and minimum number of leaf node samples determined by grid search are used as early stopping conditions. During continuous iteration, the model complexity is controlled by a regularization term to reduce redundant calculations.
[0165] In this embodiment, a regularization term Ω(f) is introduced into the gradient optimization algorithm of each iteration of the XGboost model during iterative training. k The model complexity is controlled by regularization, which consists of the L2 norm of the leaf node weights and a penalty term based on the number of leaf nodes.
[0166]
[0167] Where f k This indicates that the current iteration generates the k-th tree, |f k | represents the number of leaf nodes in the tree, γ is the penalty term hyperparameter for the number of leaf nodes (the coefficient for the number of leaf nodes), λ is the hyperparameter for the L2 regularization term (the coefficient for the sum of squares of the leaf node weights), w qThe regularization term is the weight of the leaf node q. The value of the regularization term is positively increasing with the weight and number of leaf nodes of the tree, i.e., the tree complexity. During the execution of the objective function, the regularization term can limit the complexity of the tree while minimizing the loss function to prevent overfitting.
[0168] In this embodiment, during iterative training, standard stochastic gradient descent (SGD) and backpropagation (BP) techniques can be used to learn the parameters of the GNN4TS model. The loss function is defined as MSE, and its expression is as follows:
[0169]
[0170] Where, x i This represents the actual observed flow rate. This represents the output value of the GNN4TS model. If the loss function MSE meets the given conditions, training stops and the optimal training model is saved; otherwise, training continues until the model converges.
[0171] In this embodiment, the traditional XGboost model uses cross-sectional data as input. Because the parallel processing of time-series dynamic data leads to sparsity of static information features, the traffic delay prediction model (i.e., the ensemble model) of this invention uses panel data structures as input. To reduce the feature sparsity and imbalance problems of multi-sample, multi-time-series panel data structures during decision tree training, prior information on user traffic delay stability is generated using the base learner GNN4TS to predict classification error rate. Cluster undersampling is then used to generate a dual XGboost gradient boosting tree. The specific process includes:
[0172] During training, the GNN4TS prediction classification error rate for each sample based on different historical months is output. User samples are divided into a high-fluctuation user group A and a stable user group B, using a 1 / 3 threshold. First, undersampling is performed on the stable user group B based on the proportion of historically deferred months for each user, ensuring that the proportions of minority and majority class samples for each user reach the original sample proportions. Then, the deferred skewness index (Skewness) is calculated for each user sample's monthly GNN4TS prediction results. j After normalization and scaling to the [-1,1] interval, the result is used as the Margin score of the sample, which measures the distance of the sample from the decision boundary using the confidence that the sample is correctly classified.
[0173]
[0174] In this process, near-noise samples with margin scores close to 0 are extracted from each user group and swapped between user groups A and B. This ensures that the sample users and margin score ratios of user groups A and B are essentially the same, and also reduces the overlap of static information from different time series data. Then, XGBoost gradient boosting trees are trained iteratively.
[0175] 5) Furthermore, this embodiment can also judge the output result of the XGboost model, that is, judge whether the automatic optimizer is triggered. If so, the optimizer is automatically triggered (that is, the whale optimization algorithm is used for optimization), and the optimization result is used to determine whether to delay, that is, execute 6); if not, the output result is used to directly determine whether to delay, that is, execute 6).
[0176] 6) Determine whether to defer. If yes, determine that the user's end-of-month traffic can be deferred; otherwise, determine that the user's end-of-month traffic cannot be deferred.
[0177] This embodiment further constructs a selectively triggered automatic optimizer for hyperparameter optimization of the traffic delay prediction model (GNN4TS-XGBoost model). If the objective function of the iterative optimization is Obj... (k) If the value exceeds a set threshold during a certain iteration process and shows no trend of decreasing, the hyperparameter optimization algorithm is triggered. In this embodiment of the invention, the Whale Optimization Algorithm (WOA) is used as the optimizer. The WOA algorithm primarily simulates the bubble-web foraging behavior of humpback whales. Compared to algorithms with relatively simple population update mechanisms, it has three independently solvable population update mechanisms: encirclement and contraction, bubble-web attack, and wandering foraging. This allows for separate operation, control, and balancing of global exploration and local development, resulting in better algorithm performance.
[0178] In other words, in this embodiment, an extreme gradient boosting tree (XGBoost) model is constructed. Specifically, this includes: first, treating each user as a sample, and outputting... As dynamic feature inputs to the sample, anonymized static user information such as gender, age, and whether the user is a VIP is used as f. i (i = 1, 2, 3, ..., 12) ) The static features of the samples are then used as input. Next, cluster undersampling is performed using the user traffic delay stability predictions generated by the GNN4TS prediction classification error rate.
[0179] Then, the prediction results of the last day of each sample prediction period (taking January 2024 as an example) of the previous three historical months (October, November and December 2023) of GNN4TS prediction output are compared with the actual deferred situation of the sample. With 1 / 3 as the threshold, users with 1 or less of the number of correctly predicted months are divided into high volatility user group A, and users with 2 or more of the number of correctly predicted months are divided into stable user group B.
[0180] Within the stable user group B, the statistical sample B j Last month's deferred status Perform cluster undersampling to make Deferred samples and The number of non-deferred samples reached a ratio of 1:1.5 to the original sample. Then, the samples were clustered, and for each user sample B... j The monthly GNN4TS forecast results are used to calculate the deferred skewness index Skewness. j :
[0181]
[0182] in, Let λ be the i-th output value of the GNN4TS model for the j-th user sample. j Let j be the total monthly data usage of the user sample. T is the standard deviation of the total monthly data usage of the sample plan and the set of model output values, where n is the number of sample output values. mon The sample's month number is 31. After normalization and scaling to an interval, it is used as the sample's Margin score. Finally, near-noise samples with a Margin score close to 0 are extracted from each user group and swapped between groups A and B.
[0183] The grouped A and B sample data are fed into the XGBoost model to initially generate two gradient boosting trees. The algorithm initializes the predicted values as the probabilities of the training set labels. and The first-round residual r is the difference between the actual sample value and the predicted value. (1) .
[0184] Taking the construction of the first-round decision tree as an example, the leaf node splitting adopts a greedy algorithm, which selects the feature splitting point with the minimum loss function after splitting by traversing all combinations of features and splitting points. Unlike the traversal algorithm of general XGBoost, the first-round split (root splitting point) of the model in this invention is set to select Skewness. j The deferred skewness index feature is applied to each feature i (including dynamic features) in subsequent splits. Static feature f i Given (i = 1, 2, 3, ..., 12) and each split point s, calculate the gain for splitting the dataset into two subsets:
[0185]
[0186] Among them, I L and I R It is the left and right subsets after the split, g j h is the first gradient of sample j. j Let λ be the second gradient of sample j, λ be the weight of the regularization term, and γ be the weight of the leaf node.
[0187] The weights w of the leaf nodes are updated by minimizing the loss function. q(x) :
[0188]
[0189] Among them, I q(x) Let g be the sample set of the leaf nodes. j h is the first gradient of sample j. j Let λ be the second-order gradient of sample j, and λ be the weight of the regularization term. The hyperparameter is determined to be 0.05 through grid search. Then, the newly generated tree prediction is added to the previous prediction to obtain the latest prediction. The algorithm then uses the residual between this prediction and the true value of the training set label as the optimization objective for the next iteration, and automatically updates the iteration. The iteration stops early when the set maximum tree depth and minimum number of samples in the leaf nodes are met.
[0190] In this embodiment, after the GNN4TS-XGBoost model is constructed, the model is trained. In this example, the samples are divided into two categories: one is the daily traffic data time series sample, and the other is the user feature data. In this example, the daily traffic data of the six months before the prediction month is selected to train the GNN4TS model. Each user feature data corresponds to the number represented by the time series data, as shown in Table 4, which is a sample size table of time series data and user feature data.
[0191] Table 4
[0192]
[0193] This embodiment runs in a Python environment, calling the PyTorch and XGBoost packages. Hyperparameter settings can be configured according to the sample size, deployment hardware conditions, expected training efficiency, error accuracy requirements, etc. Some hyperparameters in this example are shown in Table 5, which is the hyperparameter setting table for the GNN4TS model.
[0194] Table 5
[0195]
[0196] For the XGBoost model, after setting the initial hyperparameter set in this embodiment, the grid search method is first used to find the optimal hyperparameters, and then the whale optimization algorithm automatic optimizer is triggered, as shown in Table 6. Table 6 shows the initial hyperparameter value set and the final hyperparameter value of XGBoost.
[0197] Table 6
[0198]
[0199] 6) Finally, in this embodiment, after the traffic delay prediction model is trained (i.e., the ensemble model), it is also necessary to use the test set to evaluate the trained traffic delay prediction model.
[0200] In other words, after the model is trained, it can be input into the prediction set for prediction. In this example, three metrics, accuracy, precision, and recall, are used to evaluate the prediction performance of the ensemble model. The calculation logic is shown in Table 7 and formulas (16) to (17). The confusion matrix is a visualization of the true value and the model prediction value. For data with n classes of samples, the size of the confusion matrix is n×n. Its horizontal and vertical axes represent the labels predicted by the model and the true labels, respectively. The diagonal line represents the number of correctly predicted classes. The darker the color, the more classes there are and the better the classification performance. The specific details are shown in Table 7, which is the prediction distribution.
[0201] Table 7
[0202]
[0203]
[0204] a. Accuracy
[0205]
[0206] b. Accuracy
[0207]
[0208] c. Recall rate
[0209]
[0210] After inputting the prediction data, a model comparison table as shown in Table 8 is obtained (i.e., a comparison with other models). A comprehensive comparison of the three metrics shows that the GNN4TS-XGBoost model in this embodiment has higher accuracy in predicting whether a user's monthly traffic is delayed. Table 8 is only an example and is not limited to this in practical applications. The prediction results of accuracy, precision, and recall of each model in Package 8 can also be adaptively adjusted based on this, and this embodiment does not impose any limitations.
[0211] Table 8
[0212]
[0213] In summary, the GNN4TS-XGBoost model of this invention can effectively reflect whether user traffic is delayed. By structuring the unidirectional time-series data graph, establishing a network relationship between preceding and following times, and assigning dynamic temporal and spatial characteristics to each time node, the GNN4TS model captures the characteristics of daily traffic changes, resulting in month-end traffic prediction time-series data. Simultaneously, considering the impact of users themselves on traffic usage, the XGBoost model integrates spatiotemporal dynamic features and user attribute features, thereby obtaining the final prediction result. Compared to other single time-series models, single classification models, or homogeneous ensemble models, the data processing method and ensemble model of this invention can weaken the impact of future uncertainties in time-series models on prediction results and consider the spatiotemporal characteristics of traffic data ignored in classification models. Therefore, it can better predict the trend of traffic changes and is more robust and accurate than other solutions.
[0214] This invention analyzes the daily traffic data of users to obtain dynamic data (i.e., user dynamic behavior characteristics or spatiotemporal dynamic data) and static characteristics (i.e., user attribute data or user information characteristic data). Then, a trained traffic deferral prediction model (GNN4TS-XGBoost model) is used to process the spatiotemporal dynamic data and the user's static data respectively. This traffic deferral prediction model conforms to the characteristics of telecommunications traffic data and has an accurate prediction result on whether the user's traffic data at the end of the month can be deferred.
[0215] Furthermore, in the training process of the traffic delay prediction model, this embodiment of the invention also sets up an automatic optimizer for the hyperparameters of the basic model, and sets the triggering conditions of the optimizer with the loss function as the object, which further improves the prediction accuracy while avoiding increasing the complexity of the model.
[0216] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that this disclosure is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the present invention.
[0217] Please also see Figure 5 This is a block diagram of a traffic delay integrated prediction device provided in an embodiment of the present invention. The device includes: an acquisition module 501, a structured processing module 502, a first prediction module 503, and a second prediction module 504, wherein...
[0218] Module 501 is used to acquire daily traffic time series data and user information feature data.
[0219] The structured processing module 502 is used to perform graph structured processing on the daily flow time series data to obtain graph structured data;
[0220] The first prediction module 503 is used to predict traffic forecast time series data for future time periods based on the graph structure data.
[0221] The second prediction module 504 is used to predict whether the user's end-of-month traffic will be delayed based on the traffic prediction time series data for the future time period and the user information feature data.
[0222] Optionally, in another embodiment, based on the above embodiments, the structured processing module 502 includes: a setting module 601, a segmentation module 602, a correlation determination module 603, and a graph structured processing module 604, the block diagram of which is shown below. Figure 6 As shown, where,
[0223] Module 601 is used to set the sliding window segmentation length;
[0224] The segmentation module 602 is used to perform sliding segmentation on the daily flow time series data according to the set sliding window segmentation length;
[0225] The correlation determination module 603 is used to determine the autocorrelation coefficient between the current moment and the previous preset moment of the daily traffic time series data after sliding segmentation by the segmentation module;
[0226] The graph structuring module 604 is used to perform graph structuring on the daily flow time series data after sliding segmentation according to the autocorrelation coefficient to obtain graph structured data.
[0227] Optionally, in another embodiment, based on the above embodiment, the first prediction module 503 includes: an extraction module 701 and a traffic prediction module 702, the structural block diagram of which is shown below. Figure 7 As shown, where,
[0228] Extraction module 701 is used to input the graph structured data into the time series graph neural network GNN4TS model in the trained traffic delay prediction model to extract user dynamic behavior features, wherein the GNN4TS model is a model trained based on the spatial domain graph convolutional neural network GraphSAGE.
[0229] The traffic prediction module 702 is used to predict traffic prediction time series data for future time periods based on the time and space characteristics in the user dynamic behavior characteristics.
[0230] Optionally, in another embodiment, based on the above embodiments, the second prediction module includes:
[0231] The classification prediction module is used to input the traffic prediction time series data for the future time period and the user information feature data into the Extreme Gradient Boosting Tree (XGBoost) model in the traffic deferred prediction model for prediction, and obtain the classification prediction result.
[0232] The determination module is used to determine whether the user's end-of-month traffic is deferred based on the classification prediction results of the classification prediction module.
[0233] Optionally, in another embodiment, based on the above embodiments, the apparatus further includes:
[0234] The training module is used to pre-train the traffic delay prediction model to obtain the trained traffic delay prediction model, which includes: a time series graph neural network GNN4TS model and an extreme gradient boosting tree XGBoost model.
[0235] Optionally, in another embodiment, based on the above embodiments, the training module includes:
[0236] The training set acquisition module is used to acquire the training sample dataset and the label probability of the training sample dataset. The training sample dataset includes: daily traffic data time series sample data and user information feature data.
[0237] The model training module is used to input the daily traffic data time-series sample data from the training sample dataset into the GNN4TS model of the traffic delay prediction model for training, and to input the output of the GNN4TS model and the user information feature data into the XGBoost model of the traffic delay prediction model for training; and to compare the output of the XGBoost model with the label probabilities of the input training sample dataset, calculate the difference, use the difference as the loss value, minimize the loss value using the gradient descent algorithm, and perform iterative training using the backpropagation mechanism based on the minimized loss value, and adjust the hyperparameters of the traffic delay prediction model until the loss value meets the set conditions or the traffic delay prediction model converges, thereby obtaining the trained traffic delay prediction model.
[0238] Optionally, in another embodiment, based on the above embodiment, the module training module is further configured to introduce a regularization term for the tree in the gradient descent algorithm in each iteration, thereby controlling the complexity of the tree when minimizing the loss function.
[0239] Optionally, in another embodiment, based on the above embodiment, the module training module is further configured to select and trigger an automatic optimizer to optimize the hyperparameters of the traffic delay prediction model when the objective function of each round of iteration optimization is continuously greater than a set threshold.
[0240] According to a third aspect of the present invention, an electronic device is provided, comprising:
[0241] processor;
[0242] Memory used to store the processor's executable instructions;
[0243] The processor is configured to execute the instructions to implement the traffic delay integrated prediction method as described above.
[0244] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the flow delay integrated prediction method as described above.
[0245] According to a fifth aspect of the present invention, a computer program product is provided, comprising a computer program or instructions that, when executed by a processor of an electronic device, implement the traffic delay integrated prediction method as described in any one of claims 1 to 7.
[0246] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0247] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0248] Figure 8 This is a block diagram of an electronic device 800 provided in an embodiment of the present invention. For example, the electronic device 800 can be a mobile terminal or a server; in this embodiment, a mobile terminal is used as an example for explanation. For example, the electronic device 800 can be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0249] Reference Figure 8The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0250] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0251] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0252] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.
[0253] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0254] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0255] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0256] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0257] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0258] In an embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the flow delay integrated prediction method described above.
[0259] In this embodiment, a computer-readable storage medium is also provided, which, when executed by a processor of an electronic device, enables the electronic device 800 to perform the traffic delay integrated prediction method described above. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0260] In one embodiment, a computer program product is also provided, including a computer program or instructions that, when executed by a processor 820 of an electronic device 800, cause the electronic device 800 to perform the aforementioned traffic delay integrated prediction method.
[0261] Figure 9 This is a block diagram of an apparatus 900 for traffic delay integration prediction provided in an embodiment of the present invention. For example, apparatus 900 can be provided as a server. See also... Figure 9 The apparatus 900 includes a processing component 922, which further includes one or more processors, and memory resources represented by memory 932 for storing instructions, such as application programs, that can be executed by the processing component 922. The application programs stored in memory 932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 922 is configured to execute instructions to perform the methods described above.
[0262] The device 900 may also include a power supply component 926 configured to perform power management of the device 900, a wired or wireless network interface 950 configured to connect the device 900 to a network, and an input / output (I / O) interface 958. The device 900 can operate on an operating system stored in memory 932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.
[0263] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0264] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A flow delay integrated prediction method, characterized in that, include: Acquire daily user traffic time-series data and user information feature data; The daily flow time series data is processed into graph structure data to obtain graph structure data; Based on the graph structure data, predict future time-series traffic forecast data; Based on the time-series data of traffic prediction for the future time period and the user information feature data, predict whether the user's traffic at the end of the month will be deferred.
2. The flow delay integrated prediction method according to claim 1, characterized in that, The step of performing graph-structured processing on the daily traffic time series data to obtain graph-structured data includes: Set the sliding window split length; The daily flow time series data is slide-segmented according to the set sliding window segmentation length; Determine the autocorrelation coefficient between the current moment and the previous preset moment in the daily traffic flow time series data after sliding segmentation; Based on the autocorrelation coefficient, the daily flow time series data after sliding segmentation is processed into graph structured data.
3. The flow delay integrated prediction method according to claim 1, characterized in that, The time-series data for predicting future traffic flow based on the graph structure data includes: The graph structured data is input into the time series graph neural network GNN4TS model in the trained traffic delay prediction model to extract user dynamic behavior features. The GNN4TS model is a model trained based on the spatial domain graph convolutional neural network GraphSAGE. Based on the temporal and spatial characteristics of the user's dynamic behavior features, predict traffic forecast time series data for future time periods.
4. The flow delay integrated prediction method according to claim 1, characterized in that, The prediction of whether a user's traffic is deferred, based on the traffic prediction time-series data for the future time period and the user information feature data, includes: The traffic prediction time series data for the future time period and the user information feature data are input into the Extreme Gradient Boosting Tree (XGBoost) model in the traffic deferred prediction model for prediction, and the classification prediction results are obtained. Based on the classification and prediction results, it is determined whether the user's end-of-month traffic is deferred.
5. The flow delay integrated prediction method according to any one of claims 1 to 4, characterized in that, The method further includes: pre-training a traffic delay prediction model in the following manner to obtain a trained traffic delay prediction model, wherein the traffic delay prediction model includes: a time series graphical neural network (GNN4TS) model and an extreme gradient boosting tree (XGBoost) model: Obtain the training sample dataset and the label probability of the training sample dataset. The training sample dataset includes: time series sample data of daily traffic data and user information feature data. The daily traffic flow time-series sample data from the training sample dataset is input into the GNN4TS model of the traffic delay prediction model for training. The output of the GNN4TS model and the user information feature data are input into the XGBoost model of the traffic delay prediction model for training. The output of the XGBoost model is compared with the label probability of the input training sample dataset, the difference is calculated, and the difference is used as the loss value. The loss value is minimized by the gradient descent algorithm. Based on the minimized loss value, iterative training is performed using the backpropagation mechanism, and the hyperparameters of the traffic delay prediction model are adjusted until the loss value meets the set conditions or the traffic delay prediction model converges, thus obtaining the trained traffic delay prediction model.
6. The flow delay integrated prediction method according to claim 5, characterized in that, The pre-trained traffic delay prediction model, to obtain the trained traffic delay prediction model, further includes: A regularization term for the tree is introduced into the gradient descent algorithm in each iteration to control the complexity of the tree when minimizing the loss function.
7. The flow delay integrated prediction method according to claim 5, characterized in that, The pre-trained traffic delay prediction model, to obtain the trained traffic delay prediction model, further includes: When the objective function of each iteration optimization is continuously greater than the set threshold, the automatic optimizer is selected to optimize the hyperparameters of the traffic delay prediction model.
8. A flow delay integrated prediction device, characterized in that, include: The acquisition module is used to acquire daily traffic time-series data and user information feature data. The structured processing module is used to perform graph structured processing on the daily flow time series data to obtain graph structured data; The first prediction module is used to predict traffic forecast time series data for future time periods based on the graph structure data; The second prediction module is used to predict whether the user's end-of-month traffic will be delayed based on the traffic prediction time series data for the future time period and the user information feature data.
9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the traffic delay integrated prediction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the flow delay integrated prediction method as described in any one of claims 1 to 7.