[go: up one dir, main page]

CN112070292A - Quantity prediction method, device, equipment and storage medium - Google Patents

Quantity prediction method, device, equipment and storage medium Download PDF

Info

Publication number
CN112070292A
CN112070292A CN202010885985.6A CN202010885985A CN112070292A CN 112070292 A CN112070292 A CN 112070292A CN 202010885985 A CN202010885985 A CN 202010885985A CN 112070292 A CN112070292 A CN 112070292A
Authority
CN
China
Prior art keywords
weekly
data set
target data
data
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010885985.6A
Other languages
Chinese (zh)
Inventor
夏扬
陈玉芬
李斯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongpu Software Co Ltd
Original Assignee
Dongpu Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongpu Software Co Ltd filed Critical Dongpu Software Co Ltd
Priority to CN202010885985.6A priority Critical patent/CN112070292A/en
Publication of CN112070292A publication Critical patent/CN112070292A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Quality & Reliability (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for predicting quantity, aiming at the problems that the quantity of an express delivery is predicted mainly by adopting a manual prediction or rough method in the current logistics industry, the difference between the quantity of the express delivery and the actual quantity is large, and the predicted quantity is inaccurate, the historical data of the quantity is processed to obtain test data suitable for creating a double-index smooth model, the quantity is predicted in a short term by utilizing the double-index smooth model, the accuracy of quantity prediction is improved, a powerful data basis is provided for the orderly development of logistics work, and therefore the work efficiency of logistics enterprises is improved.

Description

件量预测方法、装置、设备和存储介质Quantity prediction method, device, equipment and storage medium

技术领域technical field

本发明属于业务量预测的技术领域,尤其涉及一种件量预测方法、装置、设备和存储介质。The invention belongs to the technical field of business volume forecasting, and in particular relates to a piece volume forecasting method, device, equipment and storage medium.

背景技术Background technique

预测是大数据最核心的应用,大数据预测将传统意义预测拓展到“现测”。大数据预测的优势体现在它把一个非常困难的预测问题,转化为一个相对简单的描述问题,而这是传统小数据集根本无法企及的。从预测的角度看,大数据预测所得出的结果不仅仅得到处理现实业务简单、客观的结论,更能用于帮助企业经营决策,收集起来的资料还可以被规划,引导开发更大的消费力量。Prediction is the core application of big data, and big data prediction expands the traditional meaning of prediction to "existing measurement". The advantage of big data forecasting is that it transforms a very difficult forecasting problem into a relatively simple description problem, which is simply beyond the reach of traditional small data sets. From the perspective of forecasting, the results obtained from big data forecasts are not only simple and objective conclusions for dealing with real business, but can also be used to help enterprises make business decisions. The collected data can also be planned to guide the development of greater consumption power .

时间序列数据挖掘以事物在不同时刻的状态所形成的数据为研究对象,通过对时间序列数据的特征进行分析和研究,揭示事物的发展变化规律,用于指导人们的社会、经济、军事和生活等活动。时间序列挖掘对人类社会、科技和经济的发展具有重大意义,正逐渐成为数据挖掘的研究热点之一。Time series data mining takes the data formed by the state of things at different times as the research object. By analyzing and researching the characteristics of time series data, it reveals the law of development and change of things, which is used to guide people's social, economic, military and life. and other activities. Time series mining is of great significance to the development of human society, technology and economy, and is gradually becoming one of the research hotspots of data mining.

随着物流行业的快速发展,业务量(快递件量)的管控关系着物流公司的业务能否正常进行。因此,对件量进行预测就显得尤为重要。With the rapid development of the logistics industry, the management and control of the business volume (express delivery volume) is related to the normal operation of the logistics company's business. Therefore, it is particularly important to predict the number of pieces.

对于物流领域的件量预测问题,件量总是随时间发生变化的,当前业内主要采用人工预测或粗略的方法来预测快递的派件量,与实际件量相差较大,预测件量不准确,不利于公司的业务开展。For the problem of piece volume forecasting in the field of logistics, the piece volume always changes with time. At present, the industry mainly adopts manual forecasting or rough methods to predict the delivery volume of express delivery, which is quite different from the actual piece volume, and the predicted piece volume is inaccurate. , which is not conducive to the business development of the company.

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种件量预测方法、装置、设备和存储介质,采用时间序列预测模型,提高件量预测的准确性。The purpose of the present invention is to provide a piece quantity forecasting method, device, equipment and storage medium, which adopts a time series forecasting model to improve the accuracy of piece quantity forecasting.

为解决上述问题,本发明的技术方案为:For solving the above problems, the technical scheme of the present invention is:

一种件量预测方法,包括:A piece quantity forecasting method, comprising:

步骤S1:获取件量的历史数据,对历史数据进行预处理,选取出至少一历史周期的周目标数据集;Step S1: obtaining historical data of the amount of pieces, preprocessing the historical data, and selecting a weekly target data set of at least one historical period;

步骤S2:调整周目标数据集,消除周变化趋势;Step S2: Adjust the weekly target data set to eliminate the weekly variation trend;

步骤S3:对消除变化趋势的周目标数据集,进行数据平稳性校验,得到平稳的周目标数据集;Step S3: performing a data stationarity check on the weekly target data set for which the change trend has been eliminated to obtain a stable weekly target data set;

步骤S4:基于平稳的周目标数据集,创建双指数平滑模型对件量进行预测,输出周件量预测值。Step S4: Based on the stable weekly target data set, a double exponential smoothing model is created to predict the piece volume, and output the weekly piece volume forecast value.

根据本发明一实施例,所述步骤S1进一步包括:According to an embodiment of the present invention, the step S1 further includes:

清洗历史数据,替换空数据及异常数据;Clean historical data, replace empty data and abnormal data;

分析历史数据的周变化趋势,得到周变化数据集;Analyze the weekly change trend of historical data to obtain a weekly change data set;

对周变化数据集作数据平滑处理,得到周目标数据集。Data smoothing is performed on the weekly variation data set to obtain the weekly target data set.

根据本发明一实施例,所述步骤S2进一步包括:According to an embodiment of the present invention, the step S2 further includes:

采用以下计算公式调整周目标数据集中的数据,消除周变化趋势:Use the following calculation formula to adjust the data in the weekly target data set to eliminate the weekly variation trend:

Figure BDA0002655592360000021
Figure BDA0002655592360000021

其中,ai,j为第i周中第j天的件量值,i为大于1的正整数,j=1,2,3,4,5,6,7;ai-1,j为第i-1周中的第j天的件量值;si-1为第i-1周7天的件量值总和。Among them, a i,j is the piece quantity value of the jth day in the i-th week, i is a positive integer greater than 1, j=1,2,3,4,5,6,7; a i-1,j is The piece quantity value of the jth day in the i-1th week; s i-1 is the sum of the piece quantity value of the 7th day of the i-1th week.

根据本发明一实施例,所述步骤S3进一步包括:According to an embodiment of the present invention, the step S3 further includes:

采用时序图或自相关图检测周目标数据集的数据平稳性;Use time series plots or autocorrelation plots to detect data stationarity of weekly target datasets;

调整不平稳数据,得到平稳的周目标数据集。Adjust the unstable data to obtain a stable weekly target data set.

根据本发明一实施例,所述步骤S4进一步包括:According to an embodiment of the present invention, the step S4 further includes:

所述双指数平滑模型为:The double exponential smoothing model is:

Yt+T=at+bt·TY t +T = at + b t ·T

Figure BDA0002655592360000022
Figure BDA0002655592360000022

Figure BDA0002655592360000023
Figure BDA0002655592360000023

其中,

Figure BDA0002655592360000024
为t期的一次指数平滑值;
Figure BDA0002655592360000025
分别为t期和t-1期的二次指数平滑值;a为平滑系数;Yt+T为t+T期的预测值,T为由t期向后推移的期数。in,
Figure BDA0002655592360000024
is an exponential smoothing value for the t period;
Figure BDA0002655592360000025
are the quadratic exponential smoothing values of the t period and the t-1 period respectively; a is the smoothing coefficient; Y t+T is the predicted value of the t+T period, and T is the number of periods shifted backward from the t period.

根据本发明一实施例,所述步骤S4之后还包括:比较周件量预测值与件量实际值的大小,计算误差;并根据误差调整双指数平滑模型的参数。According to an embodiment of the present invention, after step S4, the method further includes: comparing the predicted value of the weekly piece quantity with the actual value of the piece quantity, calculating the error; and adjusting the parameters of the double exponential smoothing model according to the error.

一种件量预测装置,包括:A piece quantity prediction device, comprising:

数据预处理模块,用于获取件量的历史数据,对历史数据进行预处理,选取出至少一历史周期的周目标数据集;The data preprocessing module is used to obtain the historical data of the piece volume, preprocess the historical data, and select the weekly target data set of at least one historical period;

趋势消除模块,用于调整周目标数据集,消除周变化趋势:Trend removal module, used to adjust the weekly target data set to eliminate the weekly trend:

平稳性检测模块,用于对消除变化趋势的周目标数据集,进行数据平稳性校验,得到平稳的周目标数据集;The stationarity detection module is used to check the data stationarity of the weekly target data set that eliminates the changing trend, and obtain a stable weekly target data set;

模型创建模块,用于基于平稳的周目标数据集,创建双指数平滑模型对件量进行预测,输出周件量预测值。The model creation module is used to create a double exponential smoothing model based on the stable weekly target data set to predict the piece volume, and output the predicted value of the weekly piece volume.

根据本发明一实施例,件量预测装置还包括:模型校验模块,用于比较周件量预测值与件量实际值的大小,计算误差;并根据误差调整双指数平滑模型的参数。According to an embodiment of the present invention, the piece quantity prediction device further includes: a model checking module for comparing the size of the weekly piece quantity prediction value and the actual piece quantity value, calculating the error; and adjusting the parameters of the double exponential smoothing model according to the error.

一种件量预测设备,包括:A piece quantity forecasting device, comprising:

存储器和至少一个处理器,所述存储器中存储有指令,所述存储器和所述至少一个处理器通过线路互连;a memory and at least one processor with instructions stored in the memory, the memory and the at least one processor interconnected by wires;

所述至少一个处理器调用所述存储器中的所述指令,以使得所述件量预测设备执行本发明一实施例中的件量预测方法。The at least one processor invokes the instructions in the memory, so that the piece quantity prediction device executes the piece quantity prediction method in an embodiment of the present invention.

一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现本发明一实施例中的件量预测方法。A computer-readable storage medium stores a computer program on the computer-readable storage medium, and when the computer program is executed by a processor, implements the method for predicting a piece quantity in an embodiment of the present invention.

本发明由于采用以上技术方案,使其与现有技术相比具有以下的优点和积极效果:Compared with the prior art, the present invention has the following advantages and positive effects due to the adoption of the above technical solutions:

本发明一实施例中的件量预测方法,针对当前物流行业主要采用人工预测或粗略的方法来预测快递的件量,与实际件量相差较大,预测件量不准确的问题,通过对件量的历史数据进行处理,得到适合创建双指数平滑模型的测试数据,利用双指数平滑模型对件量进行短期预测,提高件量预测的准确性,为物流工作的有序开展提供有力的数据基础,从而提高物流企业的工作效率。The method for predicting the quantity of pieces in an embodiment of the present invention mainly adopts manual forecasting or rough methods to predict the quantity of express delivery in the current logistics industry, which is quite different from the actual quantity of pieces, and the predicted piece quantity is inaccurate. It can process the historical data of the quantity to obtain the test data suitable for creating the double exponential smoothing model, and use the double exponential smoothing model to make short-term forecast of the piece volume, improve the accuracy of the piece volume forecast, and provide a strong data foundation for the orderly development of logistics work. , so as to improve the efficiency of logistics enterprises.

附图说明Description of drawings

图1为本发明一实施例中的件量预测方法流图;FIG. 1 is a flow chart of a method for predicting a piece quantity in an embodiment of the present invention;

图2为本发明一实施例中的消除周变化趋势曲线图;Fig. 2 is the trend curve diagram of elimination week in an embodiment of the present invention;

图3为本发明一实施例中的件量预测装置的框图;FIG. 3 is a block diagram of an apparatus for predicting a piece quantity in an embodiment of the present invention;

图4为本发明一实施例中的件量预测设备的示意图。FIG. 4 is a schematic diagram of a piece quantity prediction device in an embodiment of the present invention.

具体实施方式Detailed ways

以下结合附图和具体实施例对本发明提出的一种件量预测方法、装置、设备和存储介质作进一步详细说明。根据下面说明和权利要求书,本发明的优点和特征将更清楚。A method, device, device and storage medium for piece quantity prediction proposed by the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The advantages and features of the present invention will become apparent from the following description and claims.

实施例一Example 1

请参考图1,本实施例中的件量预测方法,包括:Referring to FIG. 1, the method for predicting the quantity of pieces in this embodiment includes:

步骤S1:获取件量的历史数据,对历史数据进行预处理,选取出至少一历史周期的周目标数据集。Step S1: Acquire historical data of the piece volume, preprocess the historical data, and select a weekly target data set of at least one historical period.

在本实施例中,件量历史数据是指物流行业中存储的件量数据,也可以是某统计机构公布的某段时间内物流行业中件量的数据。件量包含收件量,也可以包含发件量。在数据库中,无论是线上还是线下,均会存储派件量、收件量的信息。该些信息可以但不限于包含:件量的类型、时间。时间可以是按天存储,也可以是按照周存储,也可以按照录入系统的具体时间存储。In this embodiment, the historical piece volume data refers to piece volume data stored in the logistics industry, and may also be piece volume data in the logistics industry within a certain period of time published by a statistical agency. The number of pieces includes the volume of incoming mail, and it can also include the amount of outgoing mail. In the database, whether it is online or offline, the information on the number of deliveries and receipts will be stored. The information may include, but is not limited to, the type and time of the piece quantity. The time can be stored by day, by week, or by the specific time entered into the system.

对获取的历史数据进行预处理,包括:清洗历史数据,替换空数据及异常数据;分析历史数据的周变化趋势,得到周变化数据集;对周变化数据集作数据平滑处理,得到周目标数据集。Preprocessing the acquired historical data, including: cleaning the historical data, replacing empty data and abnormal data; analyzing the weekly change trend of the historical data to obtain the weekly change data set; performing data smoothing on the weekly change data set to obtain the weekly target data set.

其中,清洗历史数据,去除获取的历史数据中不需要的信息及替换异常数据。通常在对数据进行统计分析之前,需要将一些不规则数据滤除掉,以确保分析的准确性。数据清洗是一个减少数据错误与不一致性的过程,主要是检测并删除或改正不规则数据。Among them, the historical data is cleaned, unnecessary information in the acquired historical data is removed, and abnormal data is replaced. Usually, before performing statistical analysis on the data, some irregular data needs to be filtered out to ensure the accuracy of the analysis. Data cleaning is a process of reducing data errors and inconsistencies, mainly by detecting and removing or correcting irregular data.

在本实施例中,主要是针对件量进行预测,因此可以去除历史数据中包含的单号信息及地址信息。在这些历史数据中,可能会出现空数据或数值异常(如非数值表示)的数据,将这些空数据或数值异常的数据用其相邻的数据替换。In this embodiment, the prediction is mainly based on the quantity of pieces, so the tracking number information and address information contained in the historical data can be removed. In these historical data, there may be empty data or data with abnormal numerical value (such as non-numeric representation), and these empty data or data with abnormal numerical value are replaced with their adjacent data.

具体地,历史数据包含收件量和/或发件量,可以根据不同的业务场景从数据库中调取各网点收件量(有订单、无订单)和派件量的信息,下面将以某网点的收件量为测试数据,历史数据所在日期为2017/07/01-2017/07/30,获得的历史数据经过数据清洗后可以如下表1所示。Specifically, the historical data includes the volume of receipts and/or the volume of deliveries, and information on the volume of receipts (with or without orders) and delivery volumes at each outlet can be retrieved from the database according to different business scenarios. The receipt volume of the outlets is the test data, and the date of the historical data is 2017/07/01-2017/07/30. After data cleaning, the obtained historical data can be shown in Table 1 below.

Figure BDA0002655592360000051
Figure BDA0002655592360000051

对历史数据作平滑处理时,需要分析历史数据的变化趋势,得到具有变化趋势的数据集,如具有周变化趋势的周变化数据集。When smoothing the historical data, it is necessary to analyze the change trend of the historical data to obtain a data set with a change trend, such as a weekly change data set with a weekly change trend.

对周变化数据集进行平滑处理,可以减少统计误差对件量预测结果的影响,得到周目标数据集。对数据进行平滑处理可采用以下方法:Smoothing the weekly variation data set can reduce the influence of statistical errors on the forecast results of the piece volume, and obtain the weekly target data set. The data can be smoothed in the following ways:

加权移动平均法weighted moving average

该加权移动平均法的基本原理为:作平均的区间内中心数据的权值最大,越远离中心的数据的权值越小。权重系数可以采用最小二乘原理,使平滑后的数据以最小均方差逼近原始数据。The basic principle of the weighted moving average method is: the weight of the central data in the averaged interval is the largest, and the weight of the data farther from the center is smaller. The weight coefficient can adopt the principle of least squares, so that the smoothed data approximates the original data with the minimum mean square error.

smooth函数平滑法smooth function smoothing method

调用函数:Z=smooth(Y,span,method),其中,Z表示平滑后的数据向量,Y表示被平滑的原始数据向量,span表示平滑点数,method表示平滑方法(包括moving移动平均、lowess线性加权平滑、loess二次加权平滑等等)。Call function: Z=smooth(Y, span, method), where Z represents the smoothed data vector, Y represents the smoothed original data vector, span represents the number of smoothed points, and method represents the smoothing method (including moving moving average, lowess linearity) weighted smoothing, loess quadratic weighted smoothing, etc.).

