Logistics data processing method and device, storage medium, and equipment

By selecting a suitable smoothing model in the logistics data processing to process historical data and eliminating outliers, the problem of low accuracy in logistics cargo prediction in the prior art is solved, and the accuracy of prediction results and sorting efficiency are improved.

CN113793162BActive Publication Date: 2025-01-14BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010929265.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-07
Publication Date
2025-01-14
Estimated Expiration
2040-09-07

AI Technical Summary

Technical Problem

In the existing logistics cargo forecasting methods, the outliers are not completely smooth, resulting in low accuracy of the prediction results and some outliers are not identified, affecting the accuracy of logistics cargo forecasting.

Method used

Through the preset HTTP interface, obtain historical logistics data from the cluster, use multiple data smoothing models to smooth the processed cargo volume, select the target smoothing model corresponding to the historical logistics data, eliminate noise and outliers, and obtain the target processing The results are made and the volume of shipments in the future time period is predicted.

Benefits of technology

It improves the accuracy of logistics cargo forecasting, avoids cargo backlog or equipment idle problems caused by excessive or too little sorting equipment, improves cargo sorting efficiency and user experience, and improves the efficiency of historical logistics data acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113793162B_ABST
    Figure CN113793162B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention is about a logistics data processing method and device, storage medium, and equipment, and relates to the field of big data processing technology. The method includes: obtaining historical logistics data from a cluster, and extracting the processed cargo volume in each time period of the area to be predicted included in the historical logistics data; using multiple data smoothing models to smooth the processed cargo volume, and obtain multiple current smoothing results, and according to the processed cargo volume and the current smoothing results, selecting a target smoothing model corresponding to the historical logistics data from each data smoothing model; using the target smoothing model to smooth the processed cargo volume, and obtain the target processing result; according to the target processing result, predicting the cargo volume to be processed in the area to be predicted in the future time period, and sending the prediction result to the device terminal of the area to be predicted, so that the device terminal can display the prediction result. The embodiment of the present invention improves the accuracy of the prediction result of logistics cargo volume.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the continuous development of e-commerce, major e-commerce companies have made huge investments in logistics supply chain technology. One of the core technologies of logistics supply chain is logistics cargo volume forecasting technology, which is the cornerstone of decision-making systems such as recruitment and allocation of logistics centers. Therefore, it is very important to predict the logistics cargo volume that needs to be handled in a certain period of time in the future.

[0003] When predicting the volume of logistics cargo, high-quality historical time series data is very important for predicting the volume of cargo that needs to be processed on a daily basis (such as the number of historical processed items). In actual application scenarios, a general data smoothing algorithm is usually selected to smooth the historical time series data, and then future demand is predicted based on the smoothing results.

[0004] However, the above-mentioned smoothing method has the following disadvantages: the outliers are not completely smoothed and some outliers still exist, that is, the number of identified outliers is lower than the actual data volume, which leads to low accuracy of the prediction results of logistics cargo volume.

[0005] Therefore, it is necessary to provide a new logistics data processing method and device.

[0006] 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 invention, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention

[0007] The purpose of the present invention is to provide a logistics data processing method, a logistics data processing device, a computer-readable storage medium and an electronic device, so as to at least to some extent overcome the problem of low accuracy of logistics cargo volume prediction results caused by the limitations and defects of related technologies.

[0008] According to one aspect of the present disclosure, a logistics data processing method is provided, comprising:

[0009] Based on a preset HTTP interface, historical logistics data is obtained from the cluster, and the processed cargo volume of the to-be-predicted area in each time period included in the historical logistics data is extracted;

[0010] Smoothing the processed cargo volume using multiple data smoothing models to obtain multiple current smoothing results, and selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the processed cargo volume and the current smoothing results;

[0011] Using the target smoothing model to smooth the processed cargo volume to obtain a target processing result;

[0012] The cargo volume to be processed in the to-be-predicted area in a future time period is predicted according to the target processing result, and the prediction result is sent to the device terminal in the to-be-predicted area so that the prediction result is displayed on the device terminal.

[0013] In an exemplary embodiment of the present disclosure, selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the processed cargo volume and the current smoothing processing result includes:

[0014] Calculating the standard deviation of the processed cargo volume and the difference between the processed cargo volume and the current smoothing result;

[0015] constructing an objective function according to the standard deviation and the difference between the processed cargo volume and the current smoothing result;

[0016] According to the objective function, a target smoothing model corresponding to the historical logistics data is selected from each of the data smoothing models.

[0017] In an exemplary embodiment of the present disclosure, selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the objective function includes:

[0018] Based on the principle of making the objective function obtain the minimum value, a target smoothing model corresponding to the historical logistics data is selected from each of the data smoothing models.

