Digital twin network traffic prediction method, apparatus and device, and storage medium
By using TimeGPT time series model and incremental learning method, the flow prediction model of the logistics transfer center is constructed and updated, and the problems of low accuracy and overfitting of traffic prediction in the existing technology are solved, and more efficient and accurate traffic prediction is achieved. .
Patent Information
- Application Number
- CN202411461958.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-14
AI Technical Summary
The existing digital twin network traffic prediction method for logistics transfer centers has low accuracy under the influence of peak periods and other factors, and cannot effectively handle huge data volumes, making it easy to have overfitting problems.
The TimeGPT time series model is used to build and train the traffic prediction model, and the model is configured by acquiring and preprocessing historical traffic data, and the model is updated based on the incremental learning method to adapt to traffic changes.
Improve the accuracy and reliability of traffic prediction, prevent model overfitting, ensure that the prediction model always predicts based on the latest data, adapts to traffic changes, optimizes resource allocation and improves logistics efficiency.
Smart Images

Figure CN119441871A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of logistics technology, and in particular to a digital twin network traffic prediction method, device, equipment and storage medium. Background Art
[0002] At present, the digital twin network of the logistics transfer center predicts traffic by analyzing and predicting historical network traffic data. Based on the traffic prediction results, network administrators can more effectively allocate existing network resources, optimize network configuration, improve network performance, and reduce network congestion and delays. However, in the traditional digital twin network traffic prediction work of the logistics transfer center, modeling is usually based on artificial experience and machine learning technologies. The accuracy of network traffic prediction is easily affected by factors such as peak periods. Moreover, with the increasing amount of data, the existing prediction methods cannot meet the calculation of huge data volumes and are prone to overfitting problems.
[0003] It can be seen that the existing technology still needs to be improved and enhanced. Summary of the invention
[0004] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a digital twin network traffic prediction method, device, equipment and storage medium, which can process huge amounts of data and effectively prevent the problem of overfitting of the model.
[0005] The first aspect of the present invention provides a digital twin network traffic prediction method, including: obtaining historical traffic data of the digital twin network of the logistics circulation center, and preprocessing the historical traffic data to obtain traffic training data; constructing an initialization model based on the TimeGPT time series model, and configuring parameters of the initialization model to obtain a basic prediction model; training the basic prediction model based on the traffic training data to obtain a traffic prediction model; obtaining updated traffic data from the digital twin network of the logistics circulation center according to a preset period, and updating and training the traffic prediction model according to the updated traffic data to obtain an updated traffic prediction model; obtaining real-time traffic data of the digital twin network of the logistics circulation center, and performing traffic prediction based on the updated traffic prediction model and the real-time traffic data to obtain a predicted traffic result.
[0006] Optionally, in a first implementation method of the first aspect of the present invention, the historical flow data of the digital twin network of the logistics circulation center is obtained, and the historical flow data is preprocessed to obtain flow training data, including: obtaining historical flow data from the digital twin network of the logistics circulation center, and parsing the historical flow data to obtain timestamp information, flow value information corresponding to the timestamp information, and time-related information; performing data cleaning on the timestamp information, flow value information, and time-related information respectively to obtain cleaned data; and converting the format of the cleaned data according to a preset time series format to obtain flow training data.
[0007] Optionally, in a second implementation method of the first aspect of the present invention, the timestamp information, flow value information and time-related information are respectively cleaned to obtain cleaned data, including: determining whether there are missing values in the timestamp information, flow value information and time-related information, and if there are missing values, filling the missing values based on the interpolation method to obtain filled repair information; determining whether there are abnormal values in the timestamp information, flow value information and time-related information based on the box plot method, and if there are abnormal values, correcting or deleting the abnormal values to obtain corrected information; integrating the filled repair information and the corrected information, and sorting them based on a preset time series to obtain cleaned data.
[0008] Optionally, in a third implementation method of the first aspect of the present invention, the format of the cleaned data is converted according to a preset time series format to obtain traffic training data, including: converting the timestamp information and time-related information in the cleaned data into a date and time format based on the to_datetime function to obtain converted data; generating a traffic time series graph based on the matplotlib library and the converted data; and generating traffic training data based on the traffic time series graph.
[0009] Optionally, in a fourth implementation of the first aspect of the present invention, the initialization model is constructed based on the TimeGPT time series model, and parameters of the initialization model are configured to obtain a basic prediction model, including: obtaining an API interface of the TimeGPT time series model, and initializing the TimeGPT time series model through the API interface to obtain the initialization model;
[0010] The data type of the traffic training data is obtained, and the model parameters are determined according to the data type; the network structure and training parameters of the initialization model are set based on the model parameters to obtain the configuration model; and the API key is configured for the configuration model to obtain the initialization model.
[0011] Optionally, in a fifth implementation method of the first aspect of the present invention, the basic prediction model is trained based on the traffic training data to obtain a traffic prediction model, including: dividing the traffic training data into a traffic training set and a traffic verification set based on a preset weight ratio; iteratively training the basic prediction model through the traffic training set, and obtaining prediction error data during the training process; fine-tuning the basic prediction model according to the prediction error data, and predicting the prediction effect of the fine-tuned basic prediction model based on the loss function to obtain the basic prediction model with the best result; verifying the basic prediction model with the best result through the verification set to obtain the basic prediction model with the best performance as the traffic prediction model.
[0012] Optionally, in a sixth implementation method of the first aspect of the present invention, the updated traffic data is obtained from the digital twin network of the logistics circulation center according to a preset period, and the traffic prediction model is updated and trained according to the updated traffic data to obtain an updated traffic prediction model, including: obtaining update events of the digital twin network of the logistics circulation center, and calculating an update regular period based on the update events; obtaining updated traffic data from the digital twin network of the logistics circulation center according to the update regular period, and cleaning the updated traffic data to obtain updated training data; updating and training the traffic prediction model based on the incremental learning method and the updated training data to obtain an updated traffic prediction model.
[0013] The second aspect of the present invention provides a digital twin network traffic prediction device, including: a preprocessing module, which is used to obtain historical traffic data of the digital twin network of the logistics circulation center, and preprocess the historical traffic data to obtain traffic training data; a configuration module, which is used to build an initialization model based on the TimeGPT time series model, and configure the parameters of the initialization model to obtain a basic prediction model; a training module, which is used to train the basic prediction model based on the traffic training data to obtain a traffic prediction model; an update module, which is used to obtain updated traffic data from the digital twin network of the logistics circulation center according to a preset period, and update the traffic prediction model according to the updated traffic data to obtain an updated traffic prediction model; a prediction module, which is used to obtain real-time traffic data of the digital twin network of the logistics circulation center, and perform traffic prediction based on the updated traffic prediction model and the real-time traffic data to obtain a predicted traffic result.
[0014] Optionally, in a first implementation method of the second aspect of the present invention, the preprocessing module includes: a parsing unit, used to obtain historical flow data from the digital twin network of the logistics flow center, and parse the historical flow data to obtain timestamp information, flow value information corresponding to the timestamp information, and time-related information; a cleaning unit, used to perform data cleaning on the timestamp information, flow value information and time-related information respectively to obtain cleaned data; a conversion unit, used to convert the format of the cleaned data according to a preset time series format to obtain flow training data.
[0015] Optionally, in a second implementation method of the second aspect of the present invention, the cleaning unit includes: a missing part, used to determine whether there are missing values in the timestamp information, flow value information and time-related information; if there are missing values, the missing values are filled based on the interpolation method to obtain filled repair information; an abnormal part, used to determine whether there are abnormal values in the timestamp information, flow value information and time-related information based on the box plot method; if there are abnormal values, the abnormal values are corrected or deleted to obtain corrected information; an integration part, used to integrate the filled repair information and the corrected information, and sort them based on a preset time series to obtain cleaned data.
[0016] Optionally, in a third implementation of the second aspect of the present invention, the conversion unit includes: a conversion unit, used to convert the timestamp information and time-related information in the cleaned data into a date and time format based on a to_datetime function to obtain converted data; a drawing unit, used to draw and generate a traffic time series graph based on a matplotlib library and the converted data; and a generation unit, used to generate traffic training data based on the traffic time series graph.
[0017] Optionally, in a fourth implementation of the second aspect of the present invention, the configuration module includes: an initialization unit, used to obtain the API interface of the TimeGPT time series model, and initialize the TimeGPT time series model through the API interface to obtain an initialized model; a parameter unit, used to obtain the data type of the traffic training data, and determine the model parameters according to the data type; a configuration unit, used to set the network structure and training parameters of the initialization model based on the model parameters to obtain the configured model; a key unit, used to configure the API key for the configuration model to obtain the initialized model.
[0018] Optionally, in a fifth implementation of the second aspect of the present invention, the training module includes: a division unit, used to divide the traffic training data into a traffic training set and a traffic verification set based on a preset weight ratio; an iteration unit, used to iteratively train the basic prediction model through the traffic training set, and obtain prediction error data during the training process; a fine-tuning unit, used to fine-tune the basic prediction model according to the prediction error data, and predict the prediction effect of the fine-tuned basic prediction model based on the loss function to obtain the basic prediction model with the best result; a verification unit, used to verify the basic prediction model with the best result through the verification set, so as to obtain the basic prediction model with the best performance as the traffic prediction model.
[0019] Optionally, in a sixth implementation method of the second aspect of the present invention, the update module includes: a periodic unit, used to obtain update events of the digital twin network of the logistics circulation center, and calculate an update regular period based on the update events; a filtering unit, used to obtain updated flow data from the digital twin network of the logistics circulation center according to the update regular period, and perform data cleaning on the updated flow data to obtain updated training data; an update unit, used to update the flow prediction model based on the incremental learning method and the updated training data to obtain an updated flow prediction model.
[0020] The third aspect of the present invention provides a digital twin network traffic prediction device, which includes: a memory and at least one processor, wherein instructions are stored in the memory; at least one of the processors calls the instructions in the memory so that the digital twin network traffic prediction device performs each step of the digital twin network traffic prediction method described in any one of the above items.
[0021] The fourth aspect of the present invention provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the various steps of any of the above-mentioned digital twin network traffic prediction methods are implemented.
[0022] In the technical solution of the present invention, by acquiring and preprocessing historical traffic data, and using the TimeGPT time series model for model construction and training, the time trend and periodic changes in the traffic data can be captured, thereby improving the accuracy and reliability of traffic prediction; by updating the traffic data such as real-time data to periodically update the traffic prediction model, it can be ensured that the prediction model is always based on the latest traffic data for prediction, thereby improving the real-time and accuracy of the prediction, so as to prevent the traffic prediction model from overfitting problems, and enable the traffic prediction model to adapt to traffic changes in the digital twin network of the logistics circulation center, including seasonal changes, emergencies, etc., thereby ensuring the accuracy and effectiveness of the prediction; through accurate traffic prediction, the logistics circulation center can better plan and manage resources; this helps to optimize resource allocation, improve logistics efficiency, and reduce operating costs; based on the predicted traffic results, the logistics circulation center can more accurately evaluate future traffic conditions, thereby making more reasonable decisions and plans, which helps to improve decision-making efficiency and accuracy and reduce decision-making risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A first flow chart of a digital twin network traffic prediction method provided by an embodiment of the present invention;
[0024] Figure 2 A second flow chart of the digital twin network traffic prediction method provided by an embodiment of the present invention;
[0025] Figure 3 A third flow chart of the digital twin network traffic prediction method provided by an embodiment of the present invention;
[0026] Figure 4 A fourth flow chart of a digital twin network traffic prediction method provided by an embodiment of the present invention;
[0027] Figure 5 A fifth flow chart of the digital twin network traffic prediction method provided by an embodiment of the present invention;
[0028] Figure 6 A sixth flow chart of the digital twin network traffic prediction method provided by an embodiment of the present invention;
[0029] Figure 7 A seventh flow chart of a digital twin network traffic prediction method provided by an embodiment of the present invention;
[0030] Figure 8 A schematic diagram of the structure of a digital twin network traffic prediction device provided by an embodiment of the present invention;
[0031] Fig. 9 Another structural schematic diagram of a digital twin network traffic prediction device provided by an embodiment of the present invention;
[0032] Fig.10 A schematic diagram of the structure of a digital twin network traffic prediction device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The present invention provides a digital twin network traffic prediction method, device, equipment and storage medium. The present invention can capture the time trend and periodic changes in the traffic data by acquiring and preprocessing historical traffic data, and using the TimeGPT time series model for model construction and training, thereby improving the accuracy and reliability of traffic prediction; periodically updating the traffic prediction model by updating the real-time data such as traffic data can ensure that the prediction model is always based on the latest traffic data for prediction, thereby improving the real-time and accuracy of the prediction, and preventing the traffic prediction model from overfitting problems, so that the traffic prediction model can adapt to the traffic changes in the digital twin network of the logistics circulation center, including seasonal changes, emergencies, etc., thereby ensuring the accuracy and effectiveness of the prediction; through accurate traffic prediction, the logistics circulation center can better plan and manage resources; this helps to optimize resource allocation, improve logistics efficiency, and reduce operating costs; based on the predicted traffic results, the logistics circulation center can more accurately evaluate future traffic conditions, thereby making more reasonable decisions and plans, which helps to improve decision-making efficiency and accuracy and reduce decision-making risks.
[0034] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the digital twin network traffic prediction method in the embodiment of the present invention includes:
[0036] 101. Obtain historical traffic data of the digital twin network of the logistics circulation center, and pre-process the historical traffic data to obtain traffic training data;
[0037] 102. Build an initialization model based on the TimeGPT time series model, and configure the parameters of the initialization model to obtain a basic prediction model;
[0038] 103. Training the basic prediction model based on the traffic training data to obtain a traffic prediction model;
[0039] In this embodiment, by acquiring and preprocessing historical traffic data, and using the TimeGPT time series model for model building and training, the time trends and periodic changes in the traffic data can be captured, thereby improving the accuracy and reliability of traffic prediction and effectively improving the prediction effect of the traffic prediction model.
[0040] 104. Obtain updated traffic data from the digital twin network of the logistics circulation center according to a preset period, and update and train the traffic prediction model according to the updated traffic data to obtain an updated traffic prediction model;
[0041] 105. Obtain the real-time traffic data of the digital twin network of the logistics flow center, and perform traffic prediction based on the updated traffic prediction model and real-time traffic data to obtain the predicted traffic results.
[0042] In this embodiment, the traffic prediction model is updated and trained using updated traffic data within a certain period. This real-time update mechanism can ensure that the prediction model is always based on the latest traffic data for prediction, thereby improving the real-time and accuracy of the prediction, preventing the traffic prediction model from overfitting, and enabling the traffic prediction model to adapt to traffic changes in the digital twin network of the logistics circulation center, including seasonal changes, emergencies, etc., thereby ensuring the accuracy and effectiveness of the prediction; through accurate traffic prediction, the logistics circulation center can better plan and manage resources, such as human, material and financial resources. This helps to optimize resource allocation, improve logistics efficiency and reduce operating costs.
[0043] In an embodiment of the present invention, by acquiring and preprocessing historical traffic data, and using the TimeGPT time series model for model construction and training, the time trend and periodic changes in the traffic data can be captured, thereby improving the accuracy and reliability of traffic prediction; by updating the traffic data, such real-time data, to periodically update the traffic prediction model, it can be ensured that the prediction model is always based on the latest traffic data for prediction, thereby improving the real-time and accuracy of the prediction, so as to prevent the traffic prediction model from overfitting, and enable the traffic prediction model to adapt to the traffic changes in the digital twin network of the logistics circulation center, including seasonal changes, emergencies, etc., thereby ensuring the accuracy and effectiveness of the prediction; through accurate traffic prediction, the logistics circulation center can better plan and manage resources, such as manpower, material resources and financial resources, etc.; this helps to optimize resource allocation, improve logistics efficiency and reduce operating costs; based on the predicted traffic results, the logistics circulation center can more accurately evaluate future traffic conditions, thereby making more reasonable decisions and plans, which helps to improve decision-making efficiency and accuracy and reduce decision-making risks.
[0044] See also Figure 2 , a second embodiment of the digital twin network traffic prediction method in an embodiment of the present invention includes:
[0045] 201. Obtain historical flow data from the digital twin network of the logistics circulation center, and parse the historical flow data to obtain timestamp information, flow value information corresponding to the timestamp information, and time-related information;
[0046] 202. Clean the timestamp information, the flow value information, and the time-related information to obtain cleaned data;
[0047] 203. Convert the format of the cleaned data according to a preset time series format to obtain flow training data.
[0048] In this embodiment, through detailed analysis and cleaning of historical traffic data, noise data and inaccurate information can be removed to improve the accuracy of subsequent analysis; the automated data analysis, cleaning and format conversion process greatly reduces the time and effort of manual operations and improves work efficiency; data format conversion ensures that the traffic training data conforms to the preset time series format, facilitates subsequent data analysis and model training, and improves data quality and availability; in this way, it can be adjusted and optimized according to actual needs to meet the needs of logistics systems of different sizes and types.
[0049] See also Figure 3 , a third embodiment of the digital twin network traffic prediction method in the embodiment of the present invention includes:
[0050] 301. Determine whether there are missing values in the timestamp information, the flow value information, and the time-related information. If there are missing values, fill the missing values based on the interpolation method to obtain filling repair information;
[0051] 302. Determine whether there are abnormal values in the timestamp information, the flow value information, and the time-related information based on the box plot method. If there are abnormal values, correct or delete the abnormal values to obtain corrected information.
[0052] 303. Integrate the filling repair information and the correction information, and sort them based on a preset time series to obtain cleaned data.
[0053] In this embodiment, the integrity of timestamp information, flow value information and time-related information is ensured by interpolating and filling missing values, providing a more reliable basis for subsequent data analysis and processing; outliers are identified and processed by the box plot method, which can effectively remove noise and errors in the data, improve data quality, and reduce analysis deviations caused by outliers; the cleaned data is sorted by preset time series, thereby improving the efficiency of data processing and reducing the need for manual intervention; based on the cleaned data, users can understand the distribution and trend of the data more accurately, providing more powerful support for subsequent decision-making.
[0054] See also Figure 4 , the fourth embodiment of the digital twin network traffic prediction method in the embodiment of the present invention includes:
[0055] 401. Convert the timestamp information and time-related information in the cleaned data into a date and time format based on the to_datetime function to obtain converted data;
[0056] 402. Generate traffic time series graph based on matplotlib library and conversion data;
[0057] 403. Generate traffic training data based on the traffic time series graph.
[0058] In this embodiment, by converting the timestamp and time-related information into a unified date and time format based on the to_datetime function, data processing is made more convenient and efficient, avoiding processing errors and time-consuming due to inconsistent time formats; the traffic time series graph drawn by the matplotlib library and converted data can intuitively display the changing trend of traffic over time, help users quickly understand the fluctuation of traffic, and provide support for subsequent data analysis and decision-making; the traffic training data generated based on the traffic time series graph provides a reliable data foundation for subsequent data analysis and training of machine learning models, which helps to improve the accuracy and reliability of the model.
[0059] See also Figure 5 , the fifth embodiment of the digital twin network traffic prediction method in the embodiment of the present invention includes:
[0060] 501. Obtain an API interface of the TimeGPT time series model, and initialize the TimeGPT time series model through the API interface to obtain an initialized model;
[0061] 502. Obtain data type of traffic training data, and determine model parameters according to the data type;
[0062] 503. Initialize the network structure and training parameters of the model based on the model parameter settings to obtain a configuration model;
[0063] 504. Configure the API key for the configuration model to obtain the initialized model.
[0064] In this embodiment, by directly calling the API interface of the TimeGPT time series model, the model initialization can be completed quickly, which greatly saves development time and resources. At the same time, the model parameters are automatically determined according to the data type of the traffic training data, which improves the efficiency and accuracy of data processing; users can set the network structure and training parameters of the initialized model based on the model parameters according to actual needs, so as to obtain the configuration model that best suits the current task. This flexibility enables the model to better adapt to different application scenarios and data characteristics; configuring the API key for the configuration model ensures the security and legality of the model's use. Only users with the correct key can access and use the model, which effectively prevents the risk of unauthorized access and data leakage; through a sophisticated model initialization and configuration process, this method helps to improve the prediction accuracy and stability of the TimeGPT time series model. Accurate model parameters and suitable network structures can better capture the potential laws in time series data, thereby making more accurate predictions.
[0065] See also Figure 6 , the sixth embodiment of the digital twin network traffic prediction method in the embodiment of the present invention includes:
[0066] 601. Divide the traffic training data into a traffic training set and a traffic verification set based on a preset weight ratio;
[0067] 602. Iteratively train the basic prediction model using the traffic training set, and obtain prediction error data during the training process;
[0068] 603. Fine-tune the basic prediction model according to the prediction error data, and predict the prediction effect of the fine-tuned basic prediction model based on the loss function to obtain the basic prediction model with the best result;
[0069] 604. Verify the basic prediction model with the best result through the validation set to obtain the basic prediction model with the best performance as the traffic prediction model.
[0070] In this embodiment, by dividing the traffic training set and the validation set according to a preset weight ratio, the diversity and representativeness of the training data can be ensured, and the overfitting phenomenon can be reduced, thereby improving the accuracy of the traffic prediction model; by iterative training and fine-tuning the basic prediction model, and continuously adjusting the model parameters according to the prediction error data, the performance of the model can be gradually optimized, so that the prediction results are closer to the actual situation; through the above method, the model can be applied to different types of traffic prediction scenarios, and it is only necessary to adjust the preset weight ratio, training algorithm, loss function and other parameters according to actual needs, which has strong scalability and flexibility; by verifying the basic prediction model with the best result through the validation set, the reliability and stability of the model can be further verified, ensuring that good prediction effects can be achieved in practical applications.
[0071] See also Figure 7 , the seventh embodiment of the digital twin network traffic prediction method in the embodiment of the present invention includes:
[0072] 701. Obtain update events of the digital twin network of the logistics circulation center, and calculate the update regularity cycle according to the update events;
[0073] 702. Obtain updated flow data from the digital twin network of the logistics circulation center according to the update regular cycle, and perform data cleaning on the updated flow data to obtain updated training data;
[0074] 703. Update and train the traffic prediction model based on the incremental learning method and updated training data to obtain an updated traffic prediction model.
[0075] In this embodiment, by continuously monitoring the update events of the digital twin network of the logistics circulation center and calculating the update regularity cycle accordingly, the dynamic changes of the network can be captured in real time. Using these update information to incrementally learn the traffic prediction model can ensure that the model is always trained based on the latest data, thereby improving the accuracy and reliability of traffic prediction; through the incremental learning method, only the model needs to be fine-tuned with new updated training data to quickly adapt to changes in data distribution, thereby enhancing the adaptability and flexibility of the model; this method can help enterprises optimize resource allocation by accurately predicting traffic, such as reasonably scheduling transportation tools, optimizing warehouse storage, etc., thereby improving overall operational efficiency and reducing costs; real-time acquisition and processing of the update events of the digital twin network of the logistics circulation center enables enterprises to make more accurate decisions based on the latest data. This is of great significance for responding to emergencies, optimizing logistics routes, etc.; by improving the accuracy and real-time performance of traffic prediction, more accurate logistics information and services can be provided to users. For example, users can more accurately understand the arrival time and transportation status of goods, thereby improving user satisfaction and loyalty.
[0076] The above describes the digital twin network traffic prediction method in the embodiment of the present invention. The following describes the digital twin network traffic prediction device in the embodiment of the present invention. Figure 8 , an embodiment of a digital twin network traffic prediction device in an embodiment of the present invention includes:
[0077] The preprocessing module 801 is used to obtain the historical flow data of the digital twin network of the logistics flow center and preprocess the historical flow data to obtain flow training data;
[0078] Configuration module 802, used to build an initialization model based on the TimeGPT time series model, and configure parameters of the initialization model to obtain a basic prediction model;
[0079] The training module 803 is used to train the basic prediction model based on the traffic training data to obtain the traffic prediction model;
[0080] An updating module 804 is used to obtain updated flow data from the digital twin network of the logistics circulation center according to a preset period, and to update and train the flow prediction model according to the updated flow data to obtain an updated flow prediction model;
[0081] The prediction module 805 is used to obtain the real-time flow data of the digital twin network of the logistics flow center, and perform flow prediction based on the updated flow prediction model and real-time flow data to obtain the predicted flow results.
[0082] In this embodiment, the preprocessing module 801 can capture the time trend and periodic changes in the traffic data by acquiring and preprocessing historical traffic data, and the configuration module 802 and the training module 803 use the TimeGPT time series model to build and train the model, thereby improving the accuracy and reliability of traffic prediction; the update module 804 can ensure that the prediction model is always based on the latest traffic data for prediction by updating the traffic data, which is real-time data, so as to improve the real-time and accuracy of the prediction, prevent the traffic prediction model from overfitting, and enable the traffic prediction model to adapt to the traffic changes in the digital twin network of the logistics circulation center, including seasonal changes, emergencies, etc., so as to ensure the accuracy and effectiveness of the prediction; the prediction module 806 can better plan and manage resources through accurate traffic prediction, which helps to optimize resource allocation, improve logistics efficiency, and reduce operating costs; based on the predicted traffic results, the logistics circulation center can more accurately evaluate future traffic conditions, thereby making more reasonable decisions and plans, which helps to improve decision-making efficiency and accuracy and reduce decision-making risks.
[0083] See also Fig. 9 Another embodiment of the digital twin network traffic prediction device in the embodiment of the present invention includes:
[0084] The preprocessing module 801 is used to obtain the historical flow data of the digital twin network of the logistics flow center and preprocess the historical flow data to obtain flow training data;
[0085] Configuration module 802, used to build an initialization model based on the TimeGPT time series model, and configure parameters of the initialization model to obtain a basic prediction model;
[0086] The training module 803 is used to train the basic prediction model based on the traffic training data to obtain the traffic prediction model;
[0087] An updating module 804 is used to obtain updated flow data from the digital twin network of the logistics circulation center according to a preset period, and to update and train the flow prediction model according to the updated flow data to obtain an updated flow prediction model;
[0088] The prediction module 805 is used to obtain the real-time flow data of the digital twin network of the logistics flow center, and perform flow prediction based on the updated flow prediction model and real-time flow data to obtain the predicted flow results.
[0089] In this embodiment, in the first implementation method of the second aspect of the present invention, the preprocessing module 801 includes: a parsing unit 8011, which is used to obtain historical flow data from the digital twin network of the logistics flow center, and parse the historical flow data to obtain timestamp information, flow value information corresponding to the timestamp information, and time-related information; a cleaning unit 8012, which is used to clean the timestamp information, flow value information and time-related information respectively to obtain cleaned data; a conversion unit 8013, which is used to convert the format of the cleaned data according to a preset time series format to obtain flow training data.
[0090] In this embodiment, in a second implementation method of the second aspect of the present invention, the cleaning unit 8012 includes: a missing part 80121, which is used to determine whether there are missing values in the timestamp information, flow value information and time-related information. If there are missing values, the missing values are filled based on the interpolation method to obtain filled repair information; an abnormal part 80122, which is used to determine whether there are abnormal values in the timestamp information, flow value information and time-related information based on the box plot method. If there are abnormal values, the abnormal values are corrected or deleted to obtain corrected information; an integration part 80123, which is used to integrate the filled repair information and the corrected information, and sort them based on a preset time series to obtain cleaned data.
[0091] In this embodiment, in a third implementation method of the second aspect of the present invention, the conversion unit 8013 includes: a conversion unit 80131, which is used to convert the timestamp information and time-related information in the cleaned data into a date and time format based on the to_datetime function to obtain converted data; a drawing unit 80132, which is used to draw and generate a traffic time series graph based on the matplotlib library and the converted data; a generating unit 80133, which is used to generate traffic training data based on the traffic time series graph.
[0092] In this embodiment, in the fourth implementation method of the second aspect of the present invention, the configuration module 802 includes: an initialization unit 8021, which is used to obtain the API interface of the TimeGPT time series model, and initialize the TimeGPT time series model through the API interface to obtain the initialized model; a parameter unit 8022, which is used to obtain the data type of the traffic training data, and determine the model parameters according to the data type; a configuration unit 8023, which is used to set the network structure and training parameters of the initialized model based on the model parameters to obtain the configured model; a key unit 8024, which is used to configure the API key for the configured model to obtain the initialized model.
[0093] In this embodiment, in the fifth implementation method of the second aspect of the present invention, the training module 803 includes: a division unit 8031, which is used to divide the traffic training data into a traffic training set and a traffic verification set based on a preset weight ratio; an iteration unit 8032, which is used to iteratively train the basic prediction model through the traffic training set, and obtain prediction error data during the training process; a fine-tuning unit 8033, which is used to fine-tune the basic prediction model according to the prediction error data, and predict the prediction effect of the fine-tuned basic prediction model based on the loss function to obtain the basic prediction model with the best result; a verification unit 8034, which is used to verify the basic prediction model with the best result through the verification set to obtain the basic prediction model with the best performance as the traffic prediction model.
[0094] In this embodiment, in the sixth implementation method of the second aspect of the present invention, the update module 804 includes: a period unit 8041, which is used to obtain update events of the digital twin network of the logistics circulation center, and calculate the update regular period based on the update events; a filtering unit 8042, which is used to obtain updated flow data from the digital twin network of the logistics circulation center according to the update regular period, and perform data cleaning on the updated flow data to obtain updated training data; an update unit 8043, which is used to update the flow prediction model based on the incremental learning method and the updated training data to obtain an updated flow prediction model.
[0095] above Figure 8 and Fig. 9 The digital twin network traffic prediction device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The digital twin network traffic prediction device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0096] Fig.10It is a structural schematic diagram of a digital twin network traffic prediction device provided by an embodiment of the present invention. The digital twin network traffic prediction device 900 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 910 (for example, one or more processors) and a memory 920, and one or more storage media 930 (for example, one or more massive storage devices) storing application programs 933 or data 932. Among them, the memory 920 and the storage medium 930 can be short-term storage or persistent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the digital twin network traffic prediction device 900. Furthermore, the processor 910 can be configured to communicate with the storage medium 930, and execute a series of instruction operations in the storage medium 930 on the digital twin network traffic prediction device 900 to implement the steps of the digital twin network traffic prediction method provided by the above-mentioned method embodiments.
[0097] The digital twin network traffic prediction device 900 may also include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input and output interfaces 960, and / or one or more operating systems 931, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Fig.10 The digital twin network traffic prediction device structure shown does not constitute a limitation of the digital twin network traffic prediction device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0098] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the digital twin network traffic prediction method.
[0099] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0100] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0101] Finally, it should be noted that the above description is only a preferred example of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A digital twin network traffic prediction method, characterized in that: include: Obtain historical traffic data of the digital twin network of the logistics flow center and preprocess the historical traffic data to obtain traffic training data; Build an initialization model based on the TimeGPT time series model and configure the parameters of the initialization model to obtain a basic prediction model; The basic prediction model is trained based on the traffic training data to obtain a traffic prediction model; Obtain updated traffic data from the digital twin network of the logistics flow center according to a preset period, and update and train the traffic prediction model based on the updated traffic data to obtain an updated traffic prediction model; Obtain real-time traffic data of the digital twin network of the logistics flow center, and perform traffic forecasting based on the updated traffic forecasting model and real-time traffic data to obtain predicted traffic results.
2. The digital twin network traffic prediction method according to claim 1 is characterized in that: The obtaining of historical flow data of the digital twin network of the logistics circulation center and preprocessing of the historical flow data to obtain flow training data include: Obtain historical flow data from the digital twin network of the logistics flow center, and parse the historical flow data to obtain timestamp information, flow value information corresponding to the timestamp information, and time-related information; Perform data cleaning on the timestamp information, flow value information and time-related information respectively to obtain cleaned data; The cleaned data is formatted according to a preset time series format to obtain flow training data.
3. The digital twin network traffic prediction method according to claim 2 is characterized in that: The data cleaning of the timestamp information, the flow value information and the time-related information is performed respectively to obtain cleaned data, including: Determine whether there are missing values in the timestamp information, flow value information and time-related information. If there are missing values, fill the missing values based on the interpolation method to obtain filling repair information; Based on the box plot method, it is determined whether there are abnormal values in the timestamp information, the flow value information and the time-related information. If there are abnormal values, the abnormal values are corrected or deleted to obtain corrected information; The filling repair information and the correction information are integrated and sorted based on a preset time series to obtain cleaned data.
4. The digital twin network traffic prediction method according to claim 2 is characterized in that: The format conversion of the cleaned data according to the preset time series format to obtain the flow training data includes: Based on the to_datetime function, the timestamp information and time-related information in the cleaned data are converted into date and time format to obtain converted data; Generate traffic time series graph based on matplotlib library and converted data; Generate traffic training data based on traffic time series graph.
5. The digital twin network traffic prediction method according to claim 1 is characterized in that: The initialization model is constructed based on the TimeGPT time series model, and parameters of the initialization model are configured to obtain a basic prediction model, including: Obtain the API interface of the TimeGPT time series model, and initialize the TimeGPT time series model through the API interface to obtain an initialized model; Obtain the data type of the traffic training data and determine the model parameters according to the data type; Initialize the network structure and training parameters of the model based on the model parameter settings to obtain the configuration model; Configure the API key for the configuration model to get the initialized model.
6. The digital twin network traffic prediction method according to claim 1 is characterized in that: The training process of the basic prediction model based on the traffic training data to obtain the traffic prediction model includes: The traffic training data is divided into a traffic training set and a traffic verification set based on a preset weight ratio; Iteratively train the basic prediction model through the traffic training set and obtain the prediction error data during the training process; Fine-tune the basic prediction model according to the prediction error data, and predict the prediction effect of the fine-tuned basic prediction model based on the loss function to obtain the basic prediction model with the best result; The basic prediction model with the best result is verified through the validation set to obtain the basic prediction model with the best performance as the traffic prediction model.
7. The digital twin network traffic prediction method according to claim 1 is characterized in that: The method of obtaining updated flow data from the digital twin network of the logistics circulation center according to a preset period, and updating and training the flow prediction model according to the updated flow data to obtain an updated flow prediction model includes: Obtain update events of the digital twin network of the logistics circulation center, and calculate the update regularity cycle based on the update events; Obtain updated traffic data from the digital twin network of the logistics flow center according to the update regularity cycle, and clean the updated traffic data to obtain updated training data; The traffic prediction model is updated and trained based on the incremental learning method and updated training data to obtain an updated traffic prediction model.
8. A digital twin network traffic prediction device, characterized in that: include: The preprocessing module is used to obtain the historical flow data of the digital twin network of the logistics flow center and preprocess the historical flow data to obtain flow training data; The configuration module is used to build an initialization model based on the TimeGPT time series model and configure the parameters of the initialization model to obtain a basic prediction model; A training module, used for training the basic prediction model based on the traffic training data to obtain a traffic prediction model; An updating module is used to obtain updated flow data from the digital twin network of the logistics circulation center according to a preset period, and to update and train the flow prediction model according to the updated flow data to obtain an updated flow prediction model; The prediction module is used to obtain the real-time flow data of the digital twin network of the logistics flow center, and perform flow prediction based on the updated flow prediction model and real-time flow data to obtain the predicted flow results.
9. A digital twin network traffic prediction device, characterized in that: The digital twin network traffic prediction device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors calls the instructions in the memory so that the digital twin network traffic prediction device performs each step of the digital twin network traffic prediction method as described in any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by the processor, each step of the digital twin network traffic prediction method as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Multilayer superposition delay correction method and system based on digital twinning
CN119788231A
Petroleum collection simulation system based on digital twin technology and processing method thereof
CN120974934A