以上例举了两种数据平滑处理的方法,当然对数据进行平滑处理并不限于这两种方法,还可以采用其他的方法,如采用高斯函数对数据进行平滑或SG滤波法等,在此就不展开介绍了。The above exemplifies two data smoothing methods. Of course, the smoothing of data is not limited to these two methods, and other methods can also be used, such as using Gaussian function to smooth data or SG filtering method, etc. No introduction.

步骤S2:调整周目标数据集,消除周变化趋势。Step S2: Adjust the weekly target data set to eliminate the weekly variation trend.

具体的,将周目标数据集按时序排列,绘成曲线,如图2中的曲线a(圆点连成的曲线)。为了提高数据的精确度,将件量的数值进行归一化。从曲线a中可以看出,周变化趋势从周一(2017/7/4)到周日(2017/7/10),件量呈明显的下降趋势。对周目标数据集消除这种下降趋势,使曲线a尽量平缓,就如图2中的曲线b(方点连成的曲线)所示。该曲线b与曲线a相比,其变化趋势明显减小,整体上呈现平稳的特性。Specifically, the weekly target data sets are arranged in time series, and a curve is drawn, such as curve a in Figure 2 (a curve formed by connecting dots). In order to improve the accuracy of the data, the value of the piece size is normalized. As can be seen from curve a, the weekly change trend is from Monday (2017/7/4) to Sunday (2017/7/10), and the number of pieces shows an obvious downward trend. This downward trend is eliminated for the weekly target data set, and the curve a is as flat as possible, as shown in the curve b (curve formed by connecting square points) in Figure 2. Compared with the curve a, the change trend of the curve b is obviously reduced, and the overall characteristic is stable.