[0019] In an exemplary embodiment of the present disclosure, the logistics data processing method further includes:

[0020] Calculating a first average value of the processed cargo volume and a second average value of the current smoothing result;

[0021] Constructing a constraint condition of the objective function according to the first average value and the second average value;

[0022] Wherein, the principle of making the objective function obtain the minimum value is to select the target smoothing model corresponding to the historical logistics data from each of the data smoothing models, including:

[0023] On the premise of satisfying the restriction conditions, and in accordance with the principle of making the objective function obtain the minimum value, a target smoothing model corresponding to the historical logistics data is selected from the data smoothing models.

[0024] In an exemplary embodiment of the present disclosure, constructing an objective function according to the standard deviation and the difference between the processed cargo volume and the current smoothing result includes:

[0025] Calculate the difference ratio between the processed cargo volume and the current smoothing result according to the sum of the difference between the processed cargo volume and the current smoothing result, and the size relationship between the processed cargo volume and the current smoothing result;

[0026] The objective function is constructed according to the standard deviation and the difference ratio.

[0027] In an exemplary embodiment of the present disclosure, the smoothing process of the processed cargo volume using the target smoothing model to obtain the target processing result includes:

[0028] The target smoothing model is used to remove noise and outliers included in the processed cargo volume to obtain the target processing result.

[0029] In an exemplary embodiment of the present disclosure, the data smoothing model includes multiple ones of a moving average smoothing model, a quantile smoothing model, a lognormal distribution smoothing model and a local weighted smoothing model.

[0030] According to one aspect of the present disclosure, there is provided a logistics data processing device, comprising:

[0031] A data acquisition module, used to acquire historical logistics data from the cluster based on a preset HTTP interface, and extract the processed cargo volume of the to-be-predicted area in each time period included in the historical logistics data;

[0032] a smoothing model determination module, configured to use a plurality of data smoothing models to perform smoothing processing on the processed cargo volume, obtain a plurality of current smoothing processing results, and select a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the processed cargo volume and the current smoothing processing results;

[0033] A smoothing processing module, used for smoothing the processed cargo volume using the target smoothing model to obtain a target processing result;

[0034] The cargo volume prediction module is used to predict the cargo volume to be processed in the to-be-predicted area in a future time period according to the target processing result, and send the prediction result to the device terminal of the to-be-predicted area so that the device terminal displays the prediction result.

[0035] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the logistics data processing method described in any one of the above is implemented.

[0036] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0037] Processor; and

[0038] A memory, configured to store executable instructions of the processor;

[0039] Wherein, the processor is configured to execute any one of the above-mentioned logistics data processing methods by executing the executable instructions.

[0040] A logistics data processing method provided by an embodiment of the present invention, on the one hand, extracts the processed cargo volume of the to-be-predicted area in each time period included in the historical logistics data from a cluster based on a preset HTTP interface; and uses multiple data smoothing models to smooth the processed cargo volume to obtain multiple current smoothing processing results, and selects a target smoothing model corresponding to the historical logistics data from each data smoothing model according to the processed cargo volume and the current smoothing processing result; then uses the target smoothing model to smooth the processed cargo volume to obtain the target processing result; finally, according to the target processing result, predicts the to-be-predicted cargo volume in the future time period of the to-be-predicted area, and sends the predicted result to the device terminal of the to-be-predicted area, so that the device terminal can display the predicted result. Since the target smoothing model corresponding to the historical logistics data can be selected according to the processed cargo volume and the current smoothing processing result, This can solve the problem in the prior art that due to the fact that the outliers are not completely smoothed, some outliers still exist, that is, the number of identified outliers is lower than the actual data volume, which leads to low accuracy of logistics cargo volume prediction results; on the other hand, by predicting the cargo volume to be processed in the prediction area in the future time period according to the target processing result, and sending the prediction result to the device terminal of the prediction area, so that the device terminal can display the prediction result, the prediction area can be equipped with corresponding cargo sorting equipment according to the prediction result, avoiding the problem of cargo backlog or idle sorting equipment due to excessive or insufficient sorting equipment, thereby improving the sorting efficiency of goods and improving the user experience; on the other hand, based on the preset HTTP interface, historical logistics data can be obtained from the cluster, thereby improving the efficiency of obtaining historical logistics data, and thus improving the prediction efficiency of the cargo volume to be processed.

[0041] 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 invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification are used to explain the principles of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0043] Figure 1 A flow chart of a logistics data processing method according to an exemplary embodiment of the present invention is schematically shown.

[0044] Figure 2 A schematic diagram of time series data to be smoothed according to an exemplary embodiment of the present invention is schematically shown.

[0045] Figure 3 A block diagram schematically shows a logistics data processing system according to an exemplary embodiment of the present invention.

