Waybill quantity prediction method and device, storage medium and electronic equipment
By obtaining real-time and historical data of logistics outlets, using preset models to predict the waybill quantity, combined with regression and smoothing models, the problem of low accuracy of waybill quantity prediction in the existing technology is solved, and more accurate waybill quantity prediction and resources are achieved Configuration.
Patent Information
- Application Number
- CN202310780901.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2024-12-31
AI Technical Summary
The existing technology has low accuracy in predicting the waybill quantity, especially during holidays and promotion days, which cannot effectively respond to abnormal changes in the waybill quantity, resulting in unscientific resource allocation and ineffective guidance of grassroots business personnel.
By obtaining real-time waybill quantity data, historical waybill quantity data and target date data of logistics outlets, the preset waybill quantity prediction model is used to predict, combining regression model and smoothing model, feature extraction and data update, improve prediction accuracy.
It improves the accuracy of the prediction of waybill quantity, can timely adjust the recent waybill quantity, provide scientific resource allocation data, and helps managers flexibly respond to peak situations such as promotion days.
Smart Images

Figure CN119228152A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular, to a waybill quantity prediction method, a waybill quantity prediction device, a computer-readable storage medium, and an electronic device. Background Art
[0002] Delivery waybill volume forecasting is a basic forecast in the logistics field. The daily waybill volume forecasting can provide support for downstream manpower and shift planning, helping logistics practitioners to better reduce costs and increase profits.
[0003] Currently, forecasts are usually made based on historical waybill volumes in terms of year-on-year or month-on-month growth, while the waybill volumes for holidays, promotional days and other dates are assessed based on past business experience. This forecasting method has a high labor cost and the accuracy of waybill volume forecasts is unstable, so it cannot provide effective guidance to grassroots business personnel.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a waybill quantity prediction method, a waybill quantity prediction device, a computer-readable storage medium and an electronic device, thereby overcoming the problem of low accuracy of waybill quantity prediction due to limitations and defects of related technologies to a certain extent.
[0006] According to a first aspect of the present disclosure, a method for predicting the number of shipping orders is provided, comprising:
[0007] Obtain basic data of each logistics outlet, including real-time waybill volume data, historical waybill volume data and target date data;
[0008] Based on the basic data, a preset waybill quantity prediction model is used to obtain the predicted waybill quantity data of each logistics network point in the target time period;
[0009] When the target time period includes a target date, the target waybill quantity data for the target date is determined based on the historical waybill quantity data corresponding to the target date, and the predicted waybill quantity data for the target time period is updated based on the target waybill quantity data.
[0010] In an exemplary embodiment of the present disclosure, the waybill quantity prediction model includes a regression model and a smoothing model;
[0011] The method of obtaining the predicted waybill quantity data of each logistics network point in the target time period based on the basic data by using a preset waybill quantity prediction model includes:
[0012] Extracting features from the basic data to obtain basic feature data;
[0013] Determine the sequence length of the historical waybill quantity data in the basic feature data;
[0014] When the sequence length is less than a preset sequence length threshold, the smoothing model is used to obtain the predicted waybill quantity data of each logistics network point in the target time period;
[0015] When the sequence length is greater than or equal to the sequence length threshold, the regression model is used to obtain the predicted waybill quantity data of each logistics network point in the target time period.
[0016] In an exemplary embodiment of the present disclosure, the basic feature data includes at least a statistical feature and a time feature, and the statistical feature includes a first statistical feature and a second statistical feature;
[0017] The step of extracting features from the basic data to obtain basic feature data includes:
[0018] Acquire historical waybill quantity data for a lag time period corresponding to the target time period according to the length of the target time period;
[0019] Determine a first statistical feature of the historical waybill quantity data for the hysteresis time period according to the historical waybill quantity data for the hysteresis time period;
[0020] Extracting a second statistical feature of the historical waybill quantity data of the upper-level logistics network to which each of the logistics network belongs in the first preset time period;
[0021] The time features of each time point within the target time period are extracted based on the target date data.
[0022] In an exemplary embodiment of the present disclosure, the smoothing model includes a first smoothing model and a second smoothing model;
[0023] The using the smoothing model to obtain the predicted waybill quantity data of each logistics network point in the target time period includes:
[0024] Obtaining historical waybill volume data of each of the logistics outlets in a second preset time period;
[0025] Based on the historical waybill quantity data, the first smoothing model and the second smoothing model are used to perform weighted calculation to obtain the predicted waybill quantity data of each logistics network point in the target time period.
[0026] In an exemplary embodiment of the present disclosure, the regression model includes a first regression model and a second regression model;
[0027] The method of using the regression model to obtain the predicted waybill quantity data of each logistics outlet in the target time period includes:
[0028] Based on the basic feature data, weighted calculation is performed using the trained first regression model and the second regression model to obtain the predicted waybill quantity data of each logistics network point in the target time period; or
[0029] The performance parameters of the trained first regression model and the performance parameters of the second regression model are compared to obtain a target waybill quantity prediction model, and the target waybill quantity prediction model is used to obtain the predicted waybill quantity data of each logistics outlet in the target time period.
[0030] In an exemplary embodiment of the present disclosure, before using the regression model to obtain the predicted waybill quantity data of each logistics network point in the target time period, the method further includes:
[0031] constructing a plurality of the first regression models according to the length of the target time period, each of the first regression models corresponding to a different sub-time period within the target time period;
[0032] Obtain training data sets and test data sets for each logistics network point;
[0033] Using the training data set to train each of the first regression model and the second regression model;
[0034] The test data set is used to determine performance parameters of each of the first regression model and the second regression model.
[0035] In an exemplary embodiment of the present disclosure, the target waybill quantity prediction model is the first regression model;
[0036] The using the target waybill quantity prediction model to obtain the predicted waybill quantity data of each logistics outlet in the target time period includes:
[0037] Using each of the first regression models to obtain the predicted waybill quantity data of each of the logistics outlets in the corresponding sub-time period;
[0038] The predicted waybill quantity data for the target time period is obtained based on the predicted waybill quantity data for each of the sub-time periods.
[0039] In an exemplary embodiment of the present disclosure, determining the target waybill quantity data for the target date according to the historical waybill quantity data corresponding to the target date includes:
[0040] Acquire the historical waybill quantity data corresponding to the target date, the historical waybill quantity data including actual waybill quantity data of the target date in a historical cycle, first statistical waybill quantity data in a historical time period adjacent to the target date in the historical cycle, and second statistical waybill quantity data in the historical time period adjacent to the target date in a current cycle;
[0041] Calculate the change ratio of the waybill quantity on the target date according to the actual waybill quantity data and the first statistical waybill quantity data;
[0042] Calculate the total waybill quantity data on the target date according to the waybill quantity change ratio and the second statistical waybill quantity data;
[0043] The target waybill quantity data of each logistics outlet on the target date is determined based on the full waybill quantity data.
[0044] In an exemplary embodiment of the present disclosure, after updating the predicted waybill quantity data for the target time period according to the target waybill quantity data, the method further includes:
[0045] When the target time period includes the current day, the waybill volume ratio at the target time is calculated based on the real-time waybill volume data at the target time within the third preset time period and the historical total waybill volume data corresponding to the target time within the third preset time period;
[0046] Acquire real-time waybill quantity data at the target time on the day, and determine actual waybill quantity data on the day according to the real-time waybill quantity data and the waybill quantity ratio;
[0047] The target waybill quantity data for the day is determined based on the actual waybill quantity data for the day and the predicted waybill quantity data for the day.
[0048] According to a second aspect of the present disclosure, there is provided a device for predicting the quantity of shipping orders, comprising:
[0049] A data acquisition module is used to acquire basic data of each logistics network point, wherein the basic data includes real-time waybill quantity data, historical waybill quantity data and target date data;
[0050] A data prediction module, used to obtain the predicted waybill quantity data of each logistics network point in the target time period based on the basic data and using a preset waybill quantity prediction model;
[0051] A data update module is used to determine the target waybill quantity data for the target date based on the historical waybill quantity data corresponding to the target date when the target time period includes the target date, and to update the predicted waybill quantity data for the target time period based on the target waybill quantity data.
[0052] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, any one of the methods described above is implemented.
[0053] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned methods by executing the executable instructions.
[0054] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:
[0055] In the waybill quantity prediction method provided in the exemplary implementation mode of the present disclosure, by obtaining the basic data of each logistics network point, the basic data includes real-time waybill quantity data, historical waybill quantity data and target date data; based on the basic data, the predicted waybill quantity data of each logistics network point in the target time period is obtained by using the preset waybill quantity prediction model; when the target time period includes the target date, the target waybill quantity data of the target date is determined according to the historical waybill quantity data corresponding to the target date, and the predicted waybill quantity data of the target time period is updated according to the target waybill quantity data. On the one hand, by adding the real-time waybill quantity data as a feature to the prediction model, the waybill quantity in the near future (including the current day) can be adjusted in time, and the flexible work arrangement of each logistics network point is facilitated according to the real-time waybill quantity change, which provides an objective and scientific data basis for the resource allocation of logistics distribution; on the other hand, after the waybill quantity prediction is completed by using the prediction model, the predicted waybill quantity of the target date such as holidays and promotion days is adjusted separately, avoiding the situation where the prediction error of the target date is large, thereby improving the accuracy of the waybill quantity prediction. Furthermore, in the long term, it can effectively help managers at all levels reserve human and material resources to flexibly respond to situations such as a surge in the number of shipping orders on promotional days.
[0056] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0058] Figure 1 A system architecture diagram is shown to which the method for predicting the number of shipping orders in the embodiment of the present disclosure can be applied;
[0059] Figure 2 A flowchart of a method for predicting the quantity of shipping orders in an embodiment of the present disclosure is shown;
[0060] Figure 3 A flowchart showing another method for predicting the quantity of shipping orders in an embodiment of the present disclosure is shown;
[0061] Figure 4 A flow chart of another method for predicting the quantity of shipping orders in an embodiment of the present disclosure is shown;
[0062] Figure 5 A flow chart showing adjustment of the predicted shipping order quantity on the target date in an embodiment of the present disclosure is shown;
[0063] Figure 6 A flow chart showing the adjustment of the predicted shipping order quantity for the day in an embodiment of the present disclosure is shown;
[0064] Figure 7 A block diagram of a device for predicting the number of shipping orders according to an embodiment of the present disclosure is shown;
[0065] Figure 8 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0066] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0067] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0068] Figure 1 A system architecture diagram of a method for predicting the quantity of shipping orders to which an embodiment of the present disclosure can be applied is shown.
[0069] like Figure 1 As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal devices 101, 102, 103 may be various electronic devices, including but not limited to desktop computers, portable computers, smart phones, tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.
[0070] The waybill quantity prediction method provided in the embodiment of the present disclosure can be executed by the server 105, and accordingly, the waybill quantity prediction device can be set in the server 105. The server can send the updated predicted waybill quantity data to the terminal device, and the terminal device can display it to the user. However, it is easy for those skilled in the art to understand that the waybill quantity prediction method provided in the embodiment of the present disclosure can also be executed by the terminal devices 101, 102, and 103, and accordingly, the waybill quantity prediction device can also be set in the terminal devices 101, 102, and 103. For example, after being executed by the terminal device, the updated predicted waybill quantity data can be directly displayed on the display screen of the terminal device to show it to the user. This is not particularly limited in the present exemplary embodiment.
[0071] The technical solution of the embodiment of the present disclosure is described in detail below:
[0072] At present, the forecast is usually based on the historical waybill volume according to the year-on-year growth or month-on-month growth, and the waybill volume for holidays, promotion days and other dates is evaluated based on past business experience. This forecasting method has a high labor cost and the accuracy of the waybill volume forecast is unstable, so it cannot form an effective guide for grassroots business personnel. For example, when using the forecasting model to forecast the waybill volume, it is impossible to cope with the abnormal changes in the waybill volume on holidays, promotion days and other dates. Manual identification is required, making it impossible to objectively and scientifically allocate resources for the date, and there is also a situation where the accuracy of the waybill volume forecast is low.
[0073] Based on one or more of the above problems, this example implementation provides a waybill volume prediction method to optimize the prediction of waybill volume, which can solve the workload assessment problem of the entire distribution network from top to bottom in a targeted manner. In the short term, it can effectively help terminal managers solve the courier attendance scheduling problem. In the long term, it can effectively help managers at all levels reserve human and material resources to flexibly respond to situations such as a surge in waybill volume on promotional days. Figure 2 As shown, the waybill quantity prediction method may include the following steps S210 to S230:
[0074] Step S210. Obtain basic data of each logistics network point, the basic data including real-time waybill quantity data, historical waybill quantity data and target date data;
[0075] Step S220. Based on the basic data, the preset waybill quantity prediction model is used to obtain the predicted waybill quantity data of each logistics network point in the target time period;
[0076] Step S230. When the target time period includes a target date, the target waybill quantity data for the target date is determined based on the historical waybill quantity data corresponding to the target date, and the predicted waybill quantity data for the target time period is updated based on the target waybill quantity data.
[0077] Execute as Figure 2 The method for predicting the number of waybills described above, on the one hand, adds the real-time waybill volume data as a feature into the prediction model, which can timely adjust the number of waybills in the near future (including the current day), and facilitates flexible work arrangements for each logistics outlet based on the real-time changes in the number of waybills, providing an objective and scientific data basis for the resource allocation of logistics distribution; on the other hand, after the prediction model is used to complete the waybill volume prediction, the predicted waybill volume for target dates such as holidays and promotion days is adjusted separately, avoiding the situation where the prediction error of the target date is large, thereby improving the accuracy of the waybill volume prediction. Furthermore, in the long term, it can effectively help managers at all levels reserve human and material resources to flexibly respond to situations such as the surge in the number of waybills on promotion days.
[0078] Next, the above steps of this exemplary embodiment are described in more detail.
[0079] In step S210, basic data of each logistics network point is obtained, and the basic data includes real-time waybill quantity data, historical waybill quantity data and target date data.
[0080] In the example implementation of the present disclosure, the logistics outlets of the smallest granularity unit are used as an example to predict the quantity of waybills, and the quantity is summarized to the upper level until the total quantity of waybills at the top level is obtained. Among them, the selection of the smallest granularity unit needs to consider the continuity and stability of the time series of the granularity unit. Taking the sales department as an example, for most of the sales departments (accounting for 80% of the total quantity of waybills), the quantity of waybills of each sales department has continuous changes in the time series and can be stabilized through differential changes. Therefore, the description of the prediction of the quantity of waybills of the sales department is mainly based on the description of the embodiment of the present disclosure, so as to form a comprehensive prediction of the quantity of waybills for the distribution system. The quantity of waybills represents the quantity of waybills whose orders are delivered to the end customers by the sales department and whose express delivery status is successfully delivered.
[0081] Exemplarily, the basic data of each business department can be obtained to use the basic data to realize the waybill volume forecast of each business department. The basic data may include real-time waybill volume data, historical waybill volume data and target date data. Among them, real-time waybill volume data refers to the real-time route volume data, which may include waybill information, order information, current logistics status, stations that have arrived, stations currently arriving, and the date and time of expected arrival at the target station; historical waybill volume data may include the geographical location data of the province, city, county, sorting center, war zone, sub-district, etc. to which the business department belongs, and the historical waybill data corresponding to each geographical location data. For example, the historical waybill volume data within the past two to three years can be obtained and counted according to the day*business department dimension. Target date data refers to the relevant data of dates such as holidays or promotion days, such as the opening dates of traditional holidays, 618, Double Eleven, Double Twelve, New Year's Festival and other promotion days.
[0082] In this example, by recording the flow of each waybill through the routing system, the quantity of waybills arriving at different sites can be known in advance. That is, before the order is successfully delivered, the actual quantity data of waybills that will arrive at the underlying sites such as the sales department can be obtained.
[0083] In step S220, based on the basic data, a preset waybill quantity prediction model is used to obtain the predicted waybill quantity data of each logistics network point in the target time period.
[0084] After obtaining the basic data as described in step S210, the basic data can be preprocessed by data cleaning, data preparation, feature extraction, etc. Exemplarily, when performing data cleaning, dirty data can be removed according to the business meaning. Dirty data refers to data in the source system that is not within a given range or is meaningless to the actual business, or the data format is illegal, and there are non-standard coding and ambiguous business logic in the source system. For example, dirty data such as halfway interception and no change in route in the real-time order volume data of each business department can be eliminated, where halfway interception refers to the situation where the original order is invalidated or changed due to business changes such as return of the order after shipment or change of address; virtual sites, express cabinets, self-pickup cabinets, convenience points and other dimensional data in the historical waybill volume data of each business department can also be removed, and only the historical waybill volume data of the physical business department is retained; due to business changes such as address and name of the business department, the business department with no data changes within one year in the historical waybill volume data can also be eliminated.
[0085] Exemplarily, when preparing data, the data length of the historical waybill quantity sequence of each business department can be counted according to the historical waybill quantity data of each business department, and then the date on which the waybill quantity in each historical waybill quantity sequence is empty can be filled with the order quantity, and the filling value is zero; the real-time waybill quantity data of each business department on the day can also be obtained. For example, the real-time waybill quantity every 3 hours on the day can be obtained, that is, the waybill quantity at each time of 0:00, 3:00, 6:00, 9:00, 12:00, 15:00, 18:00, and 21:00 on the day can be obtained, as well as the waybill quantity at the corresponding time in the two days closest to the day. The number of waybills is calculated and concatenated with the number of waybills at each time of the day. If a null value appears in the concatenated number of waybills, the average of the data column at the corresponding time is calculated according to the business department dimension and then filled in. Correspondingly, the ratio of the real-time number of waybills at 0:00, 3:00, 6:00, 9:00, 12:00, 15:00, 18:00, and 21:00 of the business department on the day to the actual number of waybills on the day can be calculated. The ratio, the predicted real-time number of waybills at the corresponding time of the day, and the predicted number of waybills on the day obtained by the waybills prediction model are compared to correct the predicted number of waybills on the day.
[0086] The real-time waybill quantity at the corresponding moment is compared with the predicted waybill quantity for the day. If the real-time waybill quantity at that moment is higher than the predicted waybill quantity, the predicted waybill quantity for the day is updated according to the real-time waybill quantity at that moment and the corresponding ratio.
[0087] For example, the real-time waybill volume data at 0:00 on the day refers to the total number of waybill volumes of all orders in the routing system that arrived at a certain business department on the day as of 0:00 on the day, and the ratio of the total number of waybill volumes expected to arrive at the business department at that time to the total number of waybill volumes that actually arrived throughout the day is calculated. For example, according to the real-time waybill volume data of a certain business department, it can be seen that on January 9, 100 orders were expected to arrive at the business department at 0:00, 130 orders were expected to arrive at the business department at 3:00, 170 orders were expected to arrive at the business department at 6:00, and 200 orders were expected to arrive at the business department at 9:00, and the number of waybill volumes gradually increased. Assuming that the total number of waybill volumes that actually arrived at the business department on January 9 was 300, then the ratio of the real-time waybill volume at each time to the total number of waybill volumes that actually arrived at the business department on that day is: 0.33, 0.43, 0.57, 0.67... It should be noted that since the real-time waybill volume for the day cannot be predicted in advance, this part of the data is not used as a feature and is only used to adjust the predicted waybill volume for the day.
[0088] In an example implementation, the shipping order quantity prediction model may include a regression model and a smoothing model. Figure 3 As shown, the number of waybills of each logistics network point in the target time period can be predicted according to steps S310 to S340.
[0089] In step S310, feature extraction is performed on the basic data to obtain basic feature data.
[0090] In this example, the basic feature data obtained may include at least statistical features and time features, and the statistical features may include a first statistical feature and a second statistical feature. Exemplarily, the historical waybill volume data of the lag time period corresponding to the target time period may be obtained according to the time length of the target time period, and the first statistical feature of the historical waybill volume data of the lag time period may be determined according to the historical waybill volume data of the lag time period. Considering that the actual waybill delivery has a weekly cycle, the corresponding lag time period may be divided according to the predicted time length and the weekly stage, and different lag time periods may be determined for different predicted time lengths.
[0091] For example, when the target time period is the next week, that is, when predicting the number of waybills in the next week, the historical waybill volume data with a lag time period of 21 days to 8 days can be used as features. The reasons are as follows: (1) The time series has a strong trend of weekly cycles, so the historical waybill volume data of integer weeks are extracted as features; (2) Since the more recent historical waybill volume data has a greater impact on the prediction of future waybill volume, and the more distant historical waybill volume data has a smaller impact on the prediction of future waybill volume, the historical waybill volume data of the past two weeks are extracted as features; (3) The features within the lag time period can be used to predict the number of waybills in the next week. The specific feature construction is shown in Table 1:
[0092] Table 1
[0093]
[0094] T in Table 1 represents the current date. When predicting the number of waybills for the next week, the total number of waybills for the current day is unknown, so the current day is taken as the first day of the next week. T-7 is 7 days behind, indicating the 7th day in the past, T+6 indicates the 7th day in the future, and so on. When predicting the number of waybills for the next week (T~T+6), the features used are the historical waybills with a lag of 21 days to 8 days (T-21~T-8).
[0095] Similarly, when the target time period is the second week in the future, that is, when predicting the waybill volume in the second week in the future (T+7~T+13), the historical waybill volume with a lag of 28 days to 15 days (T-28~T-15) as shown in Table 2 can be used as features for prediction and the predicted waybill volume in the second week in the future can be extracted. When the target time period is the third week in the future, that is, when predicting the waybill volume in the third week in the future (T+14~T+20), the features used are the historical waybill volume with a lag of 35 days to 22 days (T-35~T-22), and the predicted waybill volume in the third week in the future can be extracted after the prediction is completed.
[0096] Table 2
[0097]
[0098] Furthermore, as shown in Table 3, the target time period is the next 30 days, that is, when predicting the waybill volume in the next 30 days (T~T+29), the target time period is not an integer multiple of weeks, so the future 22nd to 30th day can be used as a time period for prediction. Specifically, the historical waybill volume of the past two weeks (T-44~T-30) with an interval of one month can be extracted as features, and the predicted waybill volume of the next 22nd to 30th day (T+21~T+29) can be intercepted after the prediction is completed.
[0099] Table 3
[0100]
[0101] After obtaining the historical waybill volume data of the lag time period corresponding to the target time period, the first statistical characteristics of the historical waybill volume data of the lag time period are determined according to the historical waybill volume data of the lag time period, including statistical characteristics such as the maximum value, minimum value, average value, sum value, standard deviation, median, skewness and kurtosis of the historical waybill volume within the lag time period.
[0102] Based on this, the historical waybill volume data of the past year can also be used as features according to the lunar calendar and the Gregorian calendar. For example, January 1, 2023 is the tenth day of the twelfth lunar month, and the waybill volume of a certain business department is 500. The waybill volume on January 1, 2022 is 400 (one year behind the Gregorian calendar). The tenth day of the twelfth lunar month last year was December 12, 2021, and the waybill volume on that day was 389 (one year behind the lunar calendar). These two data are also added to the features. The purpose is to capture the features of the waybill volume on some target dates such as holidays. For example, if the number of waybills increased significantly due to promotional activities on New Year's Day last year, similar information will be captured this year; for another example, there will be New Year's Festival activities before the Spring Festival. Using the alignment of the lunar calendar dates can capture similar New Year's Festival information last year, and then accurately predict the number of waybills.
[0103] It is also possible to extract the second statistical feature of the historical waybill volume data of the superior logistics outlets to which each logistics outlet belongs in the first preset time period. The first preset time period may be the most recent month, which is not specifically limited in the present disclosure, and the second statistical feature includes features such as average values. For example, for a certain business department, the identification of the geographical location (such as the code of the ID) of the province, city, county, sorting center, war zone, sub-district, etc. to which the business department belongs, and the average value of the daily historical waybill volume in the most recent month (excluding holidays) after grouping by different geographical locations can be obtained.
[0104] The time features of each time point in the target time period can also be extracted based on the target date data. Exemplarily, the time features of year, quarter, month, day, week, whether it is a working day, day of the week, week number in the month, day of the year, whether it is a holiday, the number of days from the 618 promotion day, the number of days from the last 618 promotion day, the number of days from the last Double 11 promotion day, and the number of days from the Double 11 promotion day can be calculated according to each time point in the target time period. For example, taking January 9, 2023 as an example, a time point in the target time period, the time features of the day include: 2023, 1st quarter, January, 9th, 2nd week, working day, Monday, third week in the month, 9th day of the year, not a holiday, 160 days from the 618 promotion day, 306 days from the Double 11 promotion day, 205 days from the last 618 promotion day, 59 days from the last Double 11 promotion day, etc.
[0105] It should be noted that since real-time waybill volume data can be used when predicting the waybill volume in the next 1-2 days, real-time waybill volume data can also be used as features when predicting the waybill volume in the next 1-7 days. For example, when predicting the waybill volume at time T, the real-time waybill volume data at times T-2 and T-1 need to be used as features. For example, the actual waybill volume of a certain business department on January 9 was 1,000, while the waybill volume expected to arrive at the business department in the routing system on January 7 was 200, and the waybill volume expected to arrive at the business department in the routing system on January 8 was 600. It can be seen that the proportions on January 7 and January 8 were 0.2 and 0.6 respectively, and the proportions were relatively stable every day. When predicting the waybill volume in the next 8-30 days, there is no need to use real-time waybill volume data for prediction.
[0106] In step S320, the sequence length of the historical waybill quantity data in the basic feature data is determined.
[0107] Furthermore, the sequence length of the historical waybill volume data in the basic feature data can be determined. The sequence length refers to the sequence length without zero-filling the historical waybill volume. For example, if a business department has been established for two months, only the historical waybill volume of the business department in the last 60 days can be obtained, and there are waybill volumes every day. Correspondingly, the sequence length of the historical waybill volume data of the business department is 60; if a business department has been established for two months, only the historical waybill volume of the business department in the last 60 days can be obtained, and the waybill volume of 3 days is empty, that is, the sequence length of the historical waybill volume data of the business department is 57; if a business department has been established for 3 years, the corresponding sequence length of the historical waybill volume data of the business department is much greater than 60.
[0108] In step S330, when the sequence length is less than a preset sequence length threshold, the smoothing model is used to obtain the predicted waybill quantity data of each logistics network point in the target time period.
[0109] The present disclosure does not make any specific limitation on the sequence length threshold. For example, the sequence length threshold can be preset to 60. When the sequence length of the historical waybill volume data of a certain business department is less than 60, a smoothing model can be used to obtain the predicted waybill volume data of the business department in the target time period. Among them, the smoothing model may include a first smoothing model and a second smoothing model. Specifically, the historical waybill volume data of each logistics network point in the second preset time period whose sequence length is less than the preset sequence length threshold can be obtained, and based on the historical waybill volume data, the first smoothing model and the second smoothing model are used to perform weighted calculation to obtain the predicted waybill volume data of each logistics network point in the target time period. Among them, the second preset time period can be the most recent week or the most recent month, and the present disclosure does not limit this.
[0110] In the example implementation of the present disclosure, the first smoothing model may be an SMA (Simple Moving Average) model, and the second smoothing model may be an SES (Single exponential smoothing) model. It is understandable that the first smoothing model may also be an SES model, and the second smoothing model may also be an SMA model, and the present disclosure does not limit this. Among them, the SES model can be parameterized by a smoothing parameter α, and the α value is between 0 and 1. The higher the α value, the greater the weight of the recent value used to predict, and the smaller the weight of the long-term value. When α=0, the predicted value is equal to the average of the historical data; when α=1, the predicted value is the same as the last observed value in the training data.
[0111] The calculation formula of the SMA model is:
[0112]
[0113] Among them, n can be selected as 14 or 28, indicating the time window of historical waybill data, and t indicates the time point closest to the target time period. For example, if the target time period is January 13, 2023, t is January 12, 2023. i represents the number of waybills at the i-th time point. Formula (1) indicates that the average of the historical waybills in the last 14 or 28 days is used as the predicted value.
[0114] Specifically, when the SES model and the SMA model can be used to predict the number of waybills in the next week, the smoothing parameter α in the SES model can be preset to 0.8, and the present disclosure does not make specific restrictions on this. The first smoothing value in the model uses the average of the first three historical waybills in the historical waybill data sequence. For the SMA model, the number of waybills per day in the next week can be calculated according to formula (1). Then the waybills predicted by the two models are weighted and calculated. The weights can be set to 0.5, or different weights can be assigned to the two models according to actual needs.
[0115] In step S340, when the sequence length is greater than or equal to the sequence length threshold, the regression model is used to obtain the predicted waybill quantity data of each logistics network point in the target time period.
[0116] When the sequence length of the historical waybill volume data of a certain business department is greater than or equal to the sequence length threshold, such as 60, the regression model can be used to obtain the predicted waybill volume data of each logistics outlet in the target time period. The regression model may include a first regression model and a second regression model.
[0117] In the example implementation of the present disclosure, the first regression model may be an XGBoost (Extreme GradientBoosting) model, and the second smoothing model may be a TFT (Temporal Fusion Transformer) model. It is understandable that the first regression model may also be a TFT model, and the second regression model may also be an XGBoost model, and the present disclosure does not limit this. Among them, the XGBoost model is a type of gradient boosting tree model, which belongs to an integrated learning model. The model performs a second-order Taylor expansion on the loss function and uses the second-order derivative information of the loss function to optimize the loss function to select the split node based on whether the loss function is reduced. The TFT model uses a specification component to efficiently construct a feature representation for each input type (i.e., static, known input, observed input), so that it can obtain high prediction performance on a wide range of problems. The main components of the TFT model include: (1) a control mechanism that skips any unused components in the architecture and provides adaptive depth and network complexity to adapt to a wide range of data sets and scenarios. Gated linear units are used extensively throughout the architecture, and gated residual networks are proposed as the main building blocks; (2) variable selection networks, which select relevant input variables at each time step; (3) static covariate encoders, which incorporate static features into the network by encoding context vectors to condition on temporal dynamics; (4) temporal processing, which learns long-term and short-term temporal relations while naturally handling observed and a priori known time-varying inputs. A sequence-to-sequence layer is used for local feature processing, while long-term dependencies are captured using a novel interpretable multi-head attention block; (5) multi-level prediction interval prediction, which produces quantile predictions at each prediction level.
[0118] In another example implementation, referring to Figure 4 As shown, the number of waybills of each logistics network point in the target time period can be predicted according to step S410 and step S420.
[0119] In step S410, based on the basic feature data, the first regression model and the second regression model that have been trained are used to perform weighted calculation to obtain the predicted waybill quantity data of each logistics network point in the target time period; or
[0120] In step S420, the performance parameters of the trained first regression model and the performance parameters of the second regression model are compared to obtain a target waybill quantity prediction model, and the target waybill quantity prediction model is used to obtain the predicted waybill quantity data of each logistics outlet in the target time period.
[0121] Exemplarily, step S410 and step S420 are explained by taking the first regression model as an XGBoost model and the second regression model as a TFT model as an example. Before using the regression model to obtain the predicted waybill volume data of each logistics outlet in the target time period, multiple first regression models can be constructed according to the time length of the target time period, and each first regression model corresponds to a different sub-time period within the target time period. For example, when a week is a cycle and the target time period is the next month, the next month contains four weeks, each of the first three weeks is a sub-time period, and the remaining days except the first three weeks are a sub-time period. Correspondingly, 4 XGBoost models can be constructed, the first 3 XGBoost models are used to predict the waybill volume in the next three weeks, and the fourth XGBoost model is used to predict the waybill volume in the remaining days.
[0122] Then, the training data set and the test data set of each logistics network point can be obtained. The training data set is used to train each first regression model and the second regression model, and the test data set is used to determine the performance parameters of each first regression model and the performance parameters of the second regression model. Among them, the training data set is a data sample used for model fitting. The test data set is used to evaluate the generalization ability of the final model. It should be noted that in the example implementation of the present disclosure, the data set one month before the target time period can be used as the test data set, and the data set from the beginning of the data sequence to one month before the target time period can be used as the training data set. For example, if the current date is January 10, 2023, you can select January 1, 2021-December 10, 2022 as the training data set, and select December 11, 2022-January 9, 2023 as the test data set.
[0123] When the prediction performance of each first regression model is similar to that of the second regression model, each first regression model and the second regression model can be used for weighted calculation to obtain the predicted waybill volume data of each logistics network in the target time period. When the prediction performance of each first regression model and the prediction performance of the second regression model differ greatly, the model with better prediction performance can be used as the target waybill volume prediction model, and the target waybill volume prediction model can be used to obtain the predicted waybill volume data of each logistics network in the target time period. Exemplarily, when the target waybill volume prediction model is a first regression model such as an XGBoost model, each XGBoost model can be used to obtain the predicted waybill volume data of each logistics network in the corresponding sub-time period, and the predicted waybill volume data of the target time period can be obtained based on the predicted waybill volume data of each sub-time period.
[0124] Different models are used to predict the daily frequency of time series of different lengths of the smallest granularity unit in the distribution scenario, and gradually aggregated at a small granularity to form a prediction of the entire distribution system. Among them, short-time series data is obtained by weighting using the SMA model and the SES model, and long-time series data is predicted by weighting or selecting the xgboost model and the TFT model. The construction of the xgboost model is mainly based on the periodic characteristics of the data, using the lag time period in multiples of weeks as part of the feature, and training multiple models to predict the waybills of different weeks in the future, further improving the accuracy of the waybill volume prediction.
[0125] For example, the current date is January 9, 2023, and the target time period is January 10 - February 8, 2023 (the next 30 days).
[0126] (I) Forecast of the number of shipping orders in the next week:
[0127] Taking the number of waybills on January 9, 2023 as an example, the input features used for model prediction include: the number of waybills from December 20 to January 2, 2022, the maximum, minimum, average, sum, standard deviation, median, skewness and kurtosis in this time window; the number of waybills on January 9, 2022 (one year behind the Gregorian calendar) and the number of waybills on January 20, 2022 (one year behind the lunar calendar); the time features include 2023, the first quarter, January, the 9th, the second week, a working day, Monday, and the month. The third week, the 9th day of the year, not a holiday, the number of days from the 618 promotion day is 160 days, the number of days from the Double 11 promotion day is 306 days, the number of days from the previous 618 promotion day is 205 days, and the number of days from the previous Double 11 promotion day is 59 days; the number of route waybills expected to arrive at the business department on January 8, the number of route waybills expected to arrive at the business department on January 7; the id of the business department and the daily average number of orders in the county to which it belongs in the past month (excluding holidays), the daily average number of orders in the area to which it belongs in the past month (excluding holidays), etc. Use the first trained XGBoost model for prediction, the predicted sub-time period is January 10-January 16, 2023, and select the predicted number of orders in this sub-time period.
[0128] Among them, it should be noted that when predicting the number of waybills on January 10, 2023, the number of waybills expected to arrive at the business department on January 8 and the number of waybills expected to arrive at the business department on January 9 can be used as input features. When predicting the number of waybills on January 11, 2023, the number of waybills expected to arrive at the business department on January 9 can be obtained. At this time, the number of waybills expected to arrive at the business department on January 10 is unknown. The average of the number of waybills expected to arrive at the business department at time T-1 in a historical time period such as half a year can be used as the number of waybills expected to arrive at the business department on January 10. Similarly, when predicting the number of waybills in other time periods in the next week (January 12-January 16, 2023), the historical average of the number of waybills expected to arrive at the business department at time T-1 and the historical average of the number of waybills expected to arrive at the business department at time T-2 can be used as input features.
[0129] (II) Forecast of the number of shipping orders in the next two weeks:
[0130] Taking the number of waybills on January 9, 2023 as an example, the input features used for model prediction include: the number of waybills from December 13 to December 26, the maximum, minimum, average, sum, standard deviation, median, skewness and kurtosis in this time window; the number of waybills on January 9, 2022 (one year lagging in the Gregorian calendar) and the number of waybills on January 20, 2022 (one year lagging in the lunar calendar); the time features include 2023, the first quarter, and January. , 9th, 2nd week, working day, Monday, 3rd week of the month, 9th day of the year, not a holiday, 160 days from 618 promotion day, 306 days from Double 11 promotion day, 205 days from the last 618 promotion day, 59 days from the last Double 11 promotion day; the id of the sales department and the average daily order volume of the county in the past month (excluding holidays), the average daily order volume of the area in the past month (excluding holidays), etc. Use the trained second XGBoost model for prediction, with the prediction date from January 10 to January 23, 2023, select the predicted shipping order volume from January 17 to January 23, and splice it with the prediction result of the first XGBoost model.
[0131] (III) Forecast of the number of shipping orders in the next three weeks:
[0132] Taking the number of waybills on January 9, 2023 as an example, the input features used for model prediction include: the number of waybills from December 6 to December 19, the maximum, minimum, average, sum, standard deviation, median, skewness and kurtosis in this time window; the number of waybills on January 9, 2022 (one year lagging in the Gregorian calendar) and the number of waybills on January 20, 2022 (one year lagging in the lunar calendar); the time features include 2023, the first quarter, January, 9th, 2nd week, working day, Monday, 3rd week of the month, 9th day of the year, not a holiday, 160 days from 618 promotion day, 306 days from Double 11 promotion day, 205 days from the last 618 promotion day, 59 days from the last Double 11 promotion day; the ID of the sales department and the average daily order volume of the county in the past month (excluding holidays), the average daily order volume of the area in the past month (excluding holidays), etc. Use the trained third XGBoost model for prediction, with the prediction date from January 10 to January 30, 2023, and select the results from January 24 to January 30 to splice with the results of the previous model.
[0133] (IV) Forecast of shipping order volume from January 31 to February 8, 2023:
[0134] Taking the number of waybills on January 9, 2023 as an example, the input features used for model prediction include: the number of waybills from November 20 to December 3, the maximum, minimum, average, sum, standard deviation, median, skewness and kurtosis in this time window; the number of waybills on January 9, 2022 (one year lagging in the Gregorian calendar) and the number of waybills on January 20, 2022 (one year lagging in the lunar calendar); the time features include 2023, the first quarter, January, 9th, 2nd week, working day, Monday, 3rd week of the month, 9th day of the year, not a holiday, 160 days from 618 promotion day, 306 days from Double 11 promotion day, 205 days from the last 618 promotion day, 59 days from the last Double 11 promotion day; the ID of the sales department and the average daily order volume of the county in the past month (excluding holidays), the average daily order volume of the area in the past month (excluding holidays), etc. Use the trained fourth XGBoost model for prediction, with the prediction date from January 10 to February 8, 2023, and select the results from January 31 to February 8 to splice with the results of the previous model.
[0135] After obtaining the predicted waybill volume for the target time period, determine whether the target time period includes target dates such as holidays or promotional days. If so, adjust the predicted waybill volume for the target date according to step S230.
[0136] In step S230, when the target time period includes a target date, the target waybill volume data for the target date is determined based on the historical waybill volume data corresponding to the target date, and the predicted waybill volume data for the target time period is updated based on the target waybill volume data.
[0137] When the target time period includes the target date, refer to Figure 5 As shown, the predicted waybill quantity on the target date can be adjusted according to steps S510 to S540.
[0138] In step S510, the historical waybill quantity data corresponding to the target date is obtained, and the historical waybill quantity data includes the actual waybill quantity data of the target date in the historical period, the first statistical waybill quantity data in the historical time period adjacent to the target date in the historical period, and the second statistical waybill quantity data in the historical time period adjacent to the target date in the current period.
[0139] The target date refers to traditional holidays, promotional days such as 618, Double Eleven, Double Twelve, and New Year's Day. Since the number of waybills fluctuates greatly during holidays and promotional days, the model in the sales department dimension cannot learn effective features. Therefore, it is necessary to adjust the number of waybills for holidays and promotional days separately.
[0140] In the example implementation of the present disclosure, when obtaining the historical waybill quantity data corresponding to the target date, the actual waybill quantity data of the target date in the historical cycle, the first statistical waybill quantity data in the historical time period adjacent to the target date in the historical cycle, and the second statistical waybill quantity data in the historical time period adjacent to the target date in the current cycle can be obtained. By distinguishing the target date between the lunar calendar and the Gregorian calendar, the corresponding historical cycle can be a lunar calendar cycle or a Gregorian calendar cycle.
[0141] Taking the target date as New Year's Eve as an example, the date and number of waybills of last year's New Year's Eve can be obtained. The actual number of waybills of the target date in the historical cycle can be the actual number of waybills of last year's Lunar New Year's Eve, the first statistical number of waybills in the historical time period adjacent to the target date in the historical cycle can be the average number of waybills in the last two weeks before New Year's Eve last year, and the second statistical number of waybills in the historical time period adjacent to the target date in the current cycle can be the average number of waybills in the last two weeks before New Year's Eve this year.
[0142] In step S520, the ratio of the change in the waybill quantity on the target date is calculated based on the actual waybill quantity data and the first statistical waybill quantity data.
[0143] Since the overall shipping volume has an increasing trend, it is necessary to calculate the ratio of the target date to the previous period. For example, the ratio of the actual shipping volume on last year’s Lunar New Year’s Eve to the average shipping volume in the two weeks closest to last year’s Lunar New Year’s Eve can be calculated.
[0144]
[0145] in, is the average number of shipping orders in the two weeks closest to the target date in the historical period, is the actual number of waybills on the target date in the historical period, and rate1 is the ratio of the actual number of waybills on the target date in the historical period to the average number of waybills in the last two weeks from the target date in the historical period.
[0146] In step S530, the total waybill quantity data for the target date is calculated based on the waybill quantity change ratio and the second statistical waybill quantity data.
[0147] Further, according to:
[0148]
[0149] in, is the average number of waybills in the current cycle in the last two weeks from the target date, rate1 is the ratio of the actual number of waybills on the target date in the historical cycle to the average number of waybills in the last two weeks from the target date in the historical cycle, and y t It is the full amount of waybill data for the target date in the current cycle.
[0150] In step S540, the target waybill quantity data of each logistics outlet on the target date is determined based on the full waybill quantity data.
[0151] Get the normalized proportion of the recent orders of each business department, recorded as p1. You can use:
[0152]
[0153] in, represents the number of shipping orders of the i-th sales department on the target date, y t It is the total shipping order data of the target date in the current cycle, and p1 is the proportion of the orders of each business department in the recent period.
[0154] Take steps S510 to S540 as an example to illustrate, assuming that the number of waybills on the target date is in a stable ratio with the number of waybills before the target date. For example, to predict the number of waybills of a certain business department on January 21, 2023 (New Year's Eve, Lunar New Year holiday), the number of waybills nationwide on January 31, 2022 (last year's New Year's Eve) is 10,000. The average number of waybills in the two weeks before New Year's Eve last year, that is, January 17-January 30, 2022, was 12,000. The average number of waybills in the two weeks before New Year's Eve this year, that is, January 7-January 20, 2023, is 15,000. Therefore, the predicted number of waybills for this year's New Year's Eve is 15,000*10,000 / 12,000=12,500. If the number of waybills of a certain business department in the past two weeks is 500, then the proportion of waybills of this business department in the recent period is 500 / 15000=1 / 30, so the predicted number of waybills of this business department on this year's New Year's Eve is 12500*1 / 30=417.
[0155] After obtaining the target waybill volume data for the target date, the predicted waybill volume data for the target date within the target time period obtained by the prediction model can be updated to the target waybill volume data for the target date to obtain the final predicted waybill volume data for the target time period.
[0156] In an example implementation, when the target time period includes the current day, reference Figure 6 As shown, the predicted shipping order quantity of each business department on the day can be adjusted according to steps S610 to S630.
[0157] In step S610, the waybill quantity ratio at the target moment is calculated based on the real-time waybill quantity data at the target moment within the third preset time period and the historical total waybill quantity data corresponding to the target moment within the third preset time period.
[0158] Among them, the third preset time period can be the most recent week or the most recent month, and the present disclosure does not make specific limitations on this. For example, the real-time waybill volume can be obtained every 3 hours of each day in the most recent week. Taking the target time as 0:00 every day as an example, the historical total waybill volume data corresponding to this time is the actual waybill volume of each day, and the proportion of the real-time waybill volume at this time to the actual waybill volume of each day is calculated. Since a week includes 7 days, for example, there are 7 values corresponding to the proportion of the real-time waybill volume at 0:00 every day to the actual waybill volume of each day. The average is taken as the final ratio of the real-time waybill volume at 0:00 to the actual waybill volume of each day, recorded as p2.
[0159] In step S620, the real-time waybill quantity data at the target time within the day is obtained, and the actual waybill quantity data for the day is determined based on the real-time waybill quantity data and the waybill quantity ratio.
[0160] For example, the target time is 0:00. After obtaining the real-time waybill quantity data at 0:00 on the day, the actual waybill quantity data for the day can be calculated based on the real-time waybill quantity data at 0:00 on the day and the ratio of the real-time waybill quantity at 0:00 every day in the third preset time period to the actual waybill quantity every day. Specifically, it can be based on:
[0161]
[0162] Where i represents the i-th business department, p2 represents the proportion of the real-time waybill volume at different times of the day in the third preset time period to the actual waybill volume of the day, Indicates the real-time shipping order data at different times of the day. Indicates the actual waybill quantity data for the day.
[0163] In step S630, the target waybill quantity data for the day is determined based on the actual waybill quantity data for the day and the predicted waybill quantity data for the day.
[0164] After determining the actual waybill volume data for the day, the target waybill volume data for the day can be determined in combination with the predicted waybill volume data for the day. Specifically, the target waybill volume data for the day can be determined based on:
[0165]
[0166] in, Indicates the forecasted shipping order volume data for the day. Indicates the actual shipping order data for the day. It indicates the target waybill volume data for the day. From formula (6), we can know that the maximum value between the predicted waybill volume data for the day and the actual waybill volume data for the day is taken as the target waybill volume data for the i-th business department for the day.
[0167] In this example, the predicted number of waybills for the day is corrected based on the real-time number of waybills for the day. The correction is used to timely adjust the staff schedule to avoid staff shortages during busy hours and staff waste during idle hours.
[0168] In the example implementation of the present disclosure, when predicting the monthly shipping order volume, the historical shipping order volume data of the last 2-3 years can be used as features. Correspondingly, the SMA model and the SES model can be used for weighted calculation. For months containing target dates such as promotion days and holidays, the ratio of the previous month to the month in the historical year can be used to make adjustments. By predicting the shipping order volume at the end of the month, it is possible to timely understand the shipping order volume of the month containing the target date, and to allocate human resources in advance. At the same time, it is also possible to make further plans for the future workload and future development of the sales department.
[0169] In the waybill quantity prediction method provided in the exemplary implementation mode of the present disclosure, by obtaining the basic data of each logistics network point, the basic data includes real-time waybill quantity data, historical waybill quantity data and target date data; based on the basic data, the predicted waybill quantity data of each logistics network point in the target time period is obtained by using the preset waybill quantity prediction model; when the target time period includes the target date, the target waybill quantity data of the target date is determined according to the historical waybill quantity data corresponding to the target date, and the predicted waybill quantity data of the target time period is updated according to the target waybill quantity data. On the one hand, by adding the real-time waybill quantity data as a feature to the prediction model, the waybill quantity in the near future (including the current day) can be adjusted in time, and the flexible work arrangement of each logistics network point is facilitated according to the real-time waybill quantity change, which provides an objective and scientific data basis for the resource allocation of logistics distribution; on the other hand, after the waybill quantity prediction is completed by using the prediction model, the predicted waybill quantity of the target date such as holidays and promotion days is adjusted separately, avoiding the situation where the prediction error of the target date is large, thereby improving the accuracy of the waybill quantity prediction. Furthermore, in the long term, it can effectively help managers at all levels reserve human and material resources to flexibly respond to situations such as a surge in the number of shipping orders on promotional days.
[0170] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0171] Furthermore, in this exemplary embodiment, a device for predicting the number of shipping orders is also provided, which can be applied to a server or a terminal device. Figure 7 As shown, the waybill quantity prediction device 700 may include a data acquisition module 710, an entity recognition module 720 and an entity mapping module 730, wherein:
[0172] The data acquisition module 710 is used to acquire basic data of each logistics network point, wherein the basic data includes real-time waybill quantity data, historical waybill quantity data and target date data;
[0173] The data prediction module 720 is used to obtain the predicted waybill quantity data of each logistics network point in the target time period based on the basic data and using a preset waybill quantity prediction model;
[0174] The data update module 730 is used to determine the target waybill quantity data of the target date according to the historical waybill quantity data corresponding to the target date when the target time period includes the target date, and to update the predicted waybill quantity data of the target time period according to the target waybill quantity data.
[0175] In an optional implementation, the waybill quantity prediction model includes a regression model and a smoothing model; the data prediction module 720 includes:
[0176] A feature extraction module, used to extract features from the basic data to obtain basic feature data;
[0177] A length determination module, used to determine the sequence length of the historical waybill quantity data in the basic feature data;
[0178] A first prediction module, used for obtaining predicted waybill quantity data of each logistics network point in the target time period by using the smoothing model when the sequence length is less than a preset sequence length threshold;
[0179] The second prediction module is used to use the regression model to obtain the predicted waybill quantity data of each logistics network point in the target time period when the sequence length is greater than or equal to the sequence length threshold.
[0180] In an optional implementation, the basic feature data includes at least a statistical feature and a time feature, the statistical feature includes a first statistical feature and a second statistical feature; the feature extraction module includes:
[0181] A data acquisition submodule, configured to acquire historical waybill quantity data of a lag time period corresponding to the target time period according to the length of the target time period;
[0182] A first feature extraction submodule, configured to determine a first statistical feature of the historical waybill quantity data of the hysteresis time period according to the historical waybill quantity data of the hysteresis time period;
[0183] A second feature extraction submodule is used to extract a second statistical feature of the historical waybill quantity data of the upper-level logistics network to which each of the logistics network belongs in the first preset time period;
[0184] The third feature extraction submodule is used to extract the time features of each time point within the target time period based on the target date data.
[0185] In an optional embodiment, the smoothing model includes a first smoothing model and a second smoothing model; the first prediction module is configured to obtain the historical waybill volume data of each of the logistics outlets in the second preset time period; based on the historical waybill volume data, the first smoothing model and the second smoothing model are used to perform weighted calculation to obtain the predicted waybill volume data of each of the logistics outlets in the target time period.
[0186] In an optional embodiment, the regression model includes a first regression model and a second regression model; the second prediction module is configured to perform weighted calculation based on the basic feature data using the trained first regression model and the second regression model to obtain the predicted waybill volume data of each logistics outlet in the target time period; or compare the performance parameters of the trained first regression model with the performance parameters of the second regression model to obtain a target waybill volume prediction model, and use the target waybill volume prediction model to obtain the predicted waybill volume data of each logistics outlet in the target time period.
[0187] In an optional embodiment, the waybill quantity prediction device 700 also includes a model training module, which is configured to construct a plurality of the first regression models according to the length of the target time period, each of the first regression models corresponding to a different sub-time period within the target time period; obtain a training data set and a test data set of each logistics outlet; use the training data set to train each of the first regression models and the second regression model; and use the test data set to determine the performance parameters of each of the first regression models and the performance parameters of the second regression model.
[0188] In an optional embodiment, the target waybill volume prediction model is the first regression model; the second prediction module is further configured to use each of the first regression models to obtain the predicted waybill volume data of each of the logistics outlets in the corresponding sub-time period; and obtain the predicted waybill volume data of the target time period based on the predicted waybill volume data of each of the sub-time periods.
[0189] In an optional embodiment, the data update module 730 is configured to obtain the historical waybill quantity data corresponding to the target date, the historical waybill quantity data including the actual waybill quantity data of the target date in the historical period, the first statistical waybill quantity data in the historical time period adjacent to the target date in the historical period, and the second statistical waybill quantity data in the historical time period adjacent to the target date in the current period; calculate the waybill quantity change ratio of the target date based on the actual waybill quantity data and the first statistical waybill quantity data; calculate the full waybill quantity data of the target date based on the waybill quantity change ratio and the second statistical waybill quantity data; determine the target waybill quantity data of each logistics outlet on the target date based on the full waybill quantity data.
[0190] In an optional embodiment, the waybill quantity prediction device 700 also includes a waybill quantity update module for the current day, and the waybill quantity update module for the current day is configured to calculate the waybill quantity ratio at the target moment based on the real-time waybill quantity data at the target moment within a third preset time period and the historical total waybill quantity data corresponding to the target moment within the third preset time period when the target time period includes the current day; obtain the real-time waybill quantity data at the target moment within the current day, and determine the actual waybill quantity data for the current day based on the real-time waybill quantity data and the waybill quantity ratio; determine the target waybill quantity data for the current day based on the actual waybill quantity data for the current day and the predicted waybill quantity data for the current day.
[0191] The specific details of each module in the above-mentioned waybill quantity prediction device have been described in detail in the corresponding waybill quantity prediction method, so they will not be repeated here.
[0192] Each module in the above device can be a general-purpose processor, including: a central processing unit, a network processor, etc.; it can also be a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each module can also be implemented in the form of software, firmware, etc. Each processor in the above device can be an independent processor or integrated together.
[0193] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of this specification is stored. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "exemplary method" section of this specification. The program product may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, an apparatus or a device or used in combination with it.
[0194] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0195] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0196] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0197] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0198] The exemplary embodiment of the present disclosure also provides an electronic device capable of implementing the above method. Figure 8 800 according to this exemplary embodiment of the present disclosure will be described. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0199] like Figure 8 As shown, the electronic device 800 may be in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
[0200] The storage unit 820 stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 810 can execute Figures 2 to 5 Any one or more method steps.
[0201] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 821 and / or a cache memory unit 822 , and may further include a read-only memory unit (ROM) 823 .
[0202] The storage unit 820 may also include a program / utility 824 having a set (at least one) of program modules 825, such program modules 825 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0203] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0204] The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 880. As shown, the network adapter 880 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0205] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary implementation of the present disclosure.
[0206] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiment of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0207] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0208] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for predicting the number of shipping orders, characterized in that: include: Obtain basic data of each logistics outlet, including real-time waybill volume data, historical waybill volume data and target date data; Based on the basic data, a preset waybill quantity prediction model is used to obtain the predicted waybill quantity data of each logistics network point in the target time period; When the target time period includes a target date, the target waybill volume data for the target date is determined based on the historical waybill volume data corresponding to the target date, and the predicted waybill volume data for the target time period is updated based on the target waybill volume data.
2. The method for predicting the number of shipping orders according to claim 1, characterized in that: The waybill quantity prediction model includes a regression model and a smoothing model; The method of obtaining the predicted waybill quantity data of each logistics network point in the target time period based on the basic data by using a preset waybill quantity prediction model includes: Extracting features from the basic data to obtain basic feature data; Determine the sequence length of the historical waybill quantity data in the basic feature data; When the sequence length is less than a preset sequence length threshold, the smoothing model is used to obtain the predicted waybill quantity data of each logistics network point in the target time period; When the sequence length is greater than or equal to the sequence length threshold, the regression model is used to obtain the predicted waybill quantity data of each logistics network point in the target time period.
3. The method for predicting the number of shipping orders according to claim 2, characterized in that: The basic feature data at least includes a statistical feature and a time feature, and the statistical feature includes a first statistical feature and a second statistical feature; The step of extracting features from the basic data to obtain basic feature data includes: Acquire historical waybill quantity data for a lag time period corresponding to the target time period according to the length of the target time period; Determine a first statistical feature of the historical waybill quantity data for the hysteresis time period according to the historical waybill quantity data for the hysteresis time period; Extracting a second statistical feature of the historical waybill quantity data of the upper-level logistics network to which each of the logistics network belongs in the first preset time period; The time features of each time point within the target time period are extracted based on the target date data.
4. The method for predicting the number of shipping orders according to claim 2, characterized in that: The smoothing model includes a first smoothing model and a second smoothing model; The using the smoothing model to obtain the predicted waybill quantity data of each logistics network point in the target time period includes: Obtaining historical waybill volume data of each of the logistics outlets in a second preset time period; Based on the historical waybill quantity data, the first smoothing model and the second smoothing model are used to perform weighted calculation to obtain the predicted waybill quantity data of each logistics network point in the target time period.
5. The method for predicting the number of shipping orders according to claim 2, characterized in that: The regression model includes a first regression model and a second regression model; The method of using the regression model to obtain the predicted waybill quantity data of each logistics outlet in the target time period includes: Based on the basic feature data, weighted calculation is performed using the trained first regression model and the second regression model to obtain the predicted waybill quantity data of each logistics network point in the target time period; or The performance parameters of the trained first regression model and the performance parameters of the second regression model are compared to obtain a target waybill quantity prediction model, and the target waybill quantity prediction model is used to obtain the predicted waybill quantity data of each logistics outlet in the target time period.
6. The method for predicting the number of shipping orders according to claim 5, characterized in that: Before obtaining the predicted waybill quantity data of each logistics network point in the target time period by using the regression model, the method further includes: constructing a plurality of the first regression models according to the length of the target time period, each of the first regression models corresponding to a different sub-time period within the target time period; Obtain training data sets and test data sets for each logistics network point; Using the training data set to train each of the first regression model and the second regression model; The test data set is used to determine performance parameters of each of the first regression model and the second regression model.
7. The method for predicting the number of shipping orders according to claim 5, characterized in that: The target waybill quantity prediction model is the first regression model; The using the target waybill quantity prediction model to obtain the predicted waybill quantity data of each logistics outlet in the target time period includes: Using each of the first regression models to obtain the predicted waybill quantity data of each of the logistics outlets in the corresponding sub-time period; The predicted waybill quantity data for the target time period is obtained based on the predicted waybill quantity data for each of the sub-time periods.
8. The method for predicting the number of shipping orders according to claim 1, characterized in that: The determining the target waybill quantity data for the target date according to the historical waybill quantity data corresponding to the target date includes: Acquire the historical waybill quantity data corresponding to the target date, the historical waybill quantity data including actual waybill quantity data of the target date in a historical cycle, first statistical waybill quantity data in a historical time period adjacent to the target date in the historical cycle, and second statistical waybill quantity data in the historical time period adjacent to the target date in a current cycle; Calculate the change ratio of the waybill quantity on the target date according to the actual waybill quantity data and the first statistical waybill quantity data; Calculate the total waybill quantity data on the target date according to the waybill quantity change ratio and the second statistical waybill quantity data; The target waybill quantity data of each logistics outlet on the target date is determined based on the full waybill quantity data.
9. The method for predicting the number of shipping orders according to claim 1, characterized in that: After updating the predicted waybill quantity data for the target time period according to the target waybill quantity data, the method further includes: When the target time period includes the current day, the waybill volume ratio at the target time is calculated based on the real-time waybill volume data at the target time within the third preset time period and the historical total waybill volume data corresponding to the target time within the third preset time period; Acquire real-time waybill quantity data at the target time on the day, and determine actual waybill quantity data on the day according to the real-time waybill quantity data and the waybill quantity ratio; The target waybill quantity data for the day is determined based on the actual waybill quantity data for the day and the predicted waybill quantity data for the day.
10. A waybill quantity prediction device, characterized in that: include: A data acquisition module is used to acquire basic data of each logistics network point, wherein the basic data includes real-time waybill quantity data, historical waybill quantity data and target date data; A data prediction module, used to obtain the predicted waybill quantity data of each logistics network point in the target time period based on the basic data and using a preset waybill quantity prediction model; A data update module is used to determine the target waybill quantity data for the target date based on the historical waybill quantity data corresponding to the target date when the target time period includes the target date, and to update the predicted waybill quantity data for the target time period based on the target waybill quantity data.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting the quantity of waybills described in any one of claims 1 to 9 is implemented.
12. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the waybill quantity prediction method described in any one of claims 1-9 by executing the executable instructions.