本实施例用于消除周变化趋势的方法为:通过以下计算公式,调整周目标数据集,使数据趋于平稳。The method for eliminating the weekly variation trend in this embodiment is: adjusting the weekly target data set through the following calculation formula, so that the data tends to be stable.

Figure BDA0002655592360000061
Figure BDA0002655592360000061

其中,ai,j为第i周中第j天的件量值,i为大于1的正整数,j=1,2,3,4,5,6,7;ai-1,j为第i-1周中的第j天的件量值;si-1为第i-1周7天的件量值总和。根据上述计算公式,逐个调整件量的周目标数据集中的数值。最终得到的周目标数据集所转换成的曲线如图2中的曲线b所示。Among them, a i,j is the piece quantity value of the jth day in the i-th week, i is a positive integer greater than 1, j=1,2,3,4,5,6,7; a i-1,j is The piece quantity value of the jth day in the i-1th week; s i-1 is the sum of the piece quantity value of the 7th day of the i-1th week. According to the above calculation formula, the values in the weekly target data set of the piece quantity are adjusted one by one. The curve converted from the final weekly target data set is shown as curve b in Figure 2.

步骤S3:对消除变化趋势的周目标数据集,进行数据平稳性校验,得到平稳的周目标数据集。Step S3: Perform a data stationarity check on the weekly target data set whose change trend has been eliminated to obtain a stable weekly target data set.