[0046] Figure 4 A flowchart of a method for selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the processed cargo volume and the current smoothing processing result according to an exemplary embodiment of the present invention is schematically shown.

[0047] Figure 5 A flowchart of a method for constructing an objective function according to a standard deviation and a difference between a processed cargo volume and a current smoothing result according to an exemplary embodiment of the present invention is schematically shown.

[0048] Figure 6 A flowchart schematically illustrates another method for processing logistics data according to an exemplary embodiment of the present invention.

[0049] Figure 7 A comparison diagram of a processed cargo volume to be smoothed and a target processing result after smoothing is schematically shown according to an exemplary embodiment of the present invention.

[0050] Figure 8 A block diagram schematically shows a logistics data processing device according to an exemplary embodiment of the present invention.

[0051] Fig. 9 An electronic device for implementing the above-mentioned logistics data processing method according to an exemplary embodiment of the present invention is schematically shown. DETAILED DESCRIPTION

[0052] 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 invention will be more comprehensive and complete, and the concept of the example embodiments will be 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 invention. However, those skilled in the art will appreciate that the technical solutions of the present invention 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 invention.

[0053] In addition, the accompanying drawings are only schematic illustrations of the present invention 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.

[0054] In this exemplary embodiment, a logistics data processing method is first provided, which can be run on a server, a server cluster or a cloud server, etc. Of course, those skilled in the art can also run the method of the present invention on other platforms as required, and this exemplary embodiment does not specifically limit this. Figure 1 As shown, the logistics data processing method may include the following steps:

[0055] Step S110. Based on a preset HTTP interface, historical logistics data is obtained from the cluster, and the processed cargo volume of the to-be-predicted area in each time period included in the historical logistics data is extracted;

[0056] Step S120. Smoothing the processed cargo volume using multiple data smoothing models to obtain multiple current smoothing results, and selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the processed cargo volume and the current smoothing results;

[0057] Step S130. Smoothing the processed cargo volume using the target smoothing model to obtain a target processing result;

[0058] Step S140. Predict the cargo volume to be processed in the to-be-predicted area in a future time period according to the target processing result, and send the prediction result to the device terminal of the to-be-predicted area so that the device terminal displays the prediction result.

[0059] In the above-mentioned logistics data processing method, on the one hand, the processed cargo volume of the to-be-predicted area in each time period included in the historical logistics data is extracted from the cluster based on a preset HTTP interface; and the processed cargo volume is smoothed using multiple data smoothing models to obtain multiple current smoothing results, and according to the processed cargo volume and the current smoothing results, a target smoothing model corresponding to the historical logistics data is selected from each data smoothing model; the processed cargo volume is then smoothed using the target smoothing model to obtain the target processing result; finally, according to the target processing result, the to-be-predicted cargo volume in the future time period is predicted, and the prediction result is sent to the device terminal of the to-be-predicted area, so that the device terminal displays the prediction result. Since the target smoothing model corresponding to the historical logistics data can be selected according to the processed cargo volume and the current smoothing result, the solution can be obtained. The invention solves the problem in the prior art that due to the fact that the outliers are not completely smoothed, some outliers still exist, that is, the number of identified outliers is lower than the actual data volume, which leads to low accuracy of logistics cargo volume prediction results; on the other hand, by predicting the cargo volume to be processed in the future time period of the to-be-predicted area according to the target processing result, and sending the prediction result to the device terminal of the to-be-predicted area, so that the device terminal can display the prediction result, so that the to-be-predicted area can be equipped with corresponding cargo sorting equipment according to the prediction result, avoiding the problem of cargo backlog or idle sorting equipment caused by too much or too little sorting equipment, thereby improving the sorting efficiency of goods and improving the user experience; on the other hand, based on the preset HTTP interface, historical logistics data can be obtained from the cluster, thereby improving the efficiency of obtaining historical logistics data, and thus improving the prediction efficiency of the to-be-processed cargo volume.

[0060] Hereinafter, the steps included in the logistics data processing method according to the exemplary embodiment of the present invention will be explained and illustrated in detail with reference to the accompanying drawings.

[0061] First, the terms involved in the exemplary embodiments of the present invention are explained.

[0062] Moving average smoothing: A fixed window is used to calculate the mean and standard deviation within the window, and the 3sigma value is calculated as the outlier threshold. Time series greater than the threshold are defined as outliers and filled with the mean or median. Among them, 3sigma is the probability that the value is distributed in (μ-3σ, μ+3σ) with a distribution of 0.9974. In the normal distribution, σ represents the standard deviation, μ represents the mean, and x=μ is the axis of symmetry of the image.

[0063] Lowess (Locally Weighted Regression) smoothing: Locally weighted smoothing uses the Lowess method to fit the time series and generate a new time series;

