Delivery quantity prediction method and device, computer equipment and storage medium
By acquiring and analyzing the characteristic information and historical transportation data of the logistics site and selecting appropriate prediction models, the problem of low traditional prediction accuracy is solved, and the accuracy of delivery volume prediction and the optimization ability of transportation resources are improved.
Patent Information
- Application Number
- CN202311063041.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-22
- Publication Date
- 2025-02-28
AI Technical Summary
Traditional logistics companies use experience to predict the number of shipments of the site, resulting in low prediction accuracy and inability to optimize the resource scheduling of transportation tools.
By obtaining the date characteristic information of the time to be predicted, the site characteristic information of the target site and the historical logistics and transportation data sequence, select a suitable delivery volume prediction model, and enter relevant information to predict the delivery volume.
It improves the accuracy of shipment volume prediction, combines historical and future characteristics, and is suitable for different logistics sites, and enhances the optimization ability of transportation resource scheduling.
Smart Images

Figure CN119539643A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of logistics, and specifically to a method, device, computer equipment and storage medium for predicting shipment volume, wherein the storage medium is a computer-readable storage medium. Background Art
[0002] With the steady development of my country's economy and the rapid growth of the logistics market, the volume of express parcels has repeatedly hit new highs, which has also brought increasing challenges to the planning and pre-arrangement of logistics resources. Accurately predicting the volume of parcels shipped at a site in advance is crucial in the scheduling of transportation resources, which can avoid problems such as waste of transportation resources or logistics delays caused by insufficient transportation. Traditional logistics companies rely on staff to predict the volume of parcels shipped at a site based on past experience. This method predicts the volume of parcels shipped in a low accuracy and cannot optimize the scheduling of transportation resources. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus, computer device and storage medium for predicting the amount of mail sent, which can improve the accuracy of the prediction of the amount of mail sent.
[0004] The present application provides a method for predicting the amount of mail sent, including:
[0005] Obtain date characteristic information of the time to be predicted, as well as site characteristic information of the target site and historical logistics transportation data sequence;
[0006] Selecting a target shipment volume prediction model according to site characteristic information of the target site;
[0007] Input the date characteristic information, site characteristic information and historical logistics transportation data sequence into the target shipment volume prediction model;
[0008] The target shipment volume prediction model is used to predict the shipment volume of the target site at the time to be predicted.
[0009] Accordingly, an embodiment of the present application further provides a device for predicting the shipment volume, including:
[0010] An acquisition unit, used to acquire date characteristic information of the time to be predicted, as well as site characteristic information of the target site and a historical logistics transportation data sequence;
[0011] A selection unit, configured to select a target shipment volume prediction model according to site characteristic information of the target site;
[0012] An input unit, used to input the date characteristic information, site characteristic information and historical logistics transportation data sequence into the target shipment volume prediction model;
[0013] The prediction unit is used to predict the shipment volume of the target site at the time to be predicted by using the target shipment volume prediction model.
[0014] In one embodiment, the historical logistics transportation data sequence includes logistics transportation data of a first past time period, the shipment volume includes at least the shipment volume predicted at different times, and the prediction unit includes:
[0015] A data acquisition subunit, used for periodically acquiring updated logistics and transportation data in a time period between the first time and the time to be predicted;
[0016] An updating subunit, used for updating the historical logistics and transportation data sequence based on the updated logistics and transportation data to obtain an updated historical logistics and transportation data sequence;
[0017] The dynamic prediction subunit is used to perform dynamic prediction based on the updated historical logistics transportation data sequence to obtain the shipment volume of the target site at the time to be predicted.
[0018] In one embodiment, the device for predicting the number of shipments further includes:
[0019] An extraction unit, used to extract site characteristics of the logistics site and obtain site characteristic information of each logistics site;
[0020] A clustering unit, used for performing clustering processing according to site characteristic information of each logistics site to obtain at least one site cluster;
[0021] The training unit is used to train the corresponding shipment volume prediction model for each site cluster according to the site characteristic information of the logistics sites in the site cluster.
[0022] In one embodiment, the extraction unit comprises:
[0023] A feature extraction subunit, used to extract features from the sites to obtain candidate site feature information of each site;
[0024] A construction subunit is used to construct a logistics network according to the route relationship between the sites, wherein the nodes in the logistics network represent the sites and the edges represent the logistics routes between the nodes;
[0025] A determination subunit, configured to determine the associated sites of each logistics site based on the logistics routes between the nodes in the logistics network;
[0026] The fusion subunit is used to perform feature fusion processing on the candidate feature information of each logistics site and the candidate feature information of the associated sites to obtain the site feature information of each logistics site.
[0027] In one embodiment, determining a subunit includes:
[0028] A first node extraction module is used to extract, for each logistics site, nodes connected to a target node corresponding to the logistics site through edges from the logistics network to obtain first-order neighbor nodes of the target node;
[0029] A second node extraction module is used to extract nodes connected to the first-order neighbor nodes through edges from the logistics network to obtain second-order neighbor nodes of the target node;
[0030] The associated venue determination module is used to obtain associated venues according to the first-order neighbor nodes and the second-order neighbor nodes.
[0031] In one embodiment, the associated venue determination module includes:
[0032] A selection submodule, used to select a target first-order neighbor node according to the distance information of the edge between the target node and the first-order neighbor node;
[0033] A screening submodule, used for screening a target second-order neighbor node connected to the target first-order neighbor node from the second-order neighbor nodes;
[0034] A setting submodule is used to set the venues corresponding to the target first-order neighbor node and the target second-order neighbor node as the associated venues.
[0035] In one embodiment, the training unit comprises:
[0036] The sample acquisition subunit is used to obtain training sample data sets corresponding to different site clusters, each training sample data set includes sites belonging to the corresponding site cluster, as well as site feature information and historical logistics and transportation data sequences corresponding to each site;
[0037] The model training subunit is used to train a preset candidate shipment volume prediction model based on the training sample data set for each different venue cluster, so as to obtain a shipment volume prediction model corresponding to each venue cluster.
[0038] Correspondingly, an embodiment of the present application also provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any one of the shipment volume prediction methods provided in the embodiments of the present application.
[0039] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, which is used to store a computer program, and the computer program is loaded by a processor to execute any one of the shipment volume prediction methods provided in the embodiments of the present application.
[0040] The embodiment of the present application obtains date characteristic information of the time to be predicted, as well as site characteristic information of the target site and a historical logistics and transportation data sequence; selects a target shipment volume prediction model according to the site characteristic information of the target site; inputs the date characteristic information, site characteristic information and the historical logistics and transportation data sequence into the target shipment volume prediction model; and predicts the shipment volume of the target site at the time to be predicted through the target shipment volume prediction model. The embodiment of the present application not only predicts the shipment volume based on the historical data sequence, but also combines the known features of the future and the site features, that is, integrates the historical features and the future features, which can improve the prediction accuracy, and uses different shipment volume prediction models for different logistics sites to predict the shipment volume, which can further improve the prediction accuracy of the shipment volume. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 is a flow chart of a method for predicting the amount of shipments provided in an embodiment of the present application;
[0043] Figure 2 is another flow chart of the method for predicting the shipment volume provided by an embodiment of the present application;
[0044] Figure 3 The method for predicting the number of shipments provided in the embodiment of the present application;
[0045] Figure 4 It is a schematic diagram of a device for predicting the shipment volume provided in an embodiment of the present application;
[0046] Figure 5 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0048] The embodiment of the present application provides a method, device, computer equipment and computer readable storage medium for predicting the number of mails sent. The device for predicting the number of mails sent can be integrated in a computer equipment, which can be a server or a terminal.
[0049] Among them, the terminal may include a mobile phone, a wearable smart device, a tablet computer, a laptop computer, a personal computer (PC), and a vehicle-mounted computer, etc. The terminal may also be a test device in an embodiment of the present application.
[0050] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.
[0051] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0052] This embodiment will be described from the perspective of a device for predicting the number of mails sent. The device for predicting the number of mails sent may be integrated into a computer device, which may be a server or a terminal. Figure 1 As shown, the process of the shipment volume prediction method provided by this application is as follows:
[0053] 101. Obtain date characteristic information of the time to be predicted, and obtain site characteristic information of the target site and a historical logistics transportation data sequence.
[0054] The time to be predicted is the time when the shipment volume needs to be predicted, which can be a certain day or a certain time, for example, April 1st or August 2nd at 4 p.m.
[0055] The time to be predicted can be considered as future time, and the date feature information may include the date features of the time to be predicted. For example, the date feature information may include the day of this month, the day of this week, whether it is a weekend, a holiday, a shopping festival, etc. Therefore, the date feature information is the known feature information of the future time. Based on the known feature information of the future time, the shipment volume in the future time can be predicted more accurately.
[0056] The target site is a site with a predicted shipment volume, which may be a logistics site that supports cargo rotation and processing, through which cargo can be transported to all parts of the world.
[0057] The site feature information is information that characterizes the features of the target site, for example, a feature vector, a feature matrix, or a feature embedding.
[0058] The historical logistics and transportation data sequence may include logistics and transportation data corresponding to different times before the time to be predicted. For example, it may be logistics and transportation data corresponding to different times before receiving a request to predict the shipment volume of the target site at the time to be predicted. For example, if the time to be predicted is 17:00 on April 7, then the historical transportation data sequence may include the shipment volume of each shift before 17:00 on April 7, or the shipment volume of each day.
[0059] Logistics and transportation data may include vehicle-in-transit information of vehicles departing from the target site. The vehicle-in-transit information may include the actual number of pieces shipped, actual weight, dispatch frequency of outlets, and frequency date of the vehicles in transit.
[0060] Different dispatching shifts are set for different sites. For example, multiple shifts may be set every day, or one shift per day, one shift per two days, etc. The to-be-predicted time may indicate the to-be-predicted shift of the target site.
[0061] For example, when a prediction request for the shipment volume of a target site at a predicted time is received, date feature information may be obtained according to the date corresponding to the predicted time, site feature information of the target site, and a historical logistics transportation data sequence.
[0062] 102. Select a target shipment volume prediction model based on site characteristic information of the target site.
[0063] For example, different shipment volume prediction models may be used to predict different types of venues, and a corresponding target shipment volume prediction model may be selected based on the venue characteristic information of the target venue.
[0064] In one embodiment, the sites in the logistics system may be clustered to classify the sites to obtain at least two clusters, and a shipment volume model used by the sites in each cluster is set for prediction, that is, before the step of "selecting a target shipment volume prediction model according to site feature information of the target site", the shipment volume prediction method provided in the embodiment of the present application may specifically include:
[0065] Extract site characteristics of logistics sites to obtain site characteristic information of each logistics site;
[0066] Perform clustering processing according to the site characteristic information of each logistics site to obtain at least one site cluster;
[0067] For each site cluster, the corresponding shipment volume prediction model is trained according to the site characteristic information of the logistics sites in the site cluster.
[0068] For example, for each logistics site, the geographical location information, historical shipment volume, site code and other information of the logistics site may be obtained, and then feature extraction may be performed to obtain site feature information of each logistics site.
[0069] A clustering algorithm can be used to perform clustering processing based on the site feature information of each logistics site to obtain at least one site cluster, which includes different logistics sites. Each site cluster can correspond to a shipment volume prediction model.
[0070] The clustering algorithm may be, for example, the Faiss clustering algorithm, the K-means clustering algorithm, or the like.
[0071] For each site cluster, a corresponding shipment volume prediction model can be trained to predict the shipment volume of the logistics sites in the site cluster, that is, each site cluster corresponds to a shipment volume prediction model, the site cluster where the target site is located is determined, and the shipment volume prediction model corresponding to the site cluster where the target site is located is set as the target shipment volume prediction model for predicting the shipment volume of the target site.
[0072] The shipment volume prediction model corresponding to each site cluster may be obtained by training based on the training sample data set corresponding to each site cluster. That is, in one embodiment, the step of "training the corresponding shipment volume prediction model for each site cluster based on the site characteristic information of the logistics sites in the site cluster" may specifically include:
[0073] Obtain training sample data sets corresponding to different site clusters, each training sample data set includes sites belonging to the corresponding site cluster, as well as site feature information and historical logistics and transportation data sequences corresponding to each site;
[0074] For each training sample data set of different venue clusters, a preset candidate shipment volume prediction model is trained through the training sample data set to obtain a shipment volume prediction model corresponding to each venue cluster.
[0075] For example, training sample data sets corresponding to different site clusters are obtained, each training sample data set contains the sites belonging to the corresponding site cluster, as well as site feature information and historical logistics transportation data sequences corresponding to each site; for the training sample data sets of each different site cluster, the preset candidate shipment volume prediction model is trained through the training sample data sets to obtain the shipment volume prediction model corresponding to each site cluster.
[0076] Since a logistics site may be used as a transit site, the goods shipped from its associated physical site are transited at the logistics site and shipped from the logistics site. Therefore, the shipment volume of each logistics site is not only related to the volume of goods that need to be transported at its location, but also related to the shipment volume of its associated logistics site. The characteristics of other sites can be integrated into the feature information of the site, so that the expression of the site feature information is more accurate, thereby improving the accuracy of the shipment volume prediction. That is, in one embodiment, the step of "extracting site features from the site to obtain site feature information of each site" can specifically include:
[0077] Extracting features of the sites to obtain feature information of candidate sites for each site;
[0078] A logistics network is constructed based on the route relationship between sites. In the logistics network, nodes represent sites and edges represent logistics routes between nodes.
[0079] Determine the associated sites of each logistics site based on the logistics routes between nodes in the logistics network;
[0080] For each logistics site, feature fusion processing is performed on the candidate feature information of the site and the candidate feature information of the associated sites to obtain the site feature information of each logistics site.
[0081] Among them, the logistics network can be a graph structure data. The nodes in the logistics network represent logistics sites, and the edges connecting the nodes indicate that there are logistics routes between the corresponding two logistics sites. During the logistics transportation process, the logistics may be transported from the logistics site corresponding to one node to the logistics site corresponding to another node.
[0082] For example, a logistics network can be constructed based on the route relationship between logistics sites, so that the associated sites corresponding to each logistics site can be determined based on the logistics network. For the target site, the target node corresponding to the target site can be determined from the logistics network, and then the node connected to the target node through the edge can be determined, and then the logistics site corresponding to the node is used as the associated site of the target site.
[0083] For each logistics site, the candidate feature information of the logistics site and the candidate feature information of its associated sites may be subjected to feature fusion processing to obtain site feature information of each logistics site.
[0084] For a node in a logistics network, the nodes that are directly connected to the node through edges can be called the first-order neighbor nodes of the node, and the nodes that are directly connected to the first-order neighbor nodes through edges can be considered as the second-order neighbor nodes of the node. By analogy, the first-order neighbor nodes, second-order neighbor nodes, third-order neighbor nodes, etc. of a node can be determined in the logistics network, and the associated nodes can be determined from the neighbor nodes of different orders. For example, a hierarchical range can be preset, and the associated nodes can be determined according to the nodes within the hierarchical range. Assuming the preset hierarchical range is third order, the first-order neighbor nodes, second-order neighbor nodes, and third-order neighbor nodes of a node can be used as associated nodes.
[0085] In another embodiment, the neighbor nodes may be determined based on the first-order neighbor nodes and the second-order neighbor nodes. That is, in one embodiment, the step of “determining the associated sites of each logistics site based on the logistics routes between the nodes in the logistics network” includes:
[0086] For each logistics site, extract the nodes connected to the target node corresponding to the logistics site through edges from the logistics network to obtain the first-order neighbor nodes of the target node;
[0087] Extract nodes connected to first-order neighbor nodes through edges from the logistics network to obtain second-order neighbor nodes of the target node;
[0088] The associated sites are obtained according to the first-order neighbor nodes and the second-order neighbor nodes.
[0089] For example, for each logistics site, determine the target node corresponding to the logistics site in the logistics network, and then obtain the first-order neighbor nodes and second-order neighbor nodes of the target node from the logistics network, and use the logistics sites corresponding to the first-order neighbor nodes and second-order neighbor nodes as associated sites.
[0090] Optionally, some neighbor nodes can be selected as associated nodes, for example, Figure 2 As shown, the first-order neighbor nodes can be randomly sampled, and some first-order neighbor nodes can be selected from them to obtain the target first-order neighbor nodes ( Figure 2 The target first-order neighbor node and the second-order neighbor nodes connected to the target first-order neighbor node among the second-order neighbor nodes (the gray nodes in the circle with k=2 in the figure) are taken as associated nodes, and the logistics sites corresponding to the associated nodes are the associated sites.
[0091] In addition, an edge in a logistics network may represent a logistics route between two nodes, and an edge may also include distance information between the two nodes. The distance information may represent the length of the logistics route, or the straight-line distance between the two nodes, etc., and an associated node may be selected based on the distance information. That is, in one embodiment, the step of "obtaining an associated site based on the first-order neighbor nodes and the second-order neighbor nodes" may specifically include:
[0092] Select the target first-order neighbor node according to the distance information between the target node and the first-order neighbor node;
[0093] Select target second-order neighbor nodes connected to the target first-order neighbor nodes from the second-order neighbor nodes;
[0094] The sites corresponding to the target first-order neighbor node and the target second-order neighbor node are set as associated sites.
[0095] For example, the distance information can be sorted, and the first-order neighbor nodes with closer distances are selected as the target first-order neighbor nodes according to the sorted distance information. The number of target first-order neighbor nodes is selected based on a preset number threshold, or is determined according to a threshold ratio, for example, 5 first-order neighbor nodes are selected, or 30% of the first-order neighbor nodes are selected, etc.
[0096] A node directly connected to the target first-order neighbor node is selected from the second-order neighbor nodes, namely the target second-order neighbor, and the venues corresponding to the target first-order neighbor node and the target second-order neighbor node are taken as associated venues.
[0097] 103. Input date characteristic information, site characteristic information and historical logistics transportation data sequence into the target shipment volume prediction model.
[0098] Among them, the target shipment volume prediction model can be a Temporal Fusion Transformer (TFT) model, in which date feature information is used as future known features, site feature information is used as static feature information, and historical logistics and transportation data is used as time series feature information to input into the TFT model to predict the shipment volume.
[0099] Optionally, the target shipment volume model may also be a model such as LightGBM, XGBOOST, etc. that can predict future observations or trends based on time series features.
[0100] For example, date feature information, site feature information, and historical logistics and transportation data sequences are input into a target shipment volume prediction model. In one embodiment, the network structure of the target shipment volume prediction model may include a first LSTM encoder, a second LSTM encoder, and a static variable encoder. The date feature information is input into the second LSTM encoder, the site feature information is input into the static variable encoder, and the historical logistics and transportation data sequences are input into the second LSTM encoder.
[0101] 104. The target shipment volume prediction model is used to predict the shipment volume of the target site at the predicted time.
[0102] The target shipment volume prediction model is used to predict the shipment volume of the target site at the predicted time.
[0103] Optionally, the historical logistics and transportation data sequence may be dynamic data, and the shipment volume predicted by the target shipment volume prediction model may also be dynamic data. The historical logistics and transportation data sequence may be updated over time, so that the target shipment volume model dynamically predicts the shipment volume. That is, in one embodiment, the historical logistics and transportation data sequence includes logistics and transportation data of a past time period of a first time, and the shipment volume at least includes the shipment volume predicted at different times. The shipment volume of the target site at the time to be predicted is predicted by the target shipment volume prediction model, which may include:
[0104] Periodically obtain updated logistics and transportation data during the time period between the first time and the time to be predicted;
[0105] Based on the updated logistics and transportation data, the historical logistics and transportation data sequence is updated to obtain an updated historical logistics and transportation data sequence;
[0106] Dynamic prediction is performed based on the updated historical logistics and transportation data series to obtain the shipment volume of the target site at the predicted time.
[0107] The first time is the time when a request for predicting the shipment volume of the target site may be received, and the historical logistics and transportation data sequence includes logistics and transportation data in a time period past the first time.
[0108] For example, if the departure schedule indicated by the to-be-predicted time is the next departure schedule of the first time, then the shipment volume at the to-be-predicted time can be predicted based on the historical logistics transportation data sequence.
[0109] If there are other departure shifts before the departure shift indicated by the predicted time after the first time, the shipment volume at the predicted time can be predicted by the target shipment volume prediction model.
[0110] The logistics and transportation data corresponding to other departure shifts before the predicted time are periodically obtained, and the historical logistics and transportation data sequence is updated. The target shipment volume model is used to predict the shipment volume at the predicted time based on the updated historical logistics and transportation data sequence. That is, the prediction of the target shipment volume prediction model is dynamic.
[0111] For example, the first time is A, and the predicted time indicates the departure shift F. After A and before F, there are departure shifts B, C, D and E. Then, the shipment volume can be predicted based on the historical logistics and transportation data sequence. After departure shift B departs, the historical logistics and transportation data sequence is updated according to the logistics and transportation data of shift B, and then the target shipment volume prediction model is input to predict the shipment volume. After departure shift C departs, the logistics and transportation data sequence based on the updated logistics and transportation data of departure shift B is updated again, and the shipment volume is predicted again through the target shipment volume model... In this way, dynamic prediction of shipment volume can be achieved.
[0112] In one embodiment, the number of shipments in transit corresponding to the vehicle logo in the first 1 / 3 / 6 hours before the time to be predicted and the actual shipment volume at the time to be predicted are as follows: Figure 3 As shown, Figure 3 Curve 1 in the middle represents the actual shipment volume, and curve 2 represents the shipment volume of the vehicle logo in transit. The shipment volume of the vehicle logo in transit is the sum of the actual shipment volume in the vehicle logo in transit information of the vehicles that departed in the previous 1 / 3 / 6 hours. It can be seen that the total number of shipments of the vehicle logo in transit increases with time and approaches the actual shipment volume at the time to be predicted. Therefore, it can be inferred that the relationship between the predicted shipment volume at the time to be predicted and the shipment volume in transit is y≈σX t , where σ is the attenuation coefficient. Therefore, in the embodiment of the present application, the shipment volume can be dynamically predicted based on the dynamic historical transportation data sequence, and the prediction results become more and more accurate as time goes by.
[0113] As can be seen from the above, the embodiment of the present application obtains the date characteristic information of the time to be predicted, and obtains the site characteristic information of the target site and the historical logistics and transportation data sequence; selects the target shipment volume prediction model according to the site characteristic information of the target site; inputs the date characteristic information, site characteristic information and the historical logistics and transportation data sequence into the target shipment volume prediction model; and predicts the shipment volume of the target site at the time to be predicted through the target shipment volume prediction model. In the embodiment of the present application, not only the shipment volume is predicted based on the historical data sequence, but also the known features of the future and the site features are combined, that is, the historical features and the future features are integrated, which can improve the prediction accuracy, and different shipment volume prediction models are used for shipment volume prediction for different logistics sites, which can further improve the prediction accuracy of the shipment volume.
[0114] In order to facilitate better implementation of the method for predicting the number of shipments provided in the embodiment of the present application, a device for predicting the number of shipments is also provided in one embodiment. The meanings of the terms are the same as those in the above-mentioned method for predicting the number of shipments, and the specific implementation details can refer to the description in the method embodiment.
[0115] The shipment volume prediction device can be integrated into a computer device, such as Figure 4As shown, the shipment volume prediction device may include: an acquisition unit 301, a selection unit 302, an input unit 303 and a prediction unit 304, which are specifically as follows:
[0116] The acquisition unit 301 is used to acquire date characteristic information of the time to be predicted, and to acquire site characteristic information of the target site and a historical logistics transportation data sequence.
[0117] The selection unit 302 is configured to select a target shipment volume prediction model according to the site characteristic information of the target site.
[0118] The input unit 303 is used to input the date characteristic information, site characteristic information and historical logistics transportation data sequence into the target shipment volume prediction model.
[0119] The prediction unit 304 is configured to predict the shipment volume of the target site at the time to be predicted by using the target shipment volume prediction model.
[0120] In one embodiment, the historical logistics transportation data sequence includes logistics transportation data of a first past time period, the shipment volume includes at least the shipment volume predicted at different times, and the prediction unit 304 includes:
[0121] A data acquisition subunit, used for periodically acquiring updated logistics and transportation data in a time period between the first time and the time to be predicted;
[0122] An updating subunit, used for updating the historical logistics and transportation data sequence based on the updated logistics and transportation data to obtain an updated historical logistics and transportation data sequence;
[0123] The dynamic prediction subunit is used to perform dynamic prediction based on the updated historical logistics transportation data sequence to obtain the shipment volume of the target site at the time to be predicted.
[0124] In one embodiment, the device for predicting the number of shipments further includes:
[0125] An extraction unit, used to extract site characteristics of the logistics site and obtain site characteristic information of each logistics site;
[0126] A clustering unit, used for performing clustering processing according to site characteristic information of each logistics site to obtain at least one site cluster;
[0127] The training unit is used to train the corresponding shipment volume prediction model for each site cluster according to the site characteristic information of the logistics sites in the site cluster.
[0128] In one embodiment, the extraction unit comprises:
[0129] A feature extraction subunit, used to extract features from the sites to obtain candidate site feature information of each site;
[0130] A construction subunit is used to construct a logistics network according to the route relationship between the sites, wherein the nodes in the logistics network represent the sites and the edges represent the logistics routes between the nodes;
[0131] A determination subunit, configured to determine the associated sites of each logistics site based on the logistics routes between the nodes in the logistics network;
[0132] The fusion subunit is used to perform feature fusion processing on the candidate feature information of each logistics site and the candidate feature information of the associated sites to obtain the site feature information of each logistics site.
[0133] In one embodiment, determining a subunit includes:
[0134] A first node extraction module is used to extract, for each logistics site, nodes connected to a target node corresponding to the logistics site through edges from the logistics network to obtain first-order neighbor nodes of the target node;
[0135] A second node extraction module is used to extract nodes connected to the first-order neighbor nodes through edges from the logistics network to obtain second-order neighbor nodes of the target node;
[0136] The associated venue determination module is used to obtain associated venues according to the first-order neighbor nodes and the second-order neighbor nodes.
[0137] In one embodiment, the associated venue determination module includes:
[0138] A selection submodule, used to select a target first-order neighbor node according to the distance information of the edge between the target node and the first-order neighbor node;
[0139] A screening submodule, used for screening a target second-order neighbor node connected to the target first-order neighbor node from the second-order neighbor nodes;
[0140] A setting submodule is used to set the venues corresponding to the target first-order neighbor node and the target second-order neighbor node as the associated venues.
[0141] In one embodiment, the training unit comprises:
[0142] The sample acquisition subunit is used to obtain training sample data sets corresponding to different site clusters, each training sample data set includes sites belonging to the corresponding site cluster, as well as site feature information and historical logistics and transportation data sequences corresponding to each site;
[0143] The model training subunit is used to train a preset candidate shipment volume prediction model based on the training sample data set for each different venue cluster, so as to obtain a shipment volume prediction model corresponding to each venue cluster.
[0144] As can be seen from the above, the shipment volume prediction device of the embodiment of the present application obtains the date characteristic information of the time to be predicted, and obtains the site characteristic information of the target site and the historical logistics and transportation data sequence through the acquisition unit 301; the selection unit 302 selects the target shipment volume prediction model according to the site characteristic information of the target site; the input unit 303 inputs the date characteristic information, site characteristic information and the historical logistics and transportation data sequence into the target shipment volume prediction model; the prediction unit 304 predicts the shipment volume of the target site at the time to be predicted through the target shipment volume prediction model. In the embodiment of the present application, not only the shipment volume is predicted based on the historical data sequence, but also the known features and site features of the future are combined, that is, the historical features and future features are integrated, which can improve the prediction accuracy, and different shipment volume prediction models are used for shipment volume prediction for different logistics sites, which can further improve the prediction accuracy of the shipment volume.
[0145] The present application also provides a computer device, which may be a terminal or a server. Figure 5 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:
[0146] The computer device may include components such as a processor 1001 with one or more processing cores, a memory 1002 with one or more computer-readable storage media, a power supply 1003, and an input unit 1004. Those skilled in the art will appreciate that Figure 5 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0147] The processor 1001 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 1002 and calling data stored in the memory 1002, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and computer programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1001.
[0148] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
[0149] The computer device also includes a power supply 1003 for supplying power to various components. Preferably, the power supply 1003 can be logically connected to the processor 1001 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 1003 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0150] The computer device may further include an input unit 1004, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0151] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically, in this embodiment, the processor 1001 in the computer device will load the executable files corresponding to the processes of one or more computer programs into the memory 1002 according to the following instructions, and the processor 1001 will run the computer programs stored in the memory 1002, thereby realizing various functions, as follows:
[0152] Obtain date characteristic information of the time to be predicted, as well as site characteristic information of the target site and historical logistics transportation data sequence;
[0153] Select a target shipment volume prediction model based on site characteristic information of the target site;
[0154] Input date characteristic information, site characteristic information and historical logistics transportation data sequence into the target shipment volume prediction model;
[0155] The target shipment volume prediction model is used to predict the shipment volume of the target site at the predicted time.
[0156] The specific implementation of the above operations can be found in the previous embodiments and will not be described in detail here.
[0157] As can be seen from the above, the computer device of the embodiment of the present application can obtain the date characteristic information of the time to be predicted, as well as the site characteristic information of the target site and the historical logistics and transportation data sequence; select the target shipment volume prediction model according to the site characteristic information of the target site; input the date characteristic information, site characteristic information and the historical logistics and transportation data sequence into the target shipment volume prediction model; and predict the shipment volume of the target site at the time to be predicted through the target shipment volume prediction model. In the embodiment of the present application, not only the shipment volume is predicted based on the historical data sequence, but also the known features of the future and the site features are combined, that is, the historical features and the future features are integrated, which can improve the prediction accuracy, and different shipment volume prediction models are used for shipment volume prediction for different logistics sites, which can further improve the prediction accuracy of the shipment volume.
[0158] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations in the above-mentioned embodiments.
[0159] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0160] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program can be loaded by a processor to execute any one of the shipment volume prediction methods provided in the embodiments of the present application.
[0161] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0162] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0163] Since the computer program stored in the computer-readable storage medium can execute any of the shipment volume prediction methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any of the shipment volume prediction methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0164] The above is a detailed introduction to a method, device, computer equipment and computer-readable storage medium for predicting the number of shipments provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for predicting the amount of shipments, characterized in that: include: Obtain date characteristic information of the time to be predicted, as well as site characteristic information of the target site and historical logistics transportation data sequence; Selecting a target shipment volume prediction model according to site characteristic information of the target site; Input the date characteristic information, site characteristic information and historical logistics transportation data sequence into the target shipment volume prediction model; The target shipment volume prediction model is used to predict the shipment volume of the target site at the time to be predicted.
2. The method according to claim 1, characterized in that The historical logistics and transportation data sequence includes logistics and transportation data of a first past time period, the shipment volume includes at least the shipment volume predicted at different times, and the shipment volume of the target site at the time to be predicted is predicted by the target shipment volume prediction model, including: Periodically acquiring updated logistics and transportation data during a time period between the first time and the time to be predicted; Based on the updated logistics and transportation data, the historical logistics and transportation data sequence is updated to obtain an updated historical logistics and transportation data sequence; Dynamic prediction is performed based on the updated historical logistics transportation data sequence to obtain the shipment volume of the target site at the time to be predicted.
3. The method according to claim 1, characterized in that Before selecting a target shipment volume prediction model according to the site characteristic information of the target site, the method further includes: Extract site characteristics of logistics sites to obtain site characteristic information of each logistics site; Perform clustering processing according to the site characteristic information of each logistics site to obtain at least one site cluster; For each site cluster, a corresponding shipment volume prediction model is trained according to site feature information of the logistics sites in the site cluster.
4. The method according to claim 3, characterized in that The site feature extraction of the site to obtain site feature information of each logistics site includes: Extracting features of the sites to obtain candidate site feature information of each site; Building a logistics network based on the route relationship between the sites, wherein the nodes in the logistics network represent the sites and the edges represent the logistics routes between the nodes; Determining the associated sites of each logistics site based on the logistics routes between the nodes in the logistics network; For each logistics site, feature fusion processing is performed on the candidate feature information of the site and the candidate feature information of the associated sites to obtain site feature information of each logistics site.
5. The method according to claim 4, characterized in that The determining of the associated sites of each logistics site based on the logistics routes between the nodes in the logistics network includes: For each logistics site, extract nodes connected to the target node corresponding to the logistics site through edges from the logistics network to obtain first-order neighbor nodes of the target node; Extracting nodes connected to the first-order neighbor nodes through edges from the logistics network to obtain second-order neighbor nodes of the target node; An associated site is obtained according to the first-order neighbor node and the second-order neighbor node.
6. The method according to claim 5, characterized in that The obtaining of associated sites according to the first-order neighbor nodes and the second-order neighbor nodes includes: Selecting a target first-order neighbor node according to the distance information of the edge between the target node and the first-order neighbor node; Selecting a target second-order neighbor node connected to the target first-order neighbor node from the second-order neighbor nodes; The venues corresponding to the target first-order neighbor node and the target second-order neighbor node are set as the associated venues.
7. The method according to any one of claims 3 to 6, characterized in that: The method of training a corresponding shipment volume prediction model for each site cluster according to site feature information of the logistics sites in the site cluster includes: Obtain training sample data sets corresponding to different site clusters, each training sample data set includes sites belonging to the corresponding site cluster, as well as site feature information and historical logistics and transportation data sequences corresponding to each site; For each training sample data set of different venue clusters, a preset candidate shipment volume prediction model is trained through the training sample data set to obtain a shipment volume prediction model corresponding to each venue cluster.
8. A device for predicting the amount of shipments, characterized in that: include: An acquisition unit, used to acquire date characteristic information of the time to be predicted, as well as site characteristic information of the target site and a historical logistics transportation data sequence; A selection unit, configured to select a target shipment volume prediction model according to site characteristic information of the target site; An input unit, used to input the date characteristic information, site characteristic information and historical logistics transportation data sequence into the target shipment volume prediction model; The prediction unit is used to predict the shipment volume of the target site at the time to be predicted by using the target shipment volume prediction model.
9. A computer device, characterized in that: It comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the method for predicting the shipment volume according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute the method for predicting the shipment volume according to any one of claims 1 to 7.