本实施例提供了两种检测数据平稳性的方法,分别为时序图检测及自相关图检测。This embodiment provides two methods for detecting the stationarity of data, namely, time sequence graph detection and autocorrelation graph detection.

其中,时序图检测遵循平稳时间序列的均值、方差为常数的原则,平稳序列在时序图中显示出在某一常数值附件随机波动的特性,且波动范围有限、无明显趋势性或周期性。如果某序列在时序图中表现为明显的趋势性或周期性,那么就说明该序列是不平稳的,不是平稳序列。Among them, the time series diagram detection follows the principle that the mean value and variance of the stationary time series are constant. The stationary series in the time series diagram shows the characteristics of random fluctuation around a constant value, and the fluctuation range is limited, and there is no obvious trend or periodicity. If a sequence shows an obvious trend or periodicity in the time series diagram, it means that the sequence is not stationary, not stationary.

而自相关图检测则是随延迟期数k的增加,平稳时间序列的自相关系数p会很快地衰减向零。非平稳序列的自相关系数衰减向零的速度通常比较慢。非平稳序列的典型的自相关图:自相关图上显示出明显的三角对称性;位于零轴一侧,有单调趋势序列的典型特征,或有明显的正弦波动规律。In autocorrelation graph detection, as the delay period k increases, the autocorrelation coefficient p of the stationary time series decays rapidly to zero. The autocorrelation coefficients of non-stationary series usually decay slowly towards zero. Typical autocorrelation diagram of non-stationary series: The autocorrelation diagram shows obvious triangular symmetry; it is located on the side of the zero axis, which has the typical characteristics of monotonic trend series, or has obvious sinusoidal fluctuation law.