[0064] Quantile smoothing: Calculate the outlier threshold of the box plot. Values ​​greater than the threshold are defined as outliers and filled with the mean or median.

[0065] Lognormal distribution (lognorm) smoothing: If the logarithm of a random variable follows a normal distribution, then the random variable follows a lognormal distribution. In the short term, the lognormal distribution is very close to the normal distribution.

[0066] Secondly, the application scenarios of the exemplary embodiments of the present invention are explained and illustrated.

[0067] When predicting the logistics volume, high-quality historical time series data is very important for predicting the daily logistics volume (such as the historical number of processed items). However, in actual scenarios, due to various factors, the historical time series data contains some abnormal data points. The optimal smoothing technology can minimize the impact of historical abnormal points on predicting future demand. Figure 2 As shown, the horizontal axis is the time axis and the vertical axis is the volume of goods processed. It can be seen that there is an extreme outlier value near 20. This outlier needs to be processed by smoothing technology, otherwise it will have a great impact on demand forecasts, easily causing the forecast to be too high, thereby increasing the number of sorting equipment and causing the sorting equipment to be idle. Smoothing means eliminating extreme outliers and filling them with an available value.

[0068] The existing smoothing methods and smoothing effects are different. How to select a suitable smoothing algorithm based on the characteristics of time series data itself becomes a difficult point. The existing methods usually select a smoothing algorithm for the data set based on the characteristics of the data set, with the help of visualization or subjective manual experience, to perform smoothing.

[0069] However, the selected smoothing algorithm may only be suitable for part of the time series data in the data set, while the other part of the time series data does not achieve the optimal effect, which will lead to the following results:

[0070] One is undersmoothing: outliers are not completely smoothed and some outliers still exist, that is, the provided algorithm cannot accurately identify anomalies in the data, which is usually manifested as the number of identified outliers is lower than the actual data volume, which ultimately leads to a high risk of prediction results;

[0071] The other is over-smoothing: too many smoothed data points, and normal values ​​are mistakenly smoothed as outliers. This usually manifests as the number of identified outliers far exceeding the actual number, which ultimately leads to the risk of underestimation of the prediction results;

[0072] Furthermore, when the data set is relatively small, the appropriate smoothing algorithm can be selected manually with the help of visualization or subjective experience. However, when the data size increases exponentially, the subjective experience method is unrealistic in terms of human resources or availability.

[0073] Finally, the logistics data processing system involved in the exemplary embodiment of the present invention is explained and illustrated. Figure 3 As shown, the logistics data processing system may include a cluster 310, a logistics data analysis system 320 and a device terminal 330 of the area to be predicted. The cluster is connected to the logistics data analysis system and the device terminal of the area to be predicted respectively, and the data analysis system is connected to the device terminal of the area to be predicted.

[0074] Specifically, the cluster is used to store the historical logistics data generated in the area to be predicted; the production process of the historical logistics data is as follows: the sorting equipment in the center to be predicted scans each package, and then the sorting equipment uploads the scanned data of each package to the device terminal in the area to be predicted, and the device terminal summarizes the data of each package and then uploads it to the cluster, which can be a Hadoop cluster or other clusters, and this example does not impose any special restrictions on this.

[0075] Furthermore, the logistics data analysis system can provide two HTTP service interfaces: data acquisition and message push, which are used to obtain historical logistics data and push prediction results to device terminals in the area to be predicted; at the same time, the logistics data analysis system can be used to implement the logistics data processing method described in the example embodiment of the present invention.

[0076] Hereinafter, step S110 to step S140 will be explained and illustrated.

[0077] In step S110, based on a preset HTTP interface, historical logistics data is obtained from the cluster, and the processed cargo volume of the to-be-predicted area in each time period included in the historical logistics data is extracted.

[0078] In this example embodiment, first, the time series data acquisition module can be used to obtain historical logistics data of a preset time period from the cluster through a preset HTTP interface, wherein the preset time period can be divided into days, hours, minutes, etc.; then, the volume of goods processed on each day in the past period of time (for example, one month) in the area to be predicted included in the historical logistics data is obtained, that is, the number of packages processed by the area to be predicted on each day.

[0079] In step S120, the processed cargo volume is smoothed using multiple data smoothing models to obtain multiple current smoothing results, and based on the processed cargo volume and the current smoothing results, a target smoothing model corresponding to the historical logistics data is selected from each of the data smoothing models.

[0080] In this example embodiment, first, multiple data smoothing models are used to smooth the processed cargo volume to obtain multiple current smoothing processing results; wherein the data smoothing models include multiple of the moving average smoothing model, the quantile smoothing model, the log-normal distribution smoothing model and the local weighted smoothing model, etc.; the specific processing method is: a matrix is ​​generated according to the above-mentioned processed cargo volume and the time series (each day) included in the historical logistics data, wherein the time series included in the behavior of the matrix is ​​listed as the cargo volume processed by each area to be predicted on each day. Then, the matrix is ​​input into the above-mentioned data smoothing model to obtain multiple current smoothing processing results; wherein each data smoothing model corresponds to a current smoothing processing result.

