A user terminal traffic prediction method, medium and system

By constructing a general traffic prediction base model and a LoRa fine-tuning model, and combining a mathematical prediction module and a convolutional neural network, the shortcomings of existing technologies in overall prediction accuracy and personalized services are solved, and high-precision traffic prediction is achieved under large-scale user terminal data.

CN120692558BActive Publication Date: 2026-07-31QINGDAO NETKE ZHIXIN ARTIFICIAL INTELLIGENCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QINGDAO NETKE ZHIXIN ARTIFICIAL INTELLIGENCE CO LTD
Filing Date
2025-06-18
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing traffic prediction technologies struggle to simultaneously meet the demands for overall prediction accuracy and personalized services, especially in environments with large-scale user terminal data. They are unable to effectively mine and utilize massive amounts of user data and lack personalized prediction methods for specific user groups.

Method used

A general traffic prediction model is constructed, which combines a mathematical prediction module and a convolutional neural network. By performing cluster analysis on user terminals, a LoRa fine-tuning model is used to perform personalized optimization for different user groups, and large-scale historical data is used for prediction.

Benefits of technology

It improves overall forecast accuracy and personalized service levels, better meets the needs of different user groups, makes full use of information from large-scale data, and provides high-precision traffic forecasting services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120692558B_ABST
    Figure CN120692558B_ABST
Patent Text Reader

Abstract

This invention provides a method, medium, and system for predicting user terminal traffic, belonging to the field of traffic prediction model fine-tuning technology. The method includes: first, constructing a general traffic prediction basic model containing a mathematical prediction module and a convolutional neural network; then, acquiring historical traffic data from multiple user terminals, preprocessing it, and generating traffic time-series vectors; performing cluster analysis on these vectors to divide users into multiple clusters; using the cluster with the largest cluster size as the basis, calculating the cluster similarity between it and other clusters; next, setting a LORA fine-tuning model for each cluster, with lower similarity clusters having larger parameter sizes in the fine-tuned model; and finally, fine-tuning the corresponding LORA model for each cluster based on the trained general basic model. For the user terminal to be predicted, its cluster is determined according to its traffic time-series vector, and the corresponding LORA fine-tuning model is used for prediction, which is beneficial for achieving personalized prediction for user groups.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of traffic prediction model fine-tuning technology, and specifically relates to a user terminal traffic prediction method, medium and system. Background Technology

[0002] The rapid development of network communication technology has provided users with richer digital services, such as video, music, and social networking. These applications are increasingly demanding network bandwidth, posing a significant challenge to network service providers. Effective network resource allocation and user experience optimization require accurate prediction of user terminal traffic trends. However, existing traffic prediction technologies have some limitations.

[0003] On the one hand, existing traffic prediction methods are typically based on statistical models, such as time series analysis and neural networks. These methods can capture the traffic variation patterns of the overall user group quite well, but they are difficult to accurately predict personalized user needs. Different user groups exhibit significant differences in traffic characteristics due to variations in usage scenarios, device types, network environments, and other factors. A single prediction model can hardly simultaneously take into account the personalized needs of all users.

[0004] On the other hand, most existing traffic prediction methods are based on modeling and prediction using a small number of samples, making it difficult to fully utilize the rich information contained in massive user data. With the rise of new technologies such as 5G and the Internet of Things, the number of user terminals accessing the network is increasing daily, and traffic data is showing a significant large-scale characteristic. How to effectively mine and utilize this large-scale data is the key to improving prediction accuracy.

[0005] Furthermore, most current traffic prediction technologies focus on predicting overall traffic trends, with few personalized prediction methods for specific user groups. Network service providers not only need to understand overall network traffic changes but also the characteristics of different user groups in order to develop more accurate network optimization strategies.

[0006] Therefore, in order to address the above problems, it is urgent to study a new method for predicting user terminal traffic. This method can simultaneously improve the overall prediction accuracy and the level of personalized service, and make full use of the information in large-scale user terminal data. Summary of the Invention

[0007] In view of this, the present invention provides a user terminal traffic prediction method, medium and system, which can solve the problem that there are few personalized prediction methods for specific user groups in the prior art.

[0008] The present invention is implemented as follows: A first aspect of the present invention provides a user terminal traffic prediction method, comprising: constructing a general traffic prediction basic model; acquiring historical traffic data of multiple user terminals over a continuous period; preprocessing the historical traffic data; generating a traffic time-series vector for each user terminal; performing cluster analysis on the traffic time-series vectors; dividing the multiple user terminals into multiple clusters; using the cluster with the most user terminals as the base cluster; calculating the cluster similarity between other clusters and the base cluster; setting a corresponding LoRa fine-tuning model for each cluster, wherein the parameter size of the LoRa fine-tuning model is inversely proportional to the cluster similarity; training the general traffic prediction basic model using the traffic time-series vectors of all user terminals; fine-tuning a corresponding LoRa fine-tuning model for each cluster; acquiring historical traffic data of the user terminal to be predicted to generate a target terminal vector; determining the cluster of the target user terminal and its corresponding LoRa fine-tuning model; and predicting the future traffic data of the target user terminal by superimposing the general traffic prediction basic model and the corresponding LoRa fine-tuning model on the target terminal vector.

[0009] The general traffic prediction basic model includes a mathematical prediction module and a convolutional neural network. The mathematical prediction module is a set of mathematical equations, including time series decomposition equations, trend prediction equations, periodic prediction equations, and stochastic prediction equations.

[0010] The time series decomposition equation is used to decompose the original traffic data into trend, periodic and random components. The trend prediction equation is used to predict the long-term trend of traffic data. The periodic prediction equation is used to predict the periodic changes of traffic data. The random prediction equation is used to predict the random fluctuations of traffic data.

[0011] The convolutional neural network uses ResNet as its backbone and is a deep convolutional network containing multiple residual blocks. The input of the convolutional neural network is preprocessed historical traffic data, and the output is a traffic feature vector, which is used to extract high-dimensional features of the traffic data.

[0012] The historical traffic data includes timestamps, uplink traffic, downlink traffic, network type, device type, geographical location, application type, user ID, and network quality indicators.

[0013] The historical traffic data is preprocessed, including noise removal, missing value filling, and outlier detection. Based on the preprocessed historical traffic data, a traffic time-series vector is generated for each user terminal.

[0014] The "continuous period of time" refers to a period of more than one month, and the "multiple user terminals" refers to more than 10,000 user terminals.

[0015] The process of acquiring historical traffic data of the user terminal to be predicted involves collecting traffic data of the user terminal to be predicted in the past 24 hours through network devices and sampling at 5-minute intervals. The future traffic data is represented by a vector, and the traffic data is predicted every 5 minutes in the next 24 hours to form a vector containing 288 elements.

[0016] The parameter size of the LoRa fine-tuning model is inversely proportional to the cluster similarity, and the parameter size ranges from 10,000 to 1,000,000 trainable parameters. The parameter size of the general traffic prediction base model is 10,000,000 trainable parameters.

[0017] The trainable parameters refer to the parameters that need to be updated through the backpropagation algorithm during model training, and the parameter size refers to the total number of all trainable parameters in the model, including the weight matrix, bias vector, and other learnable parameters.

[0018] Specifically, the method of the present invention includes the following steps:

[0019] S10. Construct a general traffic prediction basic model, which includes a mathematical prediction module and a convolutional neural network.

[0020] S20. Obtain historical traffic data of multiple user terminals over a continuous period of time;

[0021] S30. Preprocess the historical traffic data, including noise removal, missing value filling and outlier detection; generate a traffic time-series vector for each user terminal based on the preprocessed historical traffic data;

[0022] S40. Perform cluster analysis on the traffic time-series vector to divide the multiple user terminals into multiple clusters;

[0023] S50. Using the cluster with the largest number of user terminals as the basic cluster, calculate the similarity between the cluster centers of other clusters and the cluster centers of the basic cluster, and record it as the cluster similarity.

[0024] S60. Set a corresponding Lora fine-tuning model for each cluster. The parameter size of the Lora fine-tuning model is inversely proportional to the cluster similarity. The lower the similarity, the larger the parameter size.