根据上述时序图及自相关图的原理,将周目标数据集进行时序图检测或自相关图检测,判断数据平稳性。如发现不平稳序列,则针对该不平稳序列进行调整(如线性增长的趋势,可以通过一阶差分形成新的平稳的(消除趋势)时间序列),直到周目标数据集中的序列趋于平稳。According to the principle of the above time sequence diagram and autocorrelation diagram, the weekly target data set is subjected to time sequence diagram detection or autocorrelation diagram detection to judge the data stationarity. If a non-stationary sequence is found, adjust the non-stationary sequence (such as a linearly growing trend, a new stationary (trend-eliminating) time series can be formed by first-order difference) until the sequence in the weekly target data set tends to be stationary.

步骤S4:基于平稳的周目标数据集,创建双指数平滑模型对件量进行预测,输出周件量预测值。Step S4: Based on the stable weekly target data set, a double exponential smoothing model is created to predict the piece volume, and output the weekly piece volume forecast value.

指数平滑法是对单变量数据进行时间序列预测的一种方法,包括一次指数平滑、二次指数平滑等。其中,线性二次指数平滑法的公式为:Exponential smoothing is a method of time series forecasting for univariate data, including one-time exponential smoothing, second-order exponential smoothing, etc. Among them, the formula of the linear quadratic exponential smoothing method is:

Figure BDA0002655592360000071
Figure BDA0002655592360000071

式中:

Figure BDA0002655592360000072
分别为t期和t–1期的二次指数平滑值;a为平滑系数。在
Figure BDA0002655592360000073
Figure BDA0002655592360000074
已知的条件下,二次指数平滑法的预测模型(即双指数平滑模型)为:where:
Figure BDA0002655592360000072
are the quadratic exponential smoothing values for periods t and t–1, respectively; a is the smoothing coefficient. exist
Figure BDA0002655592360000073
and
Figure BDA0002655592360000074
Under the known conditions, the prediction model of the double exponential smoothing method (that is, the double exponential smoothing model) is:

Yt+T=at+bt·TY t +T = at + b t ·T

Figure BDA0002655592360000075
Figure BDA0002655592360000075

Figure BDA0002655592360000076
Figure BDA0002655592360000076

式中:Yt+T为t+T期的预测值,T为由t期向后推移的期数。In the formula: Y t+T is the predicted value of the period t+T, and T is the number of periods shifted from the period t to the back.

按上述公式创建双指数平滑模型,对该周目标数据集分别进行取对数、取指数、取平方、作差分、作积分处理,得到五条曲线作为双指数平滑模型的数据基础。Create a double exponential smoothing model according to the above formula, and perform logarithm, exponent, square, difference, and integral processing of the weekly target data set, and five curves are obtained as the data basis of the double exponential smoothing model.

