Detailed Description
The following description of the embodiments of the present invention is provided by way of specific examples, and other advantages and effects of the present invention will be readily apparent to those skilled in the art from the disclosure herein. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
Compared with the prior art, the invention provides an improved machine learning algorithm, changes the traditional mean value estimation mode into a quantile estimation mode, and calculates the variable coefficient of the order fulfillment duration estimation model through the quantile estimation mode, thereby capturing the fluctuation above the historical order delivery duration mean value, and effectively solving the problem of low estimation precision of the order fulfillment duration under the conditions of multiple stores of a merchant, multiple areas of users and large order fulfillment duration difference; the invention calculates the order characteristics of an offline scene and a real-time scene by comprehensively considering the characteristics of multiple shops of merchants, multiple areas of users, large difference of order fulfillment duration and the like, judges the number of the cell to which the order belongs in real time when the fulfillment duration of the order is estimated, extracts the characteristic data of the cell according to the number of the cell, and establishes an order fulfillment duration estimation model, thereby reducing the operation labor and the cost.
The storage medium of the present invention stores thereon a computer program that, when executed by a processor, implements the method of estimating an order fulfillment duration described below. The storage medium includes: a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, a usb disk, a Memory card, or an optical disk, which can store program codes.
Any combination of one or more storage media may be employed. The storage medium may be a computer-readable signal medium or a computer-readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The present invention is described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The electronic device of the invention comprises a processor and a memory.
The memory is used for storing a computer program; preferably, the memory comprises: various media that can store program codes, such as ROM, RAM, magnetic disk, U-disk, memory card, or optical disk.
The processor is connected with the memory and is used for executing the computer program stored in the memory so as to enable the electronic equipment to execute the estimation method of the order fulfillment duration.
Preferably, the Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components.
In an embodiment, the electronic device includes a terminal and/or a server.
Fig. 1 shows a block diagram of an exemplary terminal 1 suitable for implementing an embodiment of the invention.
The terminal 1 shown in fig. 1 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 1, the terminal 1 is in the form of a general purpose computing device. The components of the terminal 1 may include, but are not limited to: one or more processors or processing units 11, a memory 12, and a bus 13 that couples various system components including the memory 12 and the processing unit 11.
Bus 13 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA (enhanced ISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
The terminal 1 typically includes a variety of computer system readable media. These media may be any available media that can be accessed by terminal 1 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 12 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 121 and/or cache memory 122. The terminal 1 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 123 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 1 and commonly referred to as a "hard drive"). Although not shown in FIG. 1, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 13 by one or more data media interfaces. Memory 12 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program/utility 124 having a set (at least one) of program modules 1241 may be stored in, for example, memory 12, such program modules 1241 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 1241 generally perform the functions and/or methodologies of embodiments of the invention as described herein.
The terminal 1 may also communicate with one or more external devices 2 (e.g., keyboard, pointing device, display 3, etc.), one or more devices that enable a user to interact with the terminal 1, and/or any device (e.g., network card, modem, etc.) that enables the terminal 1 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 14. Also, the terminal 1 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) through the network adapter 15. As shown in fig. 1, the network adapter 15 communicates with the other modules of the terminal 1 via the bus 13. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the terminal 1, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
As shown in fig. 2, in an embodiment, the method for estimating order fulfillment duration of the present invention includes the following steps:
and S1, acquiring historical order data.
In an embodiment, the historical order data includes order data corresponding to a plurality of historical orders respectively; the order data comprises at least one characteristic data corresponding to the historical order.
It should be noted that the characteristic data at least includes, but is not limited to, any of the following: order characteristics, cell characteristics, in-store characteristics, out-of-store characteristics, store history characteristics; wherein the order characteristics include at least one of, but are not limited to: order linear distance, order SKU (Stock Keeping Unit, which is an inventory Keeping Unit and is an alphanumeric commodity number allocated to inventory, and each SKU number corresponds to a product) type data and order commodity type data; cell characteristics include at least any one of, but are not limited to: a cell historical distribution average value and a median of historical distribution duration; the in-bin features include at least any one of, but are not limited to: ordering the single number of orders to be picked in a preset time period, the number of persons to be picked in the preset time period and the number of orders to be picked in the preset time period; the off-cartridge characteristics include at least one of, but are not limited to, any of: the method comprises the steps of ordering the goods in a preset time period, the number of delivered personnel in the preset time period and the number of orders to be delivered in the preset time period; store history characteristics include at least, but are not limited to, any of the following: the average value of the time length of picking in the warehouse and the average value of the time length of operation in the warehouse.
It should be noted that the above-mentioned feature data acquisition mode includes store historical features, cell historical features, statistical mean of actual completion time of all orders on the store line, and a real-time feature acquisition method, which is to pull the corresponding online order data of the corresponding store on the line in real time, and count the order state in each time interval and the state of personnel inside and outside the warehouse.
Furthermore, the feature data are all numerical values, and if the feature data are dimensionless data, the feature data need to be normalized, and the like to convert the dimensionless feature data into numerical values.
And S2, preprocessing the historical order data to obtain training data.
As shown in fig. 3, in an embodiment, the preprocessing the historical order data to obtain the training data includes the following steps:
step S21, when the plurality of historical orders include normal orders and abnormal orders, obtaining sample order data from the historical order data.
In an embodiment, the history order includes n pieces of feature data, the n pieces of feature data included in the history order are marked as (x 1, x2, x3, …, xn), and the duration of performance corresponding to the history order is marked as y.
It should be noted that, for each feature data xi (i is greater than or equal to 1 and less than or equal to n) of the historical order and the performance duration y, a reasonable range [ x _ min, x _ max ] of each feature data is set according to data distribution and business expert experience, and then whether each feature data in the historical order is in the corresponding reasonable range is judged to determine whether the historical order is a normal order or an abnormal order.
In one embodiment, when at least preset characteristic data in all the characteristic data corresponding to a historical order is not in the corresponding reasonable range, the historical order is judged to be an abnormal order; and when only less than the preset characteristic data in all the characteristic data corresponding to a historical order is not in the corresponding reasonable range, judging the historical order to be a normal order.
It should be noted that what the preset number is specifically set is not a condition for limiting the present invention, and in practical applications, the preset number may be set according to specific situations.
In an embodiment, the preset number is set to one, that is, as long as at least one feature data exists in all feature data corresponding to a historical order and is not in the corresponding reasonable range, the historical order is determined to be an abnormal order; and only when all the characteristic data corresponding to the historical order are respectively in the corresponding reasonable ranges, the historical order is judged to be a normal order.
It should be noted that, the number of the reasonable ranges corresponding to each feature data is specifically set, which is not a condition for limiting the present invention, and the reasonable ranges corresponding to each feature data may be the same or different, and may be specifically set according to the actual application scenario.
Specifically, after determining which of all the historical orders are abnormal orders and which are normal orders by the method, removing order data corresponding to the abnormal orders, that is, only keeping order data corresponding to the normal orders, and then taking the order data corresponding to the normal orders as the sample order data.
It should be noted that, when all of the plurality of historical orders are the normal order, the sample order data is the historical order data, and the sample order data is the order data corresponding to the normal order.
And S22, performing box separation on the characteristic data corresponding to the normal order based on the sample order data to obtain the training data.
As shown in fig. 4, in an embodiment, the step of binning the feature data corresponding to the normal order based on the sample order data includes the following steps:
and step S221, acquiring the same characteristic data corresponding to all the normal orders based on the sample order data.
Since the binning process in step S22 is performed for the same feature data corresponding to all normal orders, the same feature data corresponding to all normal orders needs to be acquired first when the binning process in step S22 is performed.
Further, each normal order includes at least one feature data, and the step S221 obtains at least one set of feature data sets, where each feature set includes the same feature data corresponding to all normal orders.
Step S222, defining preset intervals based on the same characteristic data corresponding to all the normal orders, and determining the interval ranges corresponding to the preset intervals respectively.
It should be noted that the same feature data corresponding to all the normal orders falls into the interval, but the intervals into which the feature data corresponding to different normal orders fall may be the same or different.
It should be noted that, the number of the preset intervals is specifically set, which is not taken as a condition for limiting the present invention, and in practical application, the preset intervals may be set according to a specific application scenario.
Further, defining several intervals for each feature data is not a condition for limiting the present invention, and the number of intervals corresponding to each feature data may be the same or different.
In an embodiment, the characteristic data is subjected to binning processing by using an equidistant binning method, that is, the distance between each interval range in the step S222 is equal.
In one embodiment, a feature datum xi is an order linear distance, which ranges from [ x (1),
x (m), wherein x (1) represents the minimum value of the order straight-line distance in all historical orders; x (m) represents the maximum value of the order straight-line distance in all historical orders.
Assuming that Ni intervals are defined for the feature data xi, the length of each interval is L = [ x (m) -x (1) ]/Ni rounded up, that is, ni intervals formed after equidistant binning are respectively: [ x (1), x (1) + L), [ x (1) + L, x (1) + 2L), …, [ x (1) + (Ni-1) L, x (m) ] (x (m) ≦ NiL); of course, the last interval can also be [ x (1) + (Ni-1) L, x (1) + NiL ].
For example, the range of the characteristic data xi to the order straight-line distance is [10, 1000], and 5 sections are obtained by binning the characteristic data xi, where the length L = [ x (m) -x (1) ]/Ni = [1000-10]/5=198 of each section is [10, 208), [208, 406), [406, 604), [604, 802), [802, 1000.
Furthermore, the characteristic data may also be subjected to binning processing in a non-equidistant manner, and the specific working principle may refer to the working principle of equidistant binning, which is not described in detail herein.
Step S223, determining which section the same characteristic data corresponding to each normal order falls into.
Specifically, the intervals are arranged in the order from small to large, and then the same characteristic data corresponding to each normal order is judged to fall into the jth interval (j is more than or equal to 1 and less than or equal to Ni).
And step S224, correspondingly marking the same characteristic data corresponding to all the normal orders based on the judgment result.
Specifically, the sub-variables with the number equal to the number of the preset intervals are derived from a feature data, and then, based on which interval the feature data corresponding to each normal order determined in step S223 falls into, the feature data is marked.
With the above embodiment, ni sub-variables are derived from the feature data xi, which are xi _1, xi _2, … and xi _ Ni, respectively; if the value of the characteristic data xi corresponding to a normal order falls into the jth interval, xi _ j =1, and the values of the rest of the derived variables are all 0, at this time, xi _ j may be marked on the characteristic data xi corresponding to the normal order.
It should be noted that what value xi _ j is not a condition for limiting the present invention, and is defined as 1 here, which is only an embodiment, and in practical applications, can be set according to specific situations.
Note that what is specifically marked in the step S224 is not a condition for limiting the present invention, and it is sufficient to ensure that after marking, which section of the step S222 the feature data falls into is known; for example, if the feature data xi corresponding to a normal order a is marked xi _1 in the step S224, it can be known that the feature data xi corresponding to the normal order a falls into the 1 st interval, that is, the interval [ x (1), x (1) + L); if the feature data xi corresponding to another normal order B is marked xi _2 in the step S224, it is known that the feature data xi corresponding to the normal order B falls into the 2 nd interval, that is, the interval [ x (1) + L, x (1) + 2L).
Further, the values of the sub-variables xi _1, xi _2, … and xi _ Ni derived from the feature data xi corresponding to the normal order a are 1, 0, … and 0, respectively; the values of sub-variables xi _1, xi _2, … and xi _ Ni derived from the characteristic data xi corresponding to the normal order B are 0, 1, … and 0 respectively; similarly, the values of the sub-variables xi _1, xi _2, … and xi _ Ni derived from the feature data xi corresponding to other normal orders and the values of the sub-variables derived from the feature data xi of all normal orders except the feature data xi are determined according to the method.
It should be noted that, after the same feature data corresponding to all normal orders are correspondingly marked in step S224, training data are obtained; correspondingly, the training data includes all labeled feature data corresponding to all normal orders.
And S3, training an order fulfillment duration estimation model adopting a quantile estimation mode based on the training data to obtain a trained order fulfillment duration estimation model, and estimating fulfillment duration of the target order based on the trained order fulfillment duration estimation model.
In an embodiment, the training of the order fulfillment duration estimation model using a quantile estimation mode based on the training data to obtain the trained order fulfillment duration estimation model includes the following steps: inputting the training data into the order fulfillment duration estimation model, so that the order fulfillment duration estimation model estimates the variable coefficient of the order fulfillment duration estimation model based on the training data and by adopting the quantile estimation mode, and the trained order fulfillment duration estimation model is obtained.
It should be noted that the variable coefficient is calculated by the order fulfillment duration estimation model based on training data; specifically, the variable coefficient is calculated by adopting a quantile estimation mode.
It should be noted that the quantile estimation mode refers to a quantile estimation method; specifically, quantile, also called quantile, refers to a numerical point that divides the probability distribution range of a random variable into several equal parts, and commonly used are median (i.e. binary), quartile, percentile, etc.; the quantile estimation is the point estimation and the interval estimation of the overall percentile estimation, is a concept in statistics, is non-parametric, does not assume the distribution of observed values, has stronger robustness to abnormal data in a sample, and can select mean regression of different quantiles.
In an embodiment, the formula of the trained order fulfillment duration estimation model for estimating the fulfillment duration of the target order is as follows:
wherein,
representing a duration of performance of the target order;
representing the number of the characteristic data corresponding to the target order;
representing the number of preset intervals corresponding to the characteristic data xi;
and
each represents the variable coefficient;
indicating that after the characteristic data xi corresponding to the target order is marked, the characteristic data xi falls into a value corresponding to the jth interval.
In one embodiment, the p quantile of the performance duration is estimated by using a linear regression method.
In particular, coefficient vectors of linear regression
=(
,
,
,…,
,…,
,
,…,
) The estimate of (c) is given by the following optimization equation:
wherein p represents a quantile; y represents the real value of the performance duration corresponding to the normal order in the training data; y is pred And the estimation value of the duration of the normal order in the training data is represented through the order duration estimation model.
It should be noted that p is a set value, and is specifically set to what number, which is not taken as a condition for limiting the present invention, and in practical application, p may be set according to a specific application scenario; such as setting p to a 90 quantile, or a 95 quantile, or a 99 quantile.
For example, taking a 90 quantile, i.e. p =0.9, if the true value Y =9, the estimated value Y is estimated pred When 10, 0.9 × (9-10) = -0.9; estimated value Y pred When the value is 8, (0.9-1) × (9-8) = -0.1, the minimum value is selected, so that the estimated value Y is selected pred And when the number is 10, the coefficient of the corresponding solution of the order performance duration estimation model.
In one embodiment, the method further comprises the steps of: and acquiring the target duration according to the preset increment and the performance duration of the target order.
It should be noted that, through the above steps, the trained order fulfillment duration estimation model preliminarily estimates the fulfillment duration of the target order
Then, in the contract duration
On the basis of the above-mentioned formula, adding preset increment to obtain goalAnd marking the time length, so as to enable the finally estimated performance time length of the target order to be more accurate and reliable, wherein the target time length is the finally estimated performance time length of the target order.
In an embodiment, before the step of obtaining the target duration according to the preset increment and the performance duration of the target order, the method further includes the following steps:
step one, weather information and/or product information of the target order are obtained.
It should be noted that, when the estimation method for the order fulfillment duration is applied to an actual application scenario, external factors (such as weather, if the weather is severe, the order fulfillment duration may be extended) and order products (such as, if the order products include fresh products and a user requests to slaughter the fresh products, the order fulfillment duration may be extended) need to be considered, so as to improve the accuracy of the fulfillment duration estimated by the estimation method for the order fulfillment duration.
Specifically, weather information is acquired in real time, and/or product information of the target order is acquired by performing product identification on the target order.
It should be noted that, here, the acquisition of the weather information adopts a conventional technical means in the field, and how to acquire the weather information is specifically not taken as a condition for limiting the present invention, and therefore, detailed description is not repeated herein; similarly, the product identification is performed on the target order to obtain the product information, and conventional technical means in the field (such as a manner of feature extraction) are also adopted, which are not conditions for limiting the present invention, and therefore, detailed description is not repeated here.
And step two, determining the preset increment according to the weather information and/or the product information.
In an embodiment, the determining the preset increment according to the weather information includes the following steps:
and (41) predicting the weather type according to the weather information.
In one embodiment, the weather types include, but are not limited to: no rain, light rain, medium rain and heavy rain.
And (42) determining the preset increment according to the weather type.
In one embodiment, different weather types correspond to different predetermined increments.
It should be noted that, in general, the worse the weather is, the larger the corresponding preset increment is.
In one embodiment, if the weather type is no rain, the preset increment is zero; if the weather type is light rain, the preset increment is a first preset value; if the weather type is the middle rain, the preset increment is a second preset value; if the weather type is heavy rain, the preset increment is a third preset value; the second preset value is greater than the first preset value, and the second preset value is smaller than the third preset value.
It should be noted that the first preset value (> 0), the second preset value (> 0), and the third preset value (> 0) are preset, and are specifically set as what number, and are not used as conditions for limiting the present invention; similarly, after setting, corresponding modification can be performed in the subsequent application process, as long as "the second preset value is greater than the first preset value, and the second preset value is less than the third preset value".
In one embodiment, determining the preset increment according to the product information includes the following steps: and judging whether the target order comprises a fresh product to be slaughtered or not according to the product information so as to determine a preset increment according to a judgment result.
In one embodiment, the predetermined increment is set to a fourth predetermined value when the target order includes a fresh product to be slaughtered.
It should be noted that, the fourth preset value (> 0) is also preset, and the specific number thereof is not a condition for limiting the present invention; similarly, if set, corresponding modifications may be made during subsequent applications.
In one embodiment, if the target order does not include the fresh product to be slaughtered, the predetermined increment is set to zero.
In an embodiment, the preset increment is determined according to the weather information and the product information.
It should be noted that, the working principle of determining the preset increment according to the weather information and the product information may refer to the implementation methods of determining the preset increment according to the weather information and the product information, which is equivalent to the combination of the implementation methods of determining the preset increment according to the weather information and the product information, and correspondingly, the finally determined preset increment is also equivalent to the combination of the preset increments determined according to the weather information and the product information, and therefore details are not repeated here.
It should be noted that, after the preliminary estimation of the order fulfillment duration of the target order is performed by the trained order fulfillment duration estimation model, a preset increment is added to the fulfillment duration by combining the actual application scene, considering weather information and product information, so as to ensure the accuracy and reliability of the estimation of the order fulfillment duration by the order fulfillment duration estimation method.
As shown in fig. 5, in an embodiment, the estimating the duration of performance of the target order based on the trained order duration estimation model includes the following steps:
and S31, acquiring target order data corresponding to the target order.
Step S32, inputting the target order data into the trained order fulfillment duration estimation model, so that the trained order fulfillment duration estimation model estimates fulfillment duration of the target order based on the target order data.
It should be noted that the above estimation model for order fulfillment duration mainly relates to during work
、
And
real-time calculation and acquisition of and duration of performance
Pre-estimating; wherein some of the characteristics
And
the off-line calculation is completed before the contract duration is estimated, and a prediction interface is waited to be obtained and used in real time; another part of the characteristic
Requires real-time calculation of the prediction interface, in calculating the
When, the following features need to be considered: the characteristics related to delivery, such as the quantity of orders and human efficiency characteristics in the store, and the delivery distance and duration characteristics outside the store, need to be associated with the cell ID, and the cell attribution for calculating orders in real time is one of the cores of the prediction module.
As shown in fig. 5, in an embodiment, the estimating the duration of performance of the target order based on the trained order duration estimation model further includes the following steps:
and S33, acquiring current data of the store corresponding to the target order.
And step S34, determining the number of the target cell to which the target order belongs, and acquiring the distribution distance and the historical distribution time length corresponding to the target order based on the number of the target cell.
In one embodiment, the step of inputting the target order data into the trained order performance duration estimation model so that the trained order performance duration estimation model estimates the performance duration of the target order based on the target order data comprises the following steps: inputting the current data, the delivery distance, the historical delivery time length and the target order data into the trained order fulfillment time length estimation model, so that the trained order fulfillment time length estimation model estimates the fulfillment time length of the target order based on the current data, the delivery distance, the historical delivery time length and the target order data.
As shown in fig. 6, in an embodiment, the step of determining the target cell number to which the target order belongs includes the following steps:
step S341, obtaining the longitude and latitude of the receiving address corresponding to the target order.
And step S342, carrying out geographic hash mapping on the longitude and latitude to obtain a unique character string.
Note that the "character string" in step S342 represents a certain block area on the map, and the size of the area depends on the accuracy of the hash mapping.
It should be noted that the geographic hash (geohash) block is a sub-block obtained by understanding the earth as a two-dimensional plane and recursively decomposing the two-dimensional plane, and each sub-block has the same string code in a certain latitude and longitude range, that is, all points (i.e., latitude and longitude coordinate points) in each sub-block share the same geohash string; mapping the cell of each historical order into an 8-bit coded geographical hash block or a 9-bit coded geographical hash block; it should be understood that the more the number of encoding bits of the geographical hash block is, the higher the encoding precision is, so that more accurate cell hash block encoding can be obtained, and the number of encoding bits of the geographical hash block can be selected according to the precision requirement.
Step S343, the target cell number is determined based on the character string.
Specifically, matching the above-mentioned cell from the order in the offline data, matching the above-mentioned cell hash block code by the above-mentioned cell according to the hash geographic processing in step S342, b = [ b1, b2, …, bn ], where bn in the list represents the hash block code, and one bn is mapped again, and the corresponding cell list c = [ c1, c2, …, cn ] and fence data of each cell; cn in the list represents the cell number of all cell digit types in one hash-block code bn.
Firstly traversing Hash block codes, finding out an affiliated Hash block bn, judging whether a receiving address belongs to the Hash block according to fence data, traversing a cell list c contained in the Hash block, and judging whether the receiving address belongs to a cell cn of the list c according to the fence data; and finding the cell ID to which the target order belongs.
According to the acquired cell ID, the distribution distance from the store to the cell and the historical distribution time length characteristics can be acquired from the offline data.
All features of the predicted interface calculation completion (
,
,…,
,…,
,
,…,
) Then, the initial estimation of the performance duration can be completed by substituting the formula for estimating the performance duration of the target order; wherein the historical characteristic data comprises: the cell historical distribution time length, the cell historical distribution median and the time length corresponding to the box separation distance.
It should be noted that the invention effectively solves the problem that the order fulfillment duration is difficult to predict in multiple stores and multiple areas and the problem that the traditional mean prediction cannot meet the setting of the prediction level through the real-time calculation of the cell attribution, the real-time acquisition of the characteristics and the prediction of the quantile prediction mode.
It should be noted that the protection scope of the method for estimating the order fulfillment duration according to the present invention is not limited to the execution sequence of the steps listed in this embodiment, and all the solutions implemented by adding, subtracting, and replacing steps in the prior art according to the principle of the present invention are included in the protection scope of the present invention.
As shown in fig. 7, in an embodiment, the system for estimating order fulfillment duration of the present invention includes an obtaining module 71, a preprocessing module 72, and an estimating module 73.
The obtaining module 71 is configured to obtain historical order data.
The preprocessing module 72 is configured to preprocess the historical order data to obtain training data.
The estimation module 73 is configured to train an order fulfillment duration estimation model adopting a quantile estimation mode based on the training data to obtain a trained order fulfillment duration estimation model, so as to estimate fulfillment duration of the target order based on the trained order fulfillment duration estimation model.
It should be noted that the structures and principles of the obtaining module 71, the preprocessing module 72, and the estimating module 73 correspond to the steps (step S1 to step S3) in the estimating method of order fulfillment duration one by one, and therefore, the details are not repeated herein.
It should be noted that the division of the modules of the above system is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the x module may be a processing element that is set up separately, or may be implemented by being integrated in a chip of the system, or may be stored in a memory of the system in the form of program code, and the function of the x module may be called and executed by a processing element of the system. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
It should be noted that, the system for estimating order fulfillment duration according to the present invention may implement the method for estimating order fulfillment duration according to the present invention, but the implementation apparatus of the method for estimating order fulfillment duration according to the present invention includes, but is not limited to, the structure of the system for estimating order fulfillment duration recited in this embodiment, and all structural modifications and substitutions in the prior art made according to the principles of the present invention are included in the scope of the present invention.
In summary, compared with the prior art, the invention provides an improved machine learning algorithm, which changes the traditional mean value estimation mode into a quantile estimation mode to calculate the variable coefficient of the order fulfillment duration estimation model through the quantile estimation mode, thereby capturing the fluctuation above the mean value of the historical order delivery duration, and effectively solving the problem that the estimation precision of the order fulfillment duration is not high under the condition that the order fulfillment duration is greatly different among a plurality of shops of a merchant and a plurality of areas of users; the method calculates the order characteristics of an offline scene and a real-time scene by comprehensively considering the characteristics of multiple shops of a merchant, multiple areas of users, large difference of order fulfillment duration and the like, judges the number of a cell to which an order belongs in real time when the fulfillment duration of the order is estimated, extracts the characteristic data of the cell according to the number of the cell, and establishes an order fulfillment duration estimation model, so that the operation labor and the cost are reduced; therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.