[0025] S70. Use the traffic time-series vectors of all user terminals as training data to train the general traffic prediction basic model; for each cluster, use the traffic time-series vectors of all user terminals in the cluster as fine-tuning training data, and fine-tune the general traffic prediction basic model to form the corresponding LoRa fine-tuning model.

[0026] S80. Obtain historical traffic data of the user terminal to be predicted to generate a traffic time series vector, denoted as the terminal vector to be predicted. Based on the terminal vector to be predicted and the cluster centers of the multiple clusters, determine the cluster of the user terminal to be predicted and determine the corresponding LoRa fine-tuning model.

[0027] S90. Based on the target terminal vector, the general traffic prediction basic model and the corresponding LoRa fine-tuning model are superimposed to predict the future traffic data of the target user terminal.

[0028] Based on the above technical solution, the user terminal traffic prediction method of the present invention can be further improved as follows:

[0029] The mathematical prediction module is a set of mathematical equations, including time series decomposition equations, trend prediction equations, periodic prediction equations, and stochastic prediction equations.

[0030] Furthermore, the time series decomposition equation is used to decompose the original flow data into trend, periodic, and random components. The input is the original flow time series, and the output is the three decomposed components, namely the trend, periodic, and random components; specifically, it is expressed as follows:

[0031] F t =T t +S t +R t ;

[0032] In the formula, F t The original flow time series; T t For trend components; S t It is a periodic component; R t t represents the random component; t is the time index.

[0033] Parameter acquisition method:

[0034] F t Data was collected directly from network devices.

[0035] T t S t R t It is obtained through the STL (Seasonal and Trend decomposition using Loess) decomposition algorithm, and the specific steps are as follows:

[0036] Step 1: Estimate the trend component T using the Loess smoothing method t ;

[0037] Step 2: Remove the trend component from the original sequence to obtain the detrended sequence F. t -T t ;

[0038] Step 3: Perform seasonal decomposition on the detrended series to obtain the periodic component S. t ;

[0039] Step 4: Subtract the trend component and periodic component from the original sequence to obtain the random component R. t .

[0040] The trend prediction equation is used to predict the long-term trend of traffic data. The input is the decomposed trend component, and the output is the trend prediction value for a future period of time; specifically, it is expressed as follows:

[0041]

[0042] In the formula, T t+h φ is the trend forecast value forward by h steps; t is the time index; α is the constant term; β, γ, and δ are trend coefficients; i ε is the autoregressive coefficient; p is the autoregressive order, ranging from 1 to 10; t The error term follows a mean of 0 and a variance of σ. 2 It follows a normal distribution.

[0043] Parameter acquisition method:

[0044] α, β, γ, δ, φ i The result is obtained through estimation using the least squares method. The specific steps are as follows:

[0045] Step 1: Construct the design matrix X, which includes t, t 2 ln(t) and the lagged term T t-i ;

[0046] Step 2: Construct the target vector Y, which contains T t ;

[0047] Step 3: Use the formula Calculate the parameter estimates, where It is a vector containing all parameters.

[0048] The periodic prediction equation is used to predict the periodic changes in flow data. The input is the decomposed periodic component, and the output is the predicted periodic value for a future period of time; specifically, it is expressed as follows:

[0049]

[0050] In the formula, S t+h Let A be the periodic prediction value forward h steps; K is the order of the Fourier series, ranging from 1 to 5; Ak and B k ψ is the Fourier coefficient; f is the fundamental frequency; ψ j η is the autoregressive coefficient; q is the autoregressive order, ranging from 1 to 10; t The error term follows a pattern with a mean of 0 and a variance of τ. 2 It follows a normal distribution.

[0051] Parameter acquisition method:

[0052] A k B k ψ j The result is obtained through estimation using the least squares method. The specific steps are as follows:

[0053] Step 1: Construct the design matrix X, which includes cos(2πkft), sin(2πkft), and lag term S. t-j ;

[0054] Step 2: Construct the target vector Y, which contains S t ;

[0055] Step 3: Use the formula Calculate the parameter estimates, where It is a vector containing all parameters.

[0056] The stochastic prediction equation is used to predict random fluctuations in traffic data. The input is the decomposed random component, and the output is the predicted random value for a future period of time; specifically, it is expressed as follows:

[0057]

[0058] In the formula, R t+h ρ is the predicted random value forward h steps; i θ is the autoregressive coefficient; r is the autoregressive order, ranging from 1 to 5; j ξ is the moving average coefficient; s is the moving average order, ranging from 1 to 5; t It is white noise with a mean of 0 and a variance of ω. 2 It follows a normal distribution.

[0059] Parameter acquisition method:

[0060] ρ i and θ j The maximum likelihood estimation method is used. The specific steps are as follows:

[0061] Step 1: Construct the likelihood function L(ρ,θ|{R t}), where {R t} represents the observed random component sequence;

[0062] Step 2: Take the logarithm of the likelihood function to obtain the log-likelihood function.

[0063] Step 3: Maximize the log-likelihood function using numerical optimization methods (such as the Newton-Raphson method) to obtain parameter estimates. and

[0064] Furthermore, the convolutional neural network uses ResNet as its backbone, and its specific structure is a deep convolutional network containing multiple residual blocks. The input of the convolutional neural network is preprocessed historical traffic data; the output is a traffic feature vector; and it is used to extract high-dimensional features from the traffic data.

[0065] Furthermore, the historical traffic data includes timestamps, uplink traffic, downlink traffic, network type, device type, geographical location, application type, user ID, and network quality indicators.

[0066] Furthermore, the continuous period of time refers to a period of more than one month, and the multiple user terminals refer to more than 10,000 user terminals; the acquisition of historical traffic data of the user terminals to be predicted specifically involves collecting traffic data of the user terminals to be predicted from the past 24 hours through network devices, and sampling at 5-minute intervals; the future traffic data is represented by a vector, specifically by predicting the traffic data every 5 minutes in the next 24 hours, forming a vector containing 288 elements, each element representing the predicted traffic value at the corresponding time point.

[0067] Furthermore, the parameter size of the LoRa fine-tuning model is inversely proportional to the cluster similarity; the lower the similarity, the larger the parameter size. Specifically, the parameter size ranges from 10,000 to 1,000,000 trainable parameters. The parameter size of the general traffic prediction base model is specifically 10,000,000 trainable parameters.

[0068] Furthermore, the trainable parameters specifically refer to the parameters that need to be updated through the backpropagation algorithm during model training; they mainly include the following categories:

[0069] 1. Convolutional kernel weights and biases of convolutional layers:

[0070] Convolution kernel weights:

[0071] Bias:

[0072] Where k is the kernel size, c in c is the number of input channels. out This represents the number of output channels.

[0073] 2. Weight matrix and bias vector of fully connected layer:

[0074] Weight matrix:

[0075] Bias vector:

[0076] Where m is the input feature dimension and n is the output feature dimension.

[0077] 3. Scaling and translation parameters of the batch normalization layer:

[0078] Scaling parameters:

[0079] Translation parameters:

[0080] Where c is the number of feature channels.

[0081] 4. Low-rank matrix parameters in the LoRa fine-tuning model:

[0082] Left matrix:

[0083] Right matrix:

[0084] Where, d in For the input dimension, d out Let r be the output dimension and r be the rank.

[0085] 5. Equation coefficients in the mathematical prediction module:

[0086] Such as α, β, γ, δ, φ in the trend prediction equation i wait;

[0087] A in the periodic prediction equation k B k ψ j wait;

[0088] ρ in the stochastic prediction equation i θ j wait.

[0089] These parameters are continuously updated during model training based on the gradient information of the loss function to minimize prediction error and improve the model's generalization ability. The size of the parameters directly affects the model's complexity and expressive power, as well as its training time and required computational resources.

[0090] The parameter size refers to the total number of all trainable parameters in the model, including the weight matrix, bias vector, and other learnable parameters.

[0091] Furthermore, for the general traffic prediction base model and the LoRa fine-tuning model, different parameter scales can be achieved by adjusting the network structure. Specifically:

[0092] 1. Basic model for general traffic forecasting:

[0093] The general traffic prediction base model has 10,000,000 trainable parameters and can be implemented using the following structure:

[0094] LayerStructure =