然后,选取一组包括历史数据时长、模型预测时长、数据起始点在内的模型参数的数值,如历史数据时长=7天、模型预测时长=1天、数据起始点=周目标数据集中每月1日的数据值。将这些参数写入双指数平滑模型中,进行件量预测,得到一件量预测值。Then, select a set of values of model parameters including historical data duration, model prediction duration, and data starting point, such as historical data duration=7 days, model prediction duration=1 day, data starting point=monthly in the weekly target data set 1 day's data value. These parameters are written into the double exponential smoothing model, and the piece quantity is forecasted to obtain a piece quantity forecast value.

为了使得到的预测结果更准确,可以采用不同的模型参数,进行多次件量预测。如下一次件量预测的模型参数可取:历史数据时长=15天、模型预测时长=3天、数据起始点=周目标数据集中每月5日的数据值,将这些参数写入双指数滑动模型中进行件量预测,得到另一件量预测值。In order to make the obtained prediction results more accurate, different model parameters can be used to perform multiple piece quantity predictions. The following model parameters for one-time volume forecasting are desirable: historical data duration = 15 days, model prediction duration = 3 days, data starting point = data value on the 5th day of each month in the weekly target data set, and write these parameters into the double exponential sliding model Carry out a piece quantity forecast to obtain another piece quantity forecast value.

如此,可得到多个件量预测值,分别将每的件量预测值与件量实际值进行比较,计算误差;并根据误差调整双指数平滑模型的参数。In this way, a plurality of piece quantity prediction values can be obtained, and each piece quantity forecast value is compared with the actual piece quantity value, and the error is calculated; and the parameters of the double exponential smoothing model are adjusted according to the error.

本实施例中的件量预测方法,针对当前物流行业主要采用人工预测或粗略的方法来预测快递的件量,与实际件量相差较大,预测件量不准确的问题,通过对件量的历史数据进行处理,得到适合创建双指数平滑模型的测试数据,利用双指数平滑模型对件量进行短期预测,提高件量预测的准确性,为物流工作的有序开展提供有力的数据基础,从而提高物流企业的工作效率。The piece quantity forecasting method in this embodiment mainly adopts manual forecasting or rough method to predict the quantity of express delivery in the current logistics industry, which is quite different from the actual piece quantity, and the predicted piece quantity is inaccurate. The historical data is processed to obtain test data suitable for creating a double exponential smoothing model, and the double exponential smoothing model is used to make short-term forecasts on the quantity of pieces, so as to improve the accuracy of the forecast of the quantity of pieces, and provide a strong data foundation for the orderly development of logistics work. Improve the efficiency of logistics enterprises.

实施例二Embodiment 2

本发明还提供了一种件量预测装置,参看图3,该装置包括:The present invention also provides a piece quantity prediction device, referring to FIG. 3 , the device includes:

数据预处理模块1,用于获取件量的历史数据,对历史数据进行预处理,选取出至少一历史周期的周目标数据集;The data preprocessing module 1 is used to obtain the historical data of the piece volume, preprocess the historical data, and select the weekly target data set of at least one historical period;

趋势消除模块2,用于调整周目标数据集,消除周变化趋势:Trend elimination module 2, which is used to adjust the weekly target data set and eliminate the weekly variation trend:

平稳性检测模块3,用于对消除变化趋势的周目标数据集,进行数据平稳性校验,得到平稳的周目标数据集;The stationarity detection module 3 is used to check the data stationarity of the weekly target data set that eliminates the change trend, and obtain a stable weekly target data set;

模型创建模块4,用于基于平稳的周目标数据集,创建双指数平滑模型对件量进行预测,输出周件量预测值;The model creation module 4 is used to create a double exponential smoothing model to predict the piece volume based on the stable weekly target data set, and output the predicted value of the weekly piece volume;

模型校验模块5,用于比较周件量预测值与件量实际值的大小,计算误差;并根据误差调整双指数平滑模型的参数。The model checking module 5 is used to compare the predicted value of the weekly piece quantity with the actual value of the piece quantity, calculate the error, and adjust the parameters of the double exponential smoothing model according to the error.

上述数据预处理模块1、趋势消除模块2、平稳性检测模块3、模型创建模块4及模型校验模块5的具体内容及实现方法,均如实施例一中所述,在此不再赘述。The specific contents and implementation methods of the above-mentioned data preprocessing module 1, trend elimination module 2, stationarity detection module 3, model creation module 4, and model verification module 5 are as described in Embodiment 1, and will not be repeated here.

实施例三Embodiment 3

上述实施例二从模块化功能实体的角度对本发明件量预测装置进行详细描述,下面从硬件处理的角度对本发明件量预测设备进行详细描述。The above Embodiment 2 describes in detail the piece quantity prediction apparatus of the present invention from the perspective of modular functional entities, and the following describes the piece quantity prediction apparatus of the present invention in detail from the perspective of hardware processing.

请参看图4,该件量预测设备500可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)510(例如,一个或一个以上处理器)和存储器520,一个或一个以上存储应用程序533或数据532的存储介质530(例如一个或一个以上海量存储设备)。其中,存储器520和存储介质530可以是短暂存储或持久存储。存储在存储介质530的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对件量预测设备500中的一系列指令操作。Referring to FIG. 4 , the piece quantity prediction apparatus 500 may vary greatly due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (eg, one or more processors) and memory 520, one or more storage media 530 (eg, one or more mass storage devices) that store applications 533 or data 532. Among them, the memory 520 and the storage medium 530 may be short-term storage or persistent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the piece quantity prediction apparatus 500 .

进一步地,处理器510可以设置为与存储介质530通信,在件量预测设备500上执行存储介质530中的一系列指令操作。Further, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the piece quantity prediction device 500 .

件量预测设备500还可以包括一个或一个以上电源540,一个或一个以上有线或无线网络接口550,一个或一个以上输入输出接口560,和/或,一个或一个以上操作系统531,例如Windows Serve、Vista等等。Quantity prediction device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and/or, one or more operating systems 531, such as Windows Server , Vista, etc.

本领域技术人员可以理解,图4示出的件量预测设备结构并不构成对件量预测设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the piece quantity prediction device shown in FIG. 4 does not constitute a limitation on the piece quantity prediction device, and may include more or less components than the one shown, or combine some components, or different Component placement.

本发明还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,该计算机可读存储介质也可以为易失性计算机可读存储介质。该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行实施例一中的件量预测方法的步骤。The present invention also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium, and the computer-readable storage medium may also be a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the instructions cause the computer to execute the steps of the method for predicting a piece quantity in the first embodiment.

实施例二中的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件的形式体现出来,该计算机软件存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-only memory,ROM)、随机存取存储器(Random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the modules in the second embodiment are implemented in the form of software function modules and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of software, and the computer software is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置及设备的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the apparatus and equipment described above, reference may be made to the corresponding process in the foregoing method embodiments, which will not be repeated here.

上面结合附图对本发明的实施方式作了详细说明,但是本发明并不限于上述实施方式。即使对本发明作出各种变化,倘若这些变化属于本发明权利要求及其等同技术的范围之内,则仍落入在本发明的保护范围之中。The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above-mentioned embodiments. Even if various changes are made to the present invention, if these changes fall within the scope of the claims of the present invention and the technical equivalents thereof, they still fall within the protection scope of the present invention.

Claims (10)

1. A method for predicting a quantity, comprising:
step S1: acquiring historical data of the quantity, preprocessing the historical data, and selecting a weekly target data set of at least one historical period;
step S2: adjusting a weekly target data set to eliminate a weekly variation trend;
step S3: carrying out data stability verification on the week target data set with the change trend eliminated to obtain a stable week target data set;
step S4: and based on the stable weekly target data set, creating a bi-exponential smoothing model to predict the parts, and outputting a predicted value of the weekly parts.
2. The component prediction method according to claim 1, wherein the step S1 further includes:
cleaning historical data, and replacing null data and abnormal data;
analyzing the weekly variation trend of the historical data to obtain a weekly variation data set;
and performing data smoothing treatment on the weekly change data set to obtain a weekly target data set.
3. The component prediction method according to claim 2, wherein the step S2 further includes:
and adjusting data in the weekly target data set by adopting the following calculation formula to eliminate the weekly variation trend:
Figure FDA0002655592350000011
wherein, ai,jIs the dose value on day j in week i, i is a positive integer greater than 1, j is 1,2,3,4,5,6, 7; a isi-1,jIs the dose value on day j in week i-1; si-17 days in i-1 weekThe sum of the component values.
4. The component prediction method according to claim 1, wherein the step S3 further includes:
detecting data stationarity of a week target data set by adopting a time sequence diagram or an autocorrelation diagram;
and adjusting the unstable data to obtain a stable weekly target data set.
5. The component prediction method according to claim 1, wherein the step S4 further includes:
the bi-exponential smoothing model is:
Yt+T=at+bt.T
Figure FDA0002655592350000021
Figure FDA0002655592350000022
wherein S ist (1)Is a first exponential smoothing value of the t period;
Figure FDA0002655592350000023
respectively the secondary exponential smoothing values of the t period and the t-1 period; a is a smoothing coefficient; y ist+TIs the predicted value of T + T period, and T is the number of periods moving backwards from T period.
6. The component prediction method according to claim 1, wherein said step S4 is further followed by: comparing the predicted value of the weekly component quantity with the actual value of the component quantity, and calculating an error; and adjusting parameters of the dual-exponential smoothing model according to the error.
7. A quantity prediction apparatus, comprising:
the data preprocessing module is used for acquiring historical data of the quantity, preprocessing the historical data and selecting a weekly target data set of at least one historical period;
the trend elimination module is used for adjusting the weekly target data set and eliminating the weekly variation trend:
the stability detection module is used for carrying out data stability verification on the weekly target data set with the change trend eliminated to obtain a stable weekly target data set;
and the model creating module is used for creating a bi-exponential smoothing model to predict the parts based on the stable weekly target data set and outputting the predicted values of the weekly parts.
8. The quantity prediction device of claim 7, further comprising: the model checking module is used for comparing the predicted value of the weekly component with the actual value of the component and calculating an error; and adjusting parameters of the dual-exponential smoothing model according to the error.
9. A quantity prediction apparatus, characterized by comprising:
a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause the component prediction device to perform the component prediction method of any of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method for component prediction according to any one of claims 1 to 6.
CN202010885985.6A 2020-08-28 2020-08-28 Quantity prediction method, device, equipment and storage medium Pending CN112070292A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010885985.6A CN112070292A (en) 2020-08-28 2020-08-28 Quantity prediction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010885985.6A CN112070292A (en) 2020-08-28 2020-08-28 Quantity prediction method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112070292A true CN112070292A (en) 2020-12-11

Family

ID=73660570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010885985.6A Pending CN112070292A (en) 2020-08-28 2020-08-28 Quantity prediction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112070292A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686433A (en) * 2020-12-21 2021-04-20 上海东普信息科技有限公司 Express quantity prediction method, device, equipment and storage medium
CN116340299A (en) * 2023-03-15 2023-06-27 华自科技股份有限公司 Method and system for processing energy consumption data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107316096A (en) * 2017-05-05 2017-11-03 北京市交通信息中心 A kind of track traffic one-ticket pass passenger amount of entering the station Forecasting Methodology
CN109657831A (en) * 2017-10-11 2019-04-19 顺丰科技有限公司 A kind of Traffic prediction method, apparatus, equipment, storage medium
CN111260147A (en) * 2020-02-07 2020-06-09 河北工程大学 Power generation forecast method, device and terminal equipment
CN112183827A (en) * 2020-09-15 2021-01-05 上海东普信息科技有限公司 Prediction method, device, equipment and storage medium for monthly express delivery volume

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107316096A (en) * 2017-05-05 2017-11-03 北京市交通信息中心 A kind of track traffic one-ticket pass passenger amount of entering the station Forecasting Methodology
CN109657831A (en) * 2017-10-11 2019-04-19 顺丰科技有限公司 A kind of Traffic prediction method, apparatus, equipment, storage medium
CN111260147A (en) * 2020-02-07 2020-06-09 河北工程大学 Power generation forecast method, device and terminal equipment
CN112183827A (en) * 2020-09-15 2021-01-05 上海东普信息科技有限公司 Prediction method, device, equipment and storage medium for monthly express delivery volume

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈实: "货运量预测方法及应用研究", 《中国优秀硕士学位论文全文数据库经济与管理科学辑》, no. 5, 15 May 2009 (2009-05-15), pages 145 - 271 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686433A (en) * 2020-12-21 2021-04-20 上海东普信息科技有限公司 Express quantity prediction method, device, equipment and storage medium
CN112686433B (en) * 2020-12-21 2023-07-28 上海东普信息科技有限公司 Method, device, equipment and storage medium for predicting express quantity
CN116340299A (en) * 2023-03-15 2023-06-27 华自科技股份有限公司 Method and system for processing energy consumption data

Similar Documents

Publication Publication Date Title
CN102779223B (en) The method of short-term electric load prediction and device
CN109376971B (en) Load curve prediction method and system for power consumers
CN112070284A (en) Screening method, device, equipment and storage medium for component prediction
CN114155072B (en) Financial prediction model construction method and system based on big data analysis
CN109726865A (en) Customer charge probability density prediction technique, device and storage medium based on EMD-QRF
CN109978230B (en) Intelligent power sale amount prediction method based on deep convolutional neural network
WO2003096237A2 (en) Electronic data processing system and method of using an electronic data processing system for automatically determining a risk indicator value
CN112183827A (en) Prediction method, device, equipment and storage medium for monthly express delivery volume
CN113312578A (en) Data index fluctuation attribution method, device, equipment and medium
CN106384197A (en) Service quality evaluation method and device based on big data
WO2017071369A1 (en) Method and device for predicting user unsubscription
CN116611696B (en) Digital asset market risk prediction system based on time sequence analysis
CN112070292A (en) Quantity prediction method, device, equipment and storage medium
CN118797390A (en) Method, device, computer equipment and storage medium for constructing harmonic source probability model
CN114707733B (en) Risk indicator prediction method, device, electronic device and storage medium
CN115907841A (en) Service data prediction method and related equipment thereof
CN114861800A (en) Model training method, probability determination method, device, equipment, medium and product
CN111950760A (en) Labor demand forecasting system and forecasting method based on machine learning algorithm
CN116843473A (en) Stock data collection methods, systems, equipment and storage media based on cloud computing
CN115936184B (en) A load forecasting matching method suitable for multiple user types
CN117196695A (en) A method and device for predicting sales data of target products
CN113298291B (en) Express delivery volume prediction method, device, equipment and storage medium
CN112836749A (en) A system resource adjustment method, device and device
CN112183832A (en) Express pickup quantity prediction method, device, equipment and storage medium
Noertjahyana et al. Implementing Bisection Method on Forex Trading Database for Early Diagnosis of Inflection Point

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201211