[0081] Secondly, after obtaining the current smoothing result, the target smoothing model corresponding to the historical logistics data can be selected from various data smoothing models according to the processed cargo volume and the current smoothing result. Figure 4 As shown, according to the processed cargo volume and the current smoothing processing result, selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models may include steps S410 to S430. Among them:

[0082] In step S410, the standard deviation of the processed cargo volume and the difference between the processed cargo volume and the current smoothing result are calculated.

[0083] In this example embodiment, the calculation method of the standard deviation of the processed cargo volume can be shown in the following formula (1):

[0084]

[0085] Among them, σ(ΔX) is the standard deviation, n is the number of days included in the historical cargo volume data, and x i is the i-th historical cargo volume data (the processed cargo volume on the i-th day), and μ1 is the first average value of the processed cargo volume. It should be noted here that the above historical cargo volume data can also be the sales volume of a certain category of goods in a certain period of time, or other types of data, and this example does not impose special restrictions on this.

[0086] In step S420, an objective function is constructed according to the standard deviation and the difference between the processed cargo volume and the current smoothing result;

[0087] Specifically, refer to Figure 5 As shown, according to the standard deviation and the difference between the processed cargo volume and the current smoothing result, constructing the objective function may include steps S510 and S520.

[0088] In step S510, the difference ratio between the processed cargo volume and the current smoothing result is calculated according to the sum of the difference between the processed cargo volume and the current smoothing result and the size relationship between the processed cargo volume and the current smoothing result;

[0089] In step S520, the objective function is constructed according to the standard deviation and the difference ratio.

[0090] The following will explain and illustrate step S510 to step S520. Specifically, the objective function is constructed according to the difference ratio and the standard deviation, which can be specifically shown in the following formula (1):

[0091]

[0092] Where obj is the objective function, σ(ΔX) is the standard deviation, and x i is the volume of cargo handled for item i, y i is the current smoothing result of the i-th item; is the sum of the differences between the processed volume and the current smoothing result, β is a bias parameter greater than zero, I(·) is the indicator function, and:

[0093]

[0094] is the difference ratio.

[0095] It should be noted that in the calculation process of the difference ratio, in order to avoid the situation where the denominator is zero, a bias parameter is added. By configuring this objective function, noise and outliers can be eliminated more thoroughly, the accuracy of the evaluation index can be improved, and the problem of under-smoothing can be solved.

[0096] In step S430, based on the objective function, a target smoothing model corresponding to the historical logistics data is selected from each of the data smoothing models.

[0097] Specifically, based on the principle of making the objective function obtain a minimum value, a target smoothing model corresponding to the historical logistics data is selected from the data smoothing models.

[0098] Furthermore, in order to further improve the accuracy of the selected target smoothing model, the logistics data processing method may further include: calculating the first average value of the processed cargo volume and the second average value of the current smoothing processing result; and constructing the constraint condition of the objective function according to the first average value and the second average value. Further, after obtaining the constraint condition, the target smoothing model corresponding to the historical logistics data can be selected from the data smoothing models on the premise of satisfying the constraint condition and in accordance with the principle of making the objective function obtain the minimum value.

[0099] Specifically, the restriction condition can be expressed as the following formula (3):

[0100] stkurtosis(Y)≥α*kurtosis(X); Formula (3)

[0101] Among them, st is the restriction condition, α is the kurtosis restriction coefficient, which can also be called the kurtosis restriction coefficient, which can be used to characterize the characteristic number of the peak height of the probability density distribution curve at the mean value; that is, the kurtosis reflects the sharpness of the peak. The kurtosis of the sample is a statistic compared with the normal distribution. If the kurtosis is greater than three, the shape of the peak is sharper and steeper than the normal distribution peak;

[0102] kurtosis(X) is the kurtosis of the volume of cargo handled, μ1 is the first mean, X is the volume of cargo handled, and E(·) is an exponential function;

[0103] kurtosis(Y) is the kurtosis of the current smoothing result, μ2 is the second mean, Y is the current smoothing result.

[0104] It should be noted here that by configuring the above-mentioned restriction items, the problem existing in the prior art that due to too many smoothed data points, normal values ​​are mistakenly smoothed as abnormal values, that is, the number of identified abnormal points is far greater than the actual number, which also leads to low accuracy of the prediction results can be solved, thereby improving the accuracy of the cargo volume prediction results.