[0095] [InputLayer,Conv1D1,Conv1D2,...,Conv1D n [DenseLayers]

[0096] The specific structure is as follows:

[0097] Input layer: InputShape = (SequenceLength, Features);

[0098] Convolutional layers: n one-dimensional convolutional layers, with the following parameters for each layer:

[0099] Conv1D i :Filters i KernelSize i ,Activation i ;

[0100] Fully connected layers: m fully connected layers, each with the following parameters:

[0101] DenseLayer j :Units j ,Activation j ;

[0102] Parameter calculation formula:

[0103]

[0104] Among them, KernelSize i The size of the i-th convolutional kernel, Features, and Filters are the number of input features. i The number of filters in the i-th convolutional layer, Input j Let j be the input dimension of the j-th fully connected layer, and Units be... j Let be the number of neurons in the j-th fully connected layer.

[0105] 2. LoRa fine-tuning model:

[0106] Lora fine-tuning models have a parameter size ranging from 10,000 to 1,000,000 trainable parameters, and can be implemented using the following structure:

[0107] LoraStructure =

[0108] [LowRankMatrix1,LowRankMatrix2,...,LowRankMatrix k ];

[0109] The parameters of each low-rank matrix are as follows:

[0110] LowRankMatrix i :InputDim i OutputDim i ,Rank i ;

[0111] Parameter calculation formula:

[0112]

[0113] Among them, InputDim i Let OutputDim be the input dimension of the i-th low-rank matrix. i Let Rank be the output dimension of the i-th low-rank matrix. i Let be the rank of the i-th low-rank matrix.

[0114] To achieve an inverse relationship between parameter size and cluster similarity, the number of low-rank matrices k and the rank Rank can be adjusted based on the cluster similarity. i :

[0115]

[0116] In the formula, C1 and C2 are constants used to control k and Rank. i Scope; This represents the floor function.

[0117] By adjusting C1 and C2, the parameter size of the LoRa fine-tuning model can be ensured to be within the range of 10,000 to 1,000,000, and is inversely proportional to the cluster similarity. When the similarity is low, k and Rank... i Larger values ​​increase the parameter size; when similarity is high, k and Rank... i Smaller, thus reducing parameter size.

[0118] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions that, when executed in a computer, are used to perform the above-described user terminal traffic prediction method.

[0119] A third aspect of the present invention provides a user terminal traffic prediction system, wherein the system includes the computer-readable storage medium described above.

[0120] Compared with existing technologies, the user terminal traffic prediction method, medium and system provided by the present invention fully leverages the advantages of large-scale historical data by constructing a general traffic prediction basic model and a targeted LoRa fine-tuning model, while also meeting personalized prediction needs. This improves the overall prediction accuracy and better serves specific user groups.

[0121] First, the general traffic forecasting model integrates the advantages of mathematical modeling and deep learning. The mathematical forecasting module can comprehensively model the development trend of traffic time series, including multiple aspects such as trend, periodicity, and randomness. This decompositional modeling approach is conducive to better capturing the inherent patterns of traffic sequences. Simultaneously, the convolutional neural network module can effectively extract high-dimensional features from traffic data, providing richer and more valuable feature representations for subsequent forecasts. Through the collaborative work of both, the overall patterns inherent in large-scale traffic data can be fully explored.

[0122] Secondly, to address the personalized needs of different user groups, this invention employs a LoRa-based fine-tuning mechanism. By performing cluster analysis on user terminals, they are divided into multiple clusters with similar characteristics. For each cluster, a corresponding LoRa fine-tuning model is designed. The parameter size of the LoRa fine-tuning model is proportional to the feature differences within its cluster, enabling the model to be specifically optimized for the characteristics of different user groups. This personalized fine-tuning mechanism can effectively improve the prediction accuracy for specific user groups.

[0123] Compared with existing technologies, the present invention has the following advantages:

[0124] 1. Improved overall prediction accuracy: By integrating mathematical modeling and deep learning, the development patterns of traffic time series can be captured more comprehensively, thus improving overall prediction performance.

[0125] 2. Enhanced Personalized Service Level: Based on user clustering and LoRa fine-tuning mechanism, personalized optimization can be performed for the characteristics of different user groups to meet differentiated prediction needs.

[0126] 3. Make full use of large-scale data: This solution can effectively mine and utilize large-scale historical data from more than 10,000 user terminals, giving full play to the advantages of data-driven approach.

[0127] In summary, the user terminal traffic prediction method proposed in this invention can provide high-precision prediction services for personalized needs while ensuring overall prediction performance. It solves the problem that there are few personalized prediction methods for specific user groups in the existing technology, and provides valuable technical support for network optimization and user experience improvement. Attached Figure Description

[0128] Figure 1 A flowchart of the method provided by the present invention;

[0129] Figure 2 A bar chart showing the prediction results for user terminals in different clusters;

[0130] Figure 3 A comparison chart of actual and predicted traffic for a user terminal over 24 hours;

[0131] Figure 4 The plot shows the average prediction error for 20 clusters. Detailed Implementation

[0132] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0133] like Figure 1 The diagram shown is a flowchart of a user terminal traffic prediction method provided by the first aspect of the present invention. This method includes the following steps:

[0134] S10. Construct a general traffic prediction basic model, which includes a mathematical prediction module and a convolutional neural network.

[0135] S20. Obtain historical traffic data of multiple user terminals over a continuous period of time;

[0136] S30. Preprocess the historical traffic data, including noise removal, missing value filling, and outlier detection; based on the preprocessed historical traffic data, generate a traffic time-series vector for each user terminal.

[0137] S40. Perform cluster analysis on the traffic time-series vector to divide multiple user terminals into multiple clusters;

[0138] S50. Using the cluster with the largest number of user terminals as the basic cluster, calculate the similarity between the cluster centers of other clusters and the cluster centers of the basic cluster, and record it as the cluster similarity.

[0139] S60. Set a corresponding Lora fine-tuning model for each cluster. The parameter size of the Lora fine-tuning model is inversely proportional to the cluster similarity. The lower the similarity, the larger the parameter size.

[0140] S70. Use the traffic time-series vectors of all user terminals as training data to train the general traffic prediction basic model; for each cluster, use the traffic time-series vectors of all user terminals in the cluster as fine-tuning training data, and fine-tune the general traffic prediction basic model to form the corresponding LoRa fine-tuning model.

[0141] S80. Obtain historical traffic data of the user terminal to be predicted to generate a traffic time series vector, denoted as the terminal vector to be predicted. Based on the terminal vector to be predicted and the cluster centers of multiple clusters, determine the cluster of the user terminal to be predicted and determine the corresponding LoRa fine-tuning model.

[0142] S90. Based on the vector of the terminal to be tested, the general traffic prediction basic model and the corresponding LoRa fine-tuning model are superimposed to make predictions and obtain the future traffic data of the user terminal to be tested.

[0143] The specific implementation methods of the above steps are described in detail below:

[0144] Step S10: Construct a general traffic prediction base model

[0145] The general traffic flow forecasting model consists of two parts: a mathematical prediction module and a convolutional neural network module. The mathematical prediction module contains four equations, used for time series decomposition, trend prediction, periodic prediction, and stochastic prediction, respectively. These four equations together form a set of mathematical equations, which can model and predict the original traffic flow time series from multiple perspectives.

[0146] The purpose of time series decomposition equations is to break down raw traffic data into three components: trend, periodic, and random. This decomposition facilitates the modeling and prediction of each of these three components separately. The specific form of the equation is as follows:

[0147] F t =T t +S t +R t ;

[0148] Among them, F t For the original flow time series, T t As a trend component, S t As a periodic component, R t Let F be a random component and t be a time index. By applying the STL decomposition algorithm, we can obtain the random component from F. t T is estimated t St and R t .

[0149] The trend prediction equation is used to predict the long-term trend of flow data. This equation employs a combination of quadratic polynomials and logarithmic functions, and introduces an autoregressive term to capture the autocorrelation of the series. The specific form of the equation is:

[0150]

[0151] Among them, T t+h Here, t represents the trend forecast value forward by h steps, α, β, γ, δ, and φ are the time indexes. i Let be the coefficients to be estimated, p be the autoregression order, and ε be the coefficients to be estimated. t These are random error terms. These parameters can be estimated using the least squares method.

[0152] The periodic prediction equation is used to predict the periodic changes in flow data. This equation uses a Fourier series form and also incorporates an autoregressive term. The specific form of the equation is:

[0153]

[0154] Among them, S t+h Let A be the periodic prediction value forward h steps, K be the order of the Fourier series, and A be the value of the prediction value forward h steps. k and B k Let f be the Fourier coefficients to be estimated, f be the fundamental frequency, and ψ be the Fourier coefficients to be estimated. j η is the autoregressive coefficient, q is the autoregressive order, and η is the autoregressive coefficient. t This represents the random error term. These parameters can also be estimated using the least squares method.

[0155] The purpose of the stochastic prediction equation is to predict the random fluctuations in flow data. This equation employs an autoregressive moving average (ARMA) form. The specific form of the equation is:

[0156]

[0157] Among them, R t+h Let ρ be the random prediction value h steps forward. i Here, r is the autoregressive coefficient, r is the autoregressive order, and θ is the autoregressive coefficient. j ξ is the moving average coefficient, s is the moving average order, and ξ is the moving average coefficient. t It is white noise. These parameters can be obtained using the maximum likelihood estimation method.

[0158] The convolutional neural network module uses ResNet as its backbone network structure, specifically a deep convolutional network composed of multiple residual blocks. The input to this module is preprocessed historical traffic data, and the output is a traffic feature vector. The convolutional neural network can effectively extract high-dimensional features from the traffic data, providing valuable feature representations for subsequent model predictions.

[0159] Through the collaborative work of the mathematical prediction module and the convolutional neural network module, the general traffic forecasting foundation model can comprehensively model and predict the development trend of traffic time series. It is important to note that the parameter values ​​involved in these equations typically need to be estimated and adjusted based on actual data to ensure the model's predictive performance.

[0160] Step S20: Obtain historical traffic data from multiple user terminals

[0161] The purpose of this step is to collect historical traffic data from a large number of user terminals as the basis for model training. Specifically, it requires acquiring traffic data from more than 10,000 user terminals over a continuous period of more than one month. Each traffic data record should include the following information: timestamp, uplink traffic, downlink traffic, network type, device type, geographical location, application type, user ID, and some network quality indicators. This information can be obtained through monitoring and logging of network devices.

[0162] Obtaining large-scale and continuous historical traffic data is crucial for subsequent data modeling and prediction. Data spanning long periods can better reflect the overall characteristics of traffic time series, while data from a large number of user terminals helps to capture the overall characteristics of the user group. This data will serve as the basis for training a general traffic prediction base model and a LoRa fine-tuning model.

[0163] Step S30: Preprocess historical traffic data

[0164] Before training the model, the collected historical traffic data needs to be preprocessed. This mainly includes the following steps:

[0165] 1. Denoising: Identifying and filtering out abnormal noise in the data to ensure data quality and reliability. Common denoising methods such as moving average filters and median filters can be used.

[0166] 2. Imputing Missing Values: Missing values ​​in the dataset need to be imputed appropriately. Methods such as interpolation and regression prediction can be used to extrapolate from surrounding observations.

[0167] 3. Outlier Detection: Identifying and removing outliers from the dataset. This can be achieved using statistical distribution-based methods (such as Z-score, IQR, etc.) or machine learning-based outlier detection algorithms.

[0168] 4. Generate Traffic Time-Series Vectors: Based on the preprocessed historical traffic data, generate a traffic vector representation containing time-series information for each user terminal. The purpose of this step is to transform the raw traffic data into a format suitable for subsequent modeling and prediction.

[0169] The above preprocessing steps ensure the quality and integrity of historical traffic data, laying a solid foundation for subsequent model training and prediction.

[0170] Step S40: Perform cluster analysis on the traffic time series vector

[0171] After acquiring and preprocessing historical traffic data, cluster analysis needs to be performed on these traffic time-series vectors. The purpose of clustering is to divide more than 10,000 user terminals into multiple clusters, with each cluster containing user terminals with similar traffic characteristics.

[0172] Cluster analysis can employ common algorithms such as K-Means, DBSCAN, and hierarchical clustering. The specific clustering steps are as follows:

[0173] 1. Determine the clustering algorithm and hyperparameters: Select a suitable clustering algorithm and adjust the hyperparameters of the algorithm, such as the number of clusters K and the neighborhood radius, through methods such as cross-validation.

[0174] 2. Clustering based on traffic time-series vectors: Input the traffic time-series vectors of all user terminals into the clustering algorithm to obtain multiple clusters.

[0175] 3. Evaluate clustering results: The quality of clustering can be evaluated using metrics such as silhouette coefficient and Davies-Bouldin index, and clustering parameters can be adjusted accordingly.

[0176] Cluster analysis reveals different traffic patterns and characteristics within user groups. This lays the foundation for subsequent LoRa fine-tuning of the model, enabling it to perform personalized traffic predictions for user groups with different characteristics.

[0177] Step S50: Calculate the similarity of clusters.

[0178] After completing the cluster analysis, it is necessary to calculate the similarity between each cluster and the base cluster (the cluster containing the most user terminals). This similarity metric will serve as the basis for fine-tuning the LoRa model parameter scale.

[0179] The specific method for calculating cluster similarity is as follows:

[0180] 1. Determine the basic cluster: Select the cluster containing the largest number of user terminals as the basic cluster.

[0181] 2. Calculate cluster centers: For each cluster, calculate its cluster center vector, which is the average of the time-series vectors of all member flows.

[0182] 3. Calculate similarity: For clusters other than the base cluster, calculate the cosine similarity between their cluster center vectors and the cluster center vectors of the base cluster. This similarity is denoted as the cluster similarity.

[0183] Calculating cluster similarity quantifies the degree of similarity between different clusters. This metric will play a crucial role in the subsequent construction of the LoRa fine-tuning model. Lower cluster similarity indicates a greater difference between the cluster and the underlying clusters, requiring more model parameters to capture its features.

[0184] Step S60: Set up the LoRa fine-tuning model

[0185] Based on the aforementioned cluster analysis and cluster similarity calculation, this step requires setting a corresponding Lora fine-tuning model for each cluster. The parameter size of the Lora fine-tuning model will be inversely proportional to the cluster similarity.

[0186] Specifically, the LoRa fine-tuning model uses low-rank matrix factorization to adjust the parameter size. Each LoRa fine-tuning model contains multiple low-rank matrix layers, where:

[0187] LowRankMatrix i :InputDim i OutputDim i ,Rank i ;

[0188] Among them, InputDim i and OutputDim i Let rank represent the input and output dimensions of the i-th low-rank matrix, respectively. i Let represent the rank of the i-th low-rank matrix.

[0189] To achieve the goal of parameter size being inversely proportional to cluster similarity, the number of low-rank matrices k and the rank Rank can be adjusted according to the cluster similarity. i :

[0190]

[0191] C1 and C2 are constants used to control k and Rank. iThe range of values ​​for k and Rank is determined in this way. This ensures that the parameter size of the LoRa fine-tuning model is between 10,000 and 1,000,000 trainable parameters, and is inversely proportional to cluster similarity. When cluster similarity is low, k and Rank... i Larger values ​​increase the parameter size; conversely, when cluster similarity is high, k and Rank are smaller. i Smaller, thus reducing parameter size.

[0192] This LoRa fine-tuning model setting based on cluster similarity ensures that the model can make personalized traffic predictions for user groups with different characteristics, thereby improving the overall prediction accuracy.

[0193] Step S70: Train the general traffic prediction base model and the LoRa fine-tuning model

[0194] After completing the aforementioned steps, the next step is to train the model. This involves two steps:

[0195] 1. Train a general traffic prediction base model

[0196] The traffic time-series vectors of all user terminals are used as training data.

[0197] Train a general traffic prediction base model, including a mathematical prediction module and a convolutional neural network module. The general traffic prediction base model has 10,000,000 trainable parameters.

[0198] 2. Training the LoRa fine-tuning model

[0199] For each cluster, the traffic time-series vectors of all user terminals in that cluster are used as the fine-tuning training data.

[0200] Based on the trained general traffic prediction model, LoRa fine-tuning is performed on each cluster.

[0201] The Lora fine-tuning model has a parameter size ranging from 10,000 to 1,000,000 trainable parameters, and its parameters are inversely proportional to the cluster similarity.

[0202] Through the two training steps described above, a general traffic prediction base model and a LoRa fine-tuning model tailored to different user groups can be obtained. The general traffic prediction base model can capture overall traffic prediction patterns, while the LoRa fine-tuning model can provide personalized predictions based on the characteristics of specific user groups. This model structure can fully utilize the advantages of large-scale data while also taking into account personalized needs, thereby improving overall prediction performance.

[0203] Step S80: Determine the cluster of user terminals to be predicted and the LoRa fine-tuning model.

[0204] When predicting future traffic for a specific user terminal, it is necessary to first determine the cluster to which the user terminal belongs and then determine the corresponding LoRa fine-tuning model. The specific steps are as follows:

[0205] 1. Obtain historical traffic data of the user terminal to be predicted: Collect traffic data of the user terminal to be predicted in the past 24 hours through network devices, and sample at a time point of 5 minutes to form a traffic time series vector.

[0206] 2. Determine clusters based on traffic time-series vectors: Compare the traffic time-series vectors of the user terminals to be predicted with the cluster centers of the aforementioned clusters to find the most similar clusters. Cosine similarity or other indices can be used for this determination.

[0207] 3. Select the corresponding Lora fine-tuning model: After determining the cluster to which the user terminal to be predicted belongs, you can select the corresponding Lora fine-tuning model for prediction.

[0208] This step allows us to determine the user group to which the user terminal belongs based on its actual traffic characteristics, and then select a LoRa fine-tuned model trained specifically for that group for prediction. This ensures that the prediction results are closer to the actual situation of the user terminal.

[0209] Step S90: Perform flow prediction

[0210] The final step is to predict the future traffic of the user terminals under test using the general traffic prediction base model and the corresponding LoRa fine-tuning model. The specific steps are as follows:

[0211] 1. Input the time-series vector of the user terminal traffic to be predicted into the general traffic prediction base model and the Lora fine-tuning model.

[0212] 2. The general traffic forecasting basic model first performs time series decomposition, trend forecasting, periodic forecasting, and stochastic forecasting on the input traffic time series vector to generate a predicted traffic vector every 5 minutes for the next 24 hours.

[0213] 3. Then, the output of the general traffic prediction base model is superimposed with the output of the LoRa fine-tuning model to obtain the final predicted traffic vector every 5 minutes for the next 24 hours.

[0214] 4. The length of the predicted flow vector is 288 (24 hours × 12 times / hour), and each element represents the predicted flow value at the corresponding time point.

[0215] This approach fully leverages the advantages of both the general traffic prediction base model and the LoRa fine-tuning model, ensuring overall prediction performance while providing more accurate traffic prediction results tailored to individual user needs. This provides a scientific basis for the rational allocation of network resources and the optimization of user experience.

[0216] In summary, the user terminal traffic prediction method proposed in this invention can effectively improve the accuracy of traffic prediction and the level of personalized services by constructing a general traffic prediction basic model and a targeted LoRa fine-tuning model, combined with the modeling and prediction of large-scale historical traffic data.

[0217] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions that, when executed in a computer, are used to perform the above-described user terminal traffic prediction method.

[0218] A third aspect of the present invention provides a user terminal traffic prediction system, wherein the system includes the computer-readable storage medium described above.

[0219] Specifically, the principle of this invention is:

[0220] 1. Construction of the General Traffic Flow Forecasting Model: The general traffic flow forecasting model consists of a mathematical prediction module and a convolutional neural network module. The mathematical prediction module includes four equations: time series decomposition, trend prediction, periodic prediction, and stochastic prediction. This decompositional modeling approach can more comprehensively capture the inherent patterns of traffic flow time series. Simultaneously, the convolutional neural network module can extract high-dimensional features from the traffic data, providing valuable feature representations for subsequent predictions. Working together, both can effectively uncover the overall patterns hidden within large-scale traffic flow data.

[0221] 2. Targeted LoRa Fine-Tuning Model: To meet the personalized needs of different user groups, this invention adopts a LoRa-based fine-tuning mechanism. First, user terminals are clustered into multiple clusters with similar characteristics. For each cluster, a corresponding LoRa fine-tuning model is designed. The parameter size of the LoRa fine-tuning model is proportional to the feature differences of its cluster, enabling the model to be optimized specifically for the characteristics of different user groups. This personalized fine-tuning mechanism can effectively improve the prediction accuracy for specific user groups.

[0222] 3. Utilization of Large-Scale Historical Data: This invention effectively utilizes large-scale historical traffic data from over 10,000 user terminals. Training the general traffic prediction model and constructing the LoRa fine-tuning model both require a large number of training samples. Large-scale data can fully reflect the overall characteristics of the user group, providing a reliable foundation for model building. Simultaneously, large-scale data is also needed to support the personalized needs of different user groups.

[0223] The three key technologies mentioned above work together to constitute the user terminal traffic prediction method of this invention. The general traffic prediction basic model captures the overall traffic prediction pattern, while the LoRa fine-tuning model optimizes for the personalized needs of different user groups. The combination of the two leverages the advantages of large-scale data. This method meets the actual needs of traffic prediction, improving overall prediction accuracy while also satisfying the requirements of personalized services.

[0224] Specifically, the general traffic prediction model uses mathematical modeling methods to decompose raw traffic data into three components: trend, periodic, and random, and establishes prediction models for each component. This decompositional modeling approach allows for a deeper exploration of the inherent patterns in traffic time series. Simultaneously, the use of convolutional neural networks to extract high-dimensional features further enriches the model's expressive power. This basic model can effectively capture the traffic variation patterns of the overall user group.

[0225] To address the personalized needs of different user groups, this invention employs a LoRa fine-tuning mechanism. First, user terminals are divided into multiple clusters with similar characteristics through cluster analysis. Then, a corresponding LoRa fine-tuning model is designed for each cluster. The parameter size of the LoRa fine-tuning model is proportional to the feature differences within its cluster, ensuring that the model can be optimized in a personalized manner for the characteristics of different user groups. This personalized fine-tuning mechanism allows the invention to balance overall prediction performance with personalized service requirements.

[0226] To better understand and implement this invention, a specific embodiment 1 of this invention is provided below. The specific implementation method of each step in this embodiment 1 is described in detail below:

[0227] Step S10: Construct a general traffic prediction base model

[0228] The general traffic forecasting model consists of two parts: a mathematical forecasting module and a convolutional neural network module. The mathematical forecasting module contains four equations, used for time series decomposition, trend forecasting, periodic forecasting, and stochastic forecasting, respectively.

[0229] The purpose of time series decomposition equations is to transform the original flow data F t Decomposed into trend component T tPeriodic component S t and random component R t This decomposition process can be represented as:

[0230] F t =T t +S t +R t (1)

[0231] Among them, F t Given the original traffic time series, where t is the time index. By applying the STL decomposition algorithm, we can extract the data from F... t T is estimated t S t and R t The STL algorithm first uses the Loess smoothing method to estimate the trend component T. t Then, the trend component is removed from the original sequence to obtain the detrended sequence F. t -T t Finally, seasonal decomposition is performed on the detrended sequence to obtain the periodic component S. t Finally, the trend and periodic components are subtracted from the original sequence to obtain the random component R. t .

[0232] The trend prediction equation is used to predict the long-term trend of flow data. This equation employs a combination of quadratic polynomials and logarithmic functions, and introduces an autoregressive term to capture the autocorrelation of the series. The formula is expressed as follows:

[0233]

[0234] Among them, T t+h Let α, β, γ, δ, and φ be the trend prediction values ​​for h steps forward. i Let be the coefficients to be estimated, p be the autoregression order, and ε be the coefficients to be estimated. t These are random error terms. These parameters can be estimated using the least squares method.

[0235] The periodic prediction equation is used to predict the periodic changes in flow data. This equation, in the form of a Fourier series and incorporating an autoregressive term, can be expressed as:

[0236]

[0237] Among them, S t+h Let A be the periodic prediction value forward h steps, K be the order of the Fourier series, and A be the value of the prediction value forward h steps. k and B k Let f be the Fourier coefficients to be estimated, f be the fundamental frequency, and ψ be the Fourier coefficients to be estimated. j η is the autoregressive coefficient, q is the autoregressive order, and η is the autoregressive coefficient. tThis represents the random error term. These parameters can also be estimated using the least squares method.

[0238] The purpose of the stochastic prediction equation is to predict the random fluctuations in flow data. This equation, using the form of an autoregressive moving average (ARMA), can be expressed as:

[0239]

[0240] Among them, R t+h Let ρ be the random prediction value h steps forward. i Here, r is the autoregressive coefficient, r is the autoregressive order, and θ is the autoregressive coefficient. j ξ is the moving average coefficient, s is the moving average order, and ξ is the moving average coefficient. t It is white noise. These parameters can be obtained using the maximum likelihood estimation method.

[0241] The convolutional neural network module uses ResNet as its backbone network structure, specifically a deep convolutional network composed of multiple residual blocks. The input to this module is preprocessed historical traffic data X, and the output is a traffic feature vector Z. Convolutional neural networks can effectively extract high-dimensional features from traffic data, providing valuable feature representations for subsequent model predictions. The basic structure of ResNet can be represented as follows:

[0242] Z = f(X; Θ); (5)

[0243] Where Θ represents the trainable parameters of the convolutional neural network, including kernel weights, biases, batch normalization parameters, etc. f(·) represents the forward propagation function of ResNet.

[0244] Through the collaborative work of the mathematical prediction module and the convolutional neural network module, the general traffic forecasting foundation model can comprehensively model and predict the development trend of traffic time series. It is important to note that the parameter values ​​involved in these equations typically need to be estimated and adjusted based on actual data to ensure the model's predictive performance.

[0245] Step S20: Obtain historical traffic data from multiple user terminals

[0246] The purpose of this step is to collect historical traffic data from a large number of user terminals as the basis for model training. Specifically, it is necessary to obtain traffic data from more than 10,000 user terminals over a continuous period of more than one month. Each traffic data record should include the following information: timestamp t, uplink traffic u, downlink traffic d, network type n, device type e, geographical location l, application type a, user IDi, and some network quality indicators q. This information can be obtained through monitoring and logging of network devices.

[0247] Obtaining large-scale and continuous historical traffic data is crucial for subsequent data modeling and prediction. Data spanning long periods can better reflect the overall characteristics of traffic time series, while data from a large number of user terminals helps to capture the overall characteristics of the user group. This data will serve as the basis for training a general traffic prediction base model and a LoRa fine-tuning model.

[0248] Step S30: Preprocess historical traffic data

[0249] Before training the model, the collected historical traffic data needs to be preprocessed. This mainly includes the following steps:

[0250] 1. Noise Reduction

[0251] Identify and filter out abnormal noise in the data to ensure data quality and reliability. A moving average filter can be used as follows:

[0252]

[0253] in, x represents the filtered data value. t is the original data value, and w is the size of the filter window.

[0254] 2. Fill in missing values

[0255] Missing values ​​in the dataset need to be imputed appropriately. Linear interpolation can be used as an example.

[0256]

[0257] in, x is the filled-in data value. t and x t-1 For adjacent observations, t, t t-1 and t t This is the corresponding timestamp.

[0258] 3. Outlier Detection

[0259] Identify and remove outliers from the dataset. A Z-score-based approach can be used.

[0260]

[0261] Among them, z t Let μ and σ be the standardized data values, where μ and σ are the mean and standard deviation of the data, respectively. When |z... t When |>3, it is considered that x t This is an outlier.

[0262] 4. Generate traffic time series vectors

[0263] Based on the preprocessed historical traffic data, a traffic time-series vector x containing time-series information is generated for each user terminal i. i =[u1,d1,n1,e1,l1,a1,i1,q1,u2,d2,n2,e2,l2,a2,i2,q2,...,u T ,d T ,n T ,e T ,l T ,a T i T ,q T ], where T is the observation time length.

[0264] The above preprocessing steps ensure the quality and integrity of historical traffic data, laying a solid foundation for subsequent model training and prediction.

[0265] Step S40: Perform cluster analysis on the traffic time series vector

[0266] After acquiring and preprocessing historical traffic data, it is necessary to process these traffic time-series vectors {x}. i Cluster analysis is performed. The purpose of clustering is to divide more than 10,000 user terminals into multiple clusters C. k Each cluster contains user terminals with similar traffic characteristics.

[0267] Cluster analysis can be performed using the K-Means algorithm. The objective function of K-Means can be expressed as:

[0268]

[0269] Where K is the number of clusters, μ k Let be the centroid vector of the k-th cluster. By iteratively optimizing this objective function, the final clustering result can be obtained.

[0270] To evaluate the quality of clustering, the silhouette coefficient s(i) can be used as an indicator:

[0271]

[0272] Where a(i) is the average distance between sample i and other samples in its cluster, and b(i) is the average distance between sample i and its nearest cluster. The larger the silhouette coefficient, the better the clustering effect.

[0273] Cluster analysis reveals different traffic patterns and characteristics within user groups. This lays the foundation for subsequent LoRa fine-tuning of the model, enabling it to perform personalized traffic predictions for user groups with different characteristics.

[0274] Step S50: Calculate the similarity of clusters.

[0275] After completing the cluster analysis, it is necessary to calculate the similarity between each cluster and the base cluster (the cluster containing the most user terminals). This similarity metric will serve as the basis for fine-tuning the LoRa model parameter scale.

[0276] The specific method for calculating cluster similarity is as follows:

[0277] 1. Determine the basic cluster C0: Select the cluster containing the largest number of user terminals as the basic cluster.

[0278] 2. Calculate cluster centers

[0279] For each cluster C k Calculate its cluster center vector μ k That is, the average value of the time-series vectors of all member flows:

[0280]

[0281] 3. Calculate similarity

[0282] For clusters C other than the basic cluster C0 k Calculate its cluster center vector μ k The cosine similarity between the cluster center μ0 and the basic cluster center is used as the cluster similarity. k :

[0283]

[0284] Calculating cluster similarity quantifies the degree of similarity between different clusters. This metric will play a crucial role in the subsequent construction of the LoRa fine-tuning model. Lower cluster similarity indicates a greater difference between the cluster and the underlying clusters, requiring more model parameters to capture its features.

[0285] Step S60: Set up the LoRa fine-tuning model

[0286] Based on the aforementioned cluster analysis and cluster similarity calculation, this step requires setting a corresponding Lora fine-tuning model for each cluster. The parameter size of the Lora fine-tuning model will be inversely proportional to the cluster similarity.

[0287] Specifically, the LoRa fine-tuning model uses low-rank matrix factorization to adjust the parameter size. Each LoRa fine-tuning model contains multiple low-rank matrix layers, where:

[0288] LowRankMatrix i :InputDimi OutputDim i ,Rank i (13)

[0289] Among them, InputDim i and OutputDim i Let rank represent the input and output dimensions of the i-th low-rank matrix, respectively. i Let represent the rank of the i-th low-rank matrix.

[0290] To achieve the goal of parameter size being inversely proportional to cluster similarity, we can use cluster similarity as a metric. k Adjust the number i and rank of the low-rank matrix i :

[0291]

[0292] C1 and C2 are constants used to control k and Rank. i The range of values ​​for k and Rank is determined in this way. This ensures that the parameter size of the LoRa fine-tuning model is between 10,000 and 1,000,000 trainable parameters, and is inversely proportional to cluster similarity. When cluster similarity is low, k and Rank... i Larger values ​​increase the parameter size; conversely, when cluster similarity is high, k and Rank are smaller. i Smaller, thus reducing parameter size.

[0293] This LoRa fine-tuning model setting based on cluster similarity ensures that the model can make personalized traffic predictions for user groups with different characteristics, thereby improving the overall prediction accuracy.

[0294] Step S70: Train the general traffic prediction base model and the LoRa fine-tuning model

[0295] After completing the aforementioned steps, the next step is to train the model. This involves two steps:

[0296] 1. Train a general traffic prediction base model

[0297] Using the traffic time-series vector {x} of all user terminals i} as training data;

[0298] Train a general traffic prediction base model, including a mathematical prediction module and a convolutional neural network module;

[0299] The general traffic prediction base model has 10,000,000 trainable parameters.

[0300] 2. Training the LoRa fine-tuning model

[0301] For each cluster C k The traffic time-series vector {x} of all user terminals in this cluster is used. i |x i ∈C k} as training data for fine-tuning;

[0302] Based on the trained general traffic prediction model, for each cluster C k Perform LoRa fine-tuning;

[0303] The Lora fine-tuning model has a parameter size ranging from 10,000 to 1,000,000 trainable parameters, similar to cluster similarity. k Inversely proportional;

[0304] Through the two training steps described above, a general traffic prediction base model and a LoRa fine-tuning model tailored to different user groups can be obtained. The general traffic prediction base model can capture overall traffic prediction patterns, while the LoRa fine-tuning model can provide personalized predictions based on the characteristics of specific user groups. This model structure can fully utilize the advantages of large-scale data while also taking into account personalized needs, thereby improving overall prediction performance.

[0305] Step S80: Determine the cluster of user terminals to be predicted and the LoRa fine-tuning model.

[0306] When predicting future traffic for a specific user terminal, it is necessary to first determine the cluster to which the user terminal belongs and then determine the corresponding LoRa fine-tuning model. The specific steps are as follows:

[0307] 1. Obtain historical traffic data of the user terminals to be predicted.

[0308] Traffic data of the user terminals to be predicted was collected from network devices over the past 24 hours. new The data is sampled every 5 minutes to form a traffic time-series vector.

[0309] 2. Determine the clusters

[0310] The traffic time-series vector x of the user terminal to be predicted new The cluster centers {μ} of the aforementioned clusters k} Compare and find the most similar cluster C k Cosine similarity can be used as a criterion here:

[0311]

[0312] Choose to make Similarity new,kThe largest cluster C k As the cluster to which the user terminal to be predicted belongs.

[0313] 3. Select the LoRa fine-tuning model

[0314] Determine the cluster C to which the user terminal to be predicted belongs. k Then, you can select the Lora fine-tuning model corresponding to the cluster for prediction.

[0315] This step allows us to determine the user group to which the user terminal belongs based on its actual traffic characteristics, and then select a LoRa fine-tuned model trained specifically for that group for prediction. This ensures that the prediction results are closer to the actual situation of the user terminal.

[0316] Step S90: Perform flow prediction

[0317] The final step is to predict the future traffic of the user terminals under test using the general traffic prediction base model and the corresponding LoRa fine-tuning model. The specific steps are as follows:

[0318] 1. The traffic time-series vector x of the user terminal to be predicted new Input into the general traffic prediction base model and the Lora fine-tuning model.

[0319] 2. The general traffic forecasting basic model first processes the input traffic time series vector x new Time series decomposition, trend forecasting, periodic forecasting, and stochastic forecasting are performed to generate predicted flow vectors every 5 minutes for the next 24 hours.

[0320]

[0321] Among them, f trend (·), f periodic (·) and f random (·) represent functions for trend forecasting, periodic forecasting, and stochastic forecasting, respectively.

[0322] 3. Then, the output of the general traffic prediction base model is used. Output of LoRa fine-tuning model By overlaying these values, we obtain the final predicted flow vector every 5 minutes for the next 24 hours.

[0323] 4. This predicted flow vector The length is 288 (24 hours × 12 times / hour), and each element represents the predicted flow value at the corresponding time point.

[0324] This approach fully leverages the advantages of both the general traffic prediction base model and the LoRa fine-tuning model, ensuring overall prediction performance while providing more accurate traffic prediction results tailored to individual user needs. This provides a scientific basis for the rational allocation of network resources and the optimization of user experience.

[0325] The following is a specific application scenario of the present invention, Embodiment 2: This Embodiment 2 is applied to the network optimization scenario of a large network service provider. This service provider has over 100,000 user terminals, providing users with a wealth of digital services, including video, music, and social networking. To achieve reasonable network resource allocation and optimize user experience, this service provider urgently needs to establish a system capable of accurately predicting the changing trends of user terminal traffic.

[0326] According to a specific embodiment of the present invention, the service provider has implemented the following traffic prediction practices:

[0327] Data collection

[0328] The service provider first collected detailed traffic data from 100,000 user terminals over the period from May 1, 2023 to June 30, 2024 (14 months). The traffic data for each user terminal included timestamps, uplink traffic, downlink traffic, network type, device type, geographic location, application type, user ID, and some network quality metrics. This historical traffic data totaled 420 million records, averaging 4,200 records per user terminal. Data collection was performed using the service provider's network equipment and monitoring system.

[0329] Data preprocessing

[0330] The collected raw traffic data first undergoes preprocessing. This specifically includes:

[0331] 1. Noise Reduction: A moving average filter is used to remove abnormal noise from the data, ensuring data quality and reliability. The filter window size is set to 7, meaning the average of the previous 3 time points, the current time point, and the next 3 time points is used as the filtered data.

[0332] 2. Imputing Missing Values: For missing values ​​in the dataset, linear interpolation is used for imputation. Interpolation is performed chronologically based on observations from two adjacent time points.

[0333] 3. Outlier Detection: An outlier detection method based on Z-score is used to identify and remove outliers. When the standardized score of a data point |z... t When the value is greater than 3, it is considered an outlier and deleted.

[0334] 4. Generate traffic time-series vector: Based on the preprocessed data, generate a traffic vector containing time-series information for each user terminal. The length is 288 (24 hours × 12 times / hour), which records the expected traffic value every 5 minutes in the next 24 hours.

[0335] After the above preprocessing, a traffic time-series vector dataset containing 100,000 user terminals is obtained, which serves as the basis for subsequent model training and prediction.

[0336] Cluster analysis

[0337] To meet the personalized needs of different user groups, the service provider conducted cluster analysis on 100,000 collected traffic time-series vectors. Specifically, the K-Means algorithm was used for clustering, with the number of clusters K set to 20. After several trials, it was finally determined that K=20 yielded the best clustering results, with a silhouette coefficient of 0.78.

[0338] Cluster similarity calculation

[0339] After determining the clustering results, the service provider calculated the similarity between each cluster and the base cluster (the cluster containing the most user terminals). The specific calculation method is as follows:

[0340] 1. Determine the basic cluster: According to statistics, cluster 6 contains 25,000 user terminals, which is the cluster with the largest number of users, and therefore it was selected as the basic cluster.

[0341] 2. Calculate cluster centers: For each cluster C k Calculate its cluster center vector μ k This is the average of the time-series flow vectors of all members. Taking cluster 6 as an example, its cluster center vectors are shown in Table 1:

[0342] Table 1. Cluster center vectors of cluster 6

[0343]

[0344]

[0345] 3. Calculate similarity: For clusters C other than the basic cluster 6. k Calculate its cluster center vector μ k The cosine similarity between the cluster and the center μ6 of the basic cluster is used as the cluster similarity. k Taking cluster 3 as an example, the similarity between its cluster center and the basic cluster 6 is calculated as follows:

[0346]

[0347] Using the method described above, the service provider calculated the similarity between each cluster and the base cluster 6, and the results are shown in Table 2:

[0348] Table 2 shows the similarity between each cluster and the base cluster 6.

[0349] Cluster Similarity 1 0.81 2 0.76 3 0.72 4 0.69 5 0.65 6 1.00 7 0.61 8 0.58 9 0.53 10 0.49 11 0.46 12 0.42 13 0.38 14 0.35 15 0.32 16 0.29 17 0.26 18 0.22 19 0.19 20 0.15

[0350] As shown in Table 2, cluster 1 has the highest similarity to the basic cluster 6, with a similarity of 0.81, while cluster 20 has the largest difference from the basic cluster, with a similarity of only 0.15. This similarity information will play a crucial role in the subsequent construction of the LoRa fine-tuning model.

[0351] Lora fine-tuning model construction

[0352] Based on the aforementioned cluster analysis and cluster similarity calculation results, the service provider designed a corresponding LoRa fine-tuning model for each cluster. The specific implementation is as follows:

[0353] 1. Construction of a General Traffic Prediction Model: First, the service provider constructed a general traffic prediction model, which consists of a mathematical prediction module and a convolutional neural network module. The mathematical prediction module includes four equations: time series decomposition, trend prediction, periodic prediction, and stochastic prediction, which can comprehensively capture the development patterns of traffic time series. Simultaneously, the convolutional neural network module adopts a ResNet structure to extract high-dimensional features from the traffic data. The general traffic prediction model has 10,000,000 trainable parameters.

[0354] 2. LoRa fine-tuning model construction: For each cluster C k Each service provider has designed a corresponding LoRa fine-tuning model. The LoRa fine-tuning model consists of multiple low-rank matrix layers, with each low-rank matrix having a parameter of LowRankMatrix. i :InputDim i ,OutPutDim i ,Rank i Based on the cluster similarity in Table 2... k Adjust the number of low-rank matrices, k, and rank. i The details are as follows:

[0355]

[0356] For example, for cluster 1 with the highest similarity, its Similarity1 = 0.81, therefore k = 1 and Rank1 = 50; while for cluster 20 with the lowest similarity, its Similarity... 20=0.15, therefore k=5, Rank i =300. This design ensures that the parameter size of the LoRa fine-tuning model is between 10,000 and 1,000,000 trainable parameters, and is inversely proportional to the cluster similarity.

[0357] 3. Model Training: The service provider uses the time-series traffic vectors of 100,000 user terminals as training data to first train a general traffic prediction base model. Then, for each cluster C... k The traffic time-series vectors of all user terminals in the cluster are used as fine-tuning training data. LoRa fine-tuning is performed on the basis of the basic model to obtain a personalized model for the cluster.

[0358] Following the steps outlined above, the service provider acquired a general-purpose traffic prediction base model and 20 LoRa fine-tuned models, covering user groups with diverse characteristics. These models are well-prepared for subsequent traffic prediction tasks.

[0359] Traffic forecasting practices

[0360] When a service provider needs to predict the future traffic of a user terminal, it goes through the following steps:

[0361] 1. Obtain historical traffic data of the user terminal to be predicted: Collect traffic data of the user terminal over the past 24 hours through network devices, sampling at 5-minute intervals to form a traffic time-series vector x. new .

[0362] 2. Determine clusters: The traffic time-series vector x of the user terminals to be predicted... new The cluster centers {μ} of each cluster k} Compare and find the most similar cluster C k Specifically, the cosine similarity is calculated as follows:

[0363]

[0364] Choose to make Similarity new,k The largest cluster C k As the cluster to which the user terminal to be predicted belongs.

[0365] 3. Select the LoRa fine-tuning model: Determine the cluster C to which the user terminal to be predicted belongs. k Then, you can select the Lora fine-tuning model corresponding to the cluster for prediction.

[0366] 4. Perform traffic prediction: Calculate the traffic time-series vector x of the user terminal to be predicted. newThe data is input into the general traffic forecasting base model and the LoRa fine-tuning model. The general traffic forecasting base model first generates a predicted traffic vector every 5 minutes for the next 24 hours. Then it is compared with the output of the Lora fine-tuning model. The vectors are then superimposed to obtain the final predicted flow vector.

[0367] This traffic prediction practice lasted for three months, predicting future traffic for a total of 5,000 user terminals. To evaluate the prediction effectiveness, the service provider randomly selected 100 user terminals and compared the prediction results with actual observations. The service provider further analyzed the prediction performance of user terminals in different clusters, and the results are shown in Table 3.

[0368] Table 3 Prediction results for user terminals in different clusters

[0369] Cluster Average prediction error 1 6.5% 2 7.2% 3 7.9% 4 8.3% 5 8.7% 6 6.1% 7 8.9% 8 9.2% 9 9.8% 10 10.1% 11 10.5% 12 10.9% 13 11.3% 14 11.7% 15 12.1% 16 12.5% 17 12.9% 18 13.3% 19 13.7% 20 14.0%

[0370] As shown in Table 3, clusters with high similarity to the basic cluster 6 have lower prediction errors for user terminals; for example, the prediction errors for clusters 1 and 6 are 6.5% and 6.1%, respectively. Conversely, clusters with significant differences from the basic cluster have higher prediction errors for user terminals; for example, the prediction errors for clusters 19 and 20 are 13.7% and 14.0%, respectively. This verifies the effectiveness of the LoRa fine-tuning mechanism employed in this invention, enabling it to provide personalized, high-precision prediction services tailored to the characteristics of different user groups. See also... Figure 2 The bar chart in the middle; Figure 3 This graph shows a comparison between actual and predicted traffic for a user terminal over a 24-hour period (sampled at 5-minute intervals). The blue curve represents actual traffic, and the orange curve represents predicted traffic. As can be seen from the graph, the predicted traffic closely matches the actual traffic, accurately capturing not only the overall traffic trend but also effectively predicting short-term fluctuations. This fully demonstrates the high accuracy and reliability of the method described in this invention for traffic prediction. Figure 4 The figure shows the average prediction error for 20 clusters. The horizontal axis represents the cluster number, and the vertical axis represents the average prediction error (percentage). It can be observed from the figure that clusters with high similarity to the base cluster (cluster 6) (such as cluster 1, cluster 2, etc.) have lower prediction errors, while clusters with lower similarity (such as cluster 19, cluster 20) have relatively higher prediction errors. This result verifies the effectiveness of the LoRa fine-tuning mechanism used in this invention, which can provide personalized, high-precision prediction services based on the characteristics of different user groups.

[0371] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A user terminal traffic prediction method, characterized by, include: A general traffic prediction model is constructed by acquiring historical traffic data from multiple user terminals over a continuous period. This historical traffic data is preprocessed to generate a traffic time-series vector for each user terminal. Cluster analysis is then performed on these traffic time-series vectors, dividing the multiple user terminals into several clusters. The cluster with the most user terminals is selected as the base cluster. The cluster similarity between the base cluster and other clusters is calculated. A corresponding LoRa fine-tuning model is set for each cluster, with the parameter size of the LoRa fine-tuning model inversely proportional to the cluster similarity. The general traffic prediction model is trained using the traffic time-series vectors from all user terminals. Each cluster fine-tuning forms a corresponding LoRa fine-tuning model. Historical traffic data of the user terminal to be predicted is obtained to generate a terminal vector. The cluster of the user terminal to be predicted and the corresponding LoRa fine-tuning model are determined. Based on the terminal vector to be predicted, the general traffic prediction base model and the corresponding LoRa fine-tuning model are superimposed to predict the future traffic data of the user terminal to be predicted. The general traffic prediction base model includes a mathematical prediction module and a convolutional neural network. The mathematical prediction module is a set of mathematical equations, including time series decomposition equation, trend prediction equation, periodic prediction equation and stochastic prediction equation. The time series decomposition equation is used to decompose the original traffic data into trend, periodic and random components; the trend prediction equation is used to predict the long-term trend of traffic data; the periodic prediction equation is used to predict the periodic changes of traffic data; and the random prediction equation is used to predict the random fluctuations of traffic data. The convolutional neural network uses ResNet as its backbone and is a deep convolutional network containing multiple residual blocks. The input of the convolutional neural network is preprocessed historical traffic data, and the output is a traffic feature vector, which is used to extract high-dimensional features of the traffic data.

2. The method of claim 1, wherein, The historical traffic data includes timestamps, uplink traffic, downlink traffic, network type, device type, geographical location, application type, user ID, and network quality indicators.

3. The method of claim 2, wherein, The historical traffic data is preprocessed, including noise removal, missing value filling, and outlier detection. Based on the preprocessed historical traffic data, a traffic time-series vector is generated for each user terminal.

4. The method of claim 3, wherein, The continuous period of time refers to a period of more than one month, and the multiple user terminals refer to more than 10,000 user terminals.

5. The method of claim 4, wherein, The process involves acquiring historical traffic data of the user terminal to be predicted by collecting traffic data of the user terminal to be predicted in the past 24 hours through network devices and sampling at 5-minute intervals. The future traffic data is represented by a vector, and the traffic data is predicted every 5 minutes in the next 24 hours to form a vector containing 288 elements.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, which, when executed in a computer, are used to perform a user terminal traffic prediction method according to any one of claims 1-5.

7. A user terminal traffic prediction system characterized by, It includes the computer-readable storage medium of claim 6.