[0105] Based on this, the target smoothing model can be selected from the preset smoothing models according to the objective function and the restricted items. The specific selection process is: the current smoothing processing result after each preset smoothing model is evaluated using the smoothing effect evaluation index (objective function and restricted items). On the premise of satisfying the restricted items in the evaluation index, the smoothing model that makes the objective function obj achieve the minimum value is used as the target smoothing model.

[0106] In step S130, the processed cargo volume is smoothed using the target smoothing model to obtain a target processing result.

[0107] In this example embodiment, the target smoothing model can be used to eliminate the noise and outliers included in the processed cargo volume to obtain the target processing result. Specifically, the target smoothing model is taken as the LOESS smoothing model as an example to explain and illustrate the specific smoothing process. First, an input matrix can be constructed with each day as a row and the processed cargo volume of each day in the area to be predicted as a column. Then, the input matrix is ​​input into the LOESS smoothing model to obtain the target processing result after smoothing. Among them, LOESS uses the weighted least squares method for local fitting. The specific fitting steps are as follows:

[0108] First, with a point x1 as the center, determine a data interval with a length of f, which depends on q=fn, where q is the number of observations participating in the local regression, f is the ratio of the number of observations participating in the local regression to the number of observations, and n represents the number of observations. In general, the value of f is between 1 / 3-2 / 3, and there is no clear criterion for q and f. The smoothness of the curve is related to the proportion of selected data: the smaller the proportion, the less smooth the fit (because it places too much emphasis on local properties), and vice versa.

[0109] Secondly, define the weights of all points in the interval. The weights are determined by the weight function. The weight of any point (x1, y1) is the height of the weight function curve at x1. The weight function has the following three characteristics: on the one hand, the point (x1, y1) has the maximum weight; on the other hand, the weight gradually decreases as x moves farther away from x1; on the other hand, the weight function is symmetrical around x1. To put it simply, it gives higher weights to nearby points.

[0110] Furthermore, a weighted linear regression is performed on this segment of data using the weight function w to obtain the smoothed value (x1, y1) at x1, where y1 is the corresponding value of the fitted curve.

[0111] Finally, the above steps are repeated for each point, and a set of smooth points (x i ,y i ). Connecting these smooth points with short straight lines will give the LOESS curve, and then the above target processing results can be obtained.

[0112] In step S140, the cargo volume to be processed in the to-be-predicted area in the future time period is predicted according to the target processing result, and the prediction result is sent to the device terminal of the to-be-predicted area so that the device terminal displays the prediction result.

[0113] In this example embodiment, after obtaining the above-mentioned target processing results, the above-mentioned target processing results can be input into the data prediction model, and then the quantity of goods to be processed in the future time period can be output and then displayed, so that the user can configure the required sorting equipment according to the prediction results. The sorting mechanism can include sorting personnel, unmanned guided vehicles, etc.

[0114] The following, combined Figure 6 The logistics data processing method of the exemplary embodiment of the present invention is further explained and illustrated. Specifically, the technical key point of the present invention is that by automatically finding the optimal smoothing model, the most suitable smoothing model can be automatically found for each historical logistics data, so that the target processing result is neither under-smoothed nor over-smoothed. When automatically finding the optimal smoothing model, a smoothing effect evaluation index is formulated, and the optimal evaluation algorithm is obtained through the evaluation index. Specifically, refer to Figure 6 As shown, the logistics data processing method may include the following steps:

[0115] Step S610, obtaining the volume of cargo processed every day in a certain area to be predicted over a period of time.

[0116] Step S620, automatically find the optimal smoothing algorithm. Specifically, first, use each smoothing algorithm in the candidate smoothing algorithm pool to process the input processed cargo volume, and obtain a set of current smoothing processing results after each candidate smoothing algorithm is processed; secondly, finally, the current smoothing processing results after each candidate smoothing algorithm is processed are evaluated using the smoothing effect evaluation index, and under the premise of satisfying the restricted items in the evaluation index, the smoothing algorithm that minimizes the objective function obj is taken as the optimal smoothing algorithm;

[0117] Step S630, performing smoothing processing: performing smoothing processing using an optimal smoothing algorithm to obtain a target processing result, which is an optimal result after removing noise and outliers;

[0118] Step S640: Output the optimal smoothed target processing result (for details, please refer to Figure 7 As shown, among which, Figure 7 In the figure, line 701 is a schematic diagram of the original cargo volume time series data, and line 702 is a schematic diagram of the cargo volume time series data obtained after processing using the smoothing method of the present application), and the cargo volume to be processed in the future time period is predicted based on the target processing result.

[0119] The logistics data processing method provided by the exemplary embodiment of the present invention has at least the following advantages:

[0120] On the one hand, according to the characteristics of each time series data, an optimal smoothing algorithm can be automatically found for each time series data, and the optimal smoothing algorithm can avoid over-smoothing and under-smoothing problems;

[0121] On the other hand, the automatic smoothing device does not rely on people's subjective experience selection, but is automatically selected by the system. It can be performed efficiently and accurately in distributed computing scenarios without fear of the growth of data volume.

[0122] The exemplary embodiment of the present invention also provides a logistics data processing device. Figure 8 As shown, the logistics data processing device may include a first calculation module 810, an objective function construction module 820, a smoothing processing module 830 and a cargo volume prediction module 840. Among them:

[0123] The first calculation module 810 may be used to obtain original cargo volume time series data and calculate the standard deviation of the original cargo volume time series data;

[0124] The objective function construction module 820 may be used to smooth the original cargo volume time series data using a preset smoothing model, and construct an objective function based on the standard deviation and the original cargo volume time series data after smoothing;

[0125] The smoothing processing module 830 may be used to select a target smoothing model corresponding to the original cargo volume time series data from the preset smoothing models based on the target function, and use the target smoothing model to smooth the original cargo volume time series data to obtain a target processing result;

[0126] The cargo volume prediction module 840 can be used to predict the cargo volume in a future time period according to the target processing result and the original cargo volume time series data, and display the prediction result.

[0127] In an exemplary embodiment of the present disclosure, selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the processed cargo volume and the current smoothing processing result includes:

[0128] Calculating the standard deviation of the processed cargo volume and the difference between the processed cargo volume and the current smoothing result;

[0129] constructing an objective function according to the standard deviation and the difference between the processed cargo volume and the current smoothing result;

[0130] According to the objective function, a target smoothing model corresponding to the historical logistics data is selected from each of the data smoothing models.

[0131] In an exemplary embodiment of the present disclosure, selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the objective function includes:

[0132] Based on the principle of making the objective function obtain the minimum value, a target smoothing model corresponding to the historical logistics data is selected from each of the data smoothing models.

[0133] In an exemplary embodiment of the present disclosure, the logistics data processing method further includes:

[0134] Calculating a first average value of the processed cargo volume and a second average value of the current smoothing result;

[0135] Constructing a constraint condition of the objective function according to the first average value and the second average value;

[0136] Wherein, the principle of making the objective function obtain the minimum value is to select the target smoothing model corresponding to the historical logistics data from each of the data smoothing models, including:

[0137] On the premise of satisfying the restriction conditions, and in accordance with the principle of making the objective function obtain the minimum value, a target smoothing model corresponding to the historical logistics data is selected from the data smoothing models.

[0138] In an exemplary embodiment of the present disclosure, constructing an objective function according to the standard deviation and the difference between the processed cargo volume and the current smoothing result includes:

[0139] Calculate the difference ratio between the processed cargo volume and the current smoothing result according to the sum of the difference between the processed cargo volume and the current smoothing result, and the size relationship between the processed cargo volume and the current smoothing result;

[0140] The objective function is constructed according to the standard deviation and the difference ratio.

[0141] In an exemplary embodiment of the present disclosure, the smoothing process of the processed cargo volume using the target smoothing model to obtain the target processing result includes:

[0142] The target smoothing model is used to remove noise and outliers included in the processed cargo volume to obtain the target processing result.

[0143] In an exemplary embodiment of the present disclosure, the data smoothing model includes multiple ones of a moving average smoothing model, a quantile smoothing model, a lognormal distribution smoothing model and a local weighted smoothing model.

[0144] The specific details of each module in the above-mentioned logistics data processing device have been described in detail in the corresponding logistics data processing method, so they will not be repeated here.

[0145] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, 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 being embodied by multiple modules or units.

[0146] In addition, although the steps of the method of the present invention 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.

[0147] In an exemplary embodiment of the present invention, an electronic device capable of implementing the above method is also provided.

[0148] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0149] Refer to the following Fig. 9 An electronic device 900 according to this embodiment of the present invention will be described. Fig. 9 The electronic device 900 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0150] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.

[0151] The storage unit stores program codes, which can be executed by the processing unit 910, so that the processing unit 910 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 910 can perform the following steps: Figure 1 Step S110 shown in: obtaining original cargo volume time series data and calculating the standard deviation of the original cargo volume time series data; step S120: smoothing the original cargo volume time series data using a preset smoothing model, and constructing an objective function based on the standard deviation and the original cargo volume time series data after smoothing; step S130: based on the objective function, selecting a target smoothing model corresponding to the original cargo volume time series data from the preset smoothing models, and smoothing the original cargo volume time series data using the target smoothing model to obtain a target processing result; step S140: predicting the cargo volume required for the future time period based on the target processing result, and displaying the prediction result.

[0152] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .

[0153] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 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.

[0154] Bus 930 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.

[0155] The electronic device 900 may also communicate with one or more external devices 1000 (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 900, and / or communicate with any device that enables the electronic device 900 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 950. Furthermore, the electronic device 900 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 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. 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 900, 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.

[0156] 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 invention 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, and includes 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 implementation of the present invention.

[0157] In an exemplary embodiment of the present invention, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of this specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification.

[0158] The program product for implementing the above method according to an embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention 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 or in combination with an instruction execution system, apparatus, or device.

[0159] 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 (non-exhaustive list) of readable storage media 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.

[0160] 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.

[0161] 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.

[0162] Program code for performing the operations of the present invention 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).

[0163] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, 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.

[0164] Other embodiments of the invention will readily occur to those skilled in the art after considering the specification and practicing the invention invented herein. This application is intended to cover any variations, uses or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art that are not invented by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.

Claims

1. A logistics data processing method, characterized in that: include: Based on a preset HTTP interface, historical logistics data is obtained from the cluster, and the processed cargo volume of the to-be-predicted area in each time period included in the historical logistics data is extracted; The processed cargo volume is smoothed by using a plurality of data smoothing models to obtain a plurality of current smoothing results, and a target smoothing model corresponding to the historical logistics data is selected from each of the data smoothing models according to the processed cargo volume and the current smoothing result, wherein the selecting of the target smoothing model comprises: calculating the standard deviation of the processed cargo volume and the difference between the processed cargo volume and the current smoothing result; constructing an objective function according to the standard deviation and the difference between the processed cargo volume and the current smoothing result; selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the objective function, comprising: calculating the difference ratio between the processed cargo volume and the current smoothing result according to the sum of the difference between the processed cargo volume and the current smoothing result and the size relationship between the processed cargo volume and the current smoothing result; constructing the objective function according to the standard deviation and the difference ratio; selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models on the principle of making the objective function obtain a minimum value; Using the target smoothing model to smooth the processed cargo volume to obtain a target processing result; The cargo volume to be processed in the to-be-predicted area in a future time period is predicted according to the target processing result, and the prediction result is sent to the device terminal in the to-be-predicted area so that the prediction result is displayed on the device terminal.

2. The logistics data processing method according to claim 1, characterized in that: The logistics data processing method also includes: Calculating a first average value of the processed cargo volume and a second average value of the current smoothing result; Constructing a constraint condition of the objective function according to the first average value and the second average value; Wherein, the principle of making the objective function obtain the minimum value is to select the target smoothing model corresponding to the historical logistics data from each of the data smoothing models, including: On the premise of satisfying the restriction conditions, and in accordance with the principle of making the objective function obtain the minimum value, a target smoothing model corresponding to the historical logistics data is selected from the data smoothing models.

3. The logistics data processing method according to claim 1, characterized in that: The step of smoothing the processed cargo volume using the target smoothing model to obtain a target processing result includes: The target smoothing model is used to remove noise and outliers included in the processed cargo volume to obtain the target processing result.

4. The logistics data processing method according to any one of claims 1 to 3, characterized in that: The data smoothing model includes multiple types of a moving average smoothing model, a quantile smoothing model, a log-normal distribution smoothing model and a local weighted smoothing model.

5. A logistics data processing device, characterized in that: include: A data acquisition module, used to acquire historical logistics data from the cluster based on a preset HTTP interface, and extract the processed cargo volume of the to-be-predicted area in each time period included in the historical logistics data; A smoothing model determination module, for smoothing the processed cargo volume using multiple data smoothing models to obtain multiple current smoothing results, and selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the processed cargo volume and the current smoothing result, wherein selecting the target smoothing model includes: calculating the standard deviation of the processed cargo volume and the difference between the processed cargo volume and the current smoothing result; constructing an objective function according to the standard deviation and the difference between the processed cargo volume and the current smoothing result; selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models according to the objective function, including: calculating the difference ratio between the processed cargo volume and the current smoothing result according to the sum of the difference between the processed cargo volume and the current smoothing result and the size relationship between the processed cargo volume and the current smoothing result; constructing the objective function according to the standard deviation and the difference ratio; selecting a target smoothing model corresponding to the historical logistics data from each of the data smoothing models on the principle of making the objective function obtain a minimum value; A smoothing processing module, used for smoothing the processed cargo volume using the target smoothing model to obtain a target processing result; The cargo volume prediction module is used to predict the cargo volume to be processed in the to-be-predicted area in a future time period according to the target processing result, and send the prediction result to the device terminal of the to-be-predicted area so that the device terminal displays the prediction result.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the logistics data processing method described in any one of claims 1 to 4 is implemented.

7. 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 logistics data processing method described in any one of claims 1-4 by executing the executable instructions.

Citation Information

Patent Citations

  • Goods volume prediction method and device, electronic device and storage medium

    CN110866786A