CN112183856A - Data processing method and device, readable storage medium and electronic equipment - Google Patents
Data processing method and device, readable storage medium and electronic equipment Download PDFInfo
- Publication number
- CN112183856A CN112183856A CN202011036152.9A CN202011036152A CN112183856A CN 112183856 A CN112183856 A CN 112183856A CN 202011036152 A CN202011036152 A CN 202011036152A CN 112183856 A CN112183856 A CN 112183856A
- Authority
- CN
- China
- Prior art keywords
- time
- sample data
- order
- data
- prediction model
- 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
Links
- 238000003672 processing method Methods 0.000 title abstract description 11
- 239000013598 vector Substances 0.000 claims abstract description 176
- 238000005070 sampling Methods 0.000 claims abstract description 91
- 238000000034 method Methods 0.000 claims abstract description 53
- 238000012549 training Methods 0.000 claims abstract description 33
- 238000012545 processing Methods 0.000 claims abstract description 21
- 238000004590 computer program Methods 0.000 claims description 16
- 230000008569 process Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 20
- 235000012054 meals Nutrition 0.000 description 19
- 238000009499 grossing Methods 0.000 description 13
- 230000004044 response Effects 0.000 description 9
- 238000012937 correction Methods 0.000 description 7
- 235000013305 food Nutrition 0.000 description 7
- 230000002123 temporal effect Effects 0.000 description 4
- 238000007667 floating Methods 0.000 description 3
- 230000036760 body temperature Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 241001137251 Corvidae Species 0.000 description 1
- 240000007651 Rubus glaucus Species 0.000 description 1
- 235000011034 Rubus glaucus Nutrition 0.000 description 1
- 235000009122 Rubus idaeus Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 235000015108 pies Nutrition 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0633—Lists, e.g. purchase orders, compilation or processing
- G06Q30/0635—Processing of requisition or of purchase orders
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/12—Hotels or restaurants
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Economics (AREA)
- Tourism & Hospitality (AREA)
- Strategic Management (AREA)
- Human Resources & Organizations (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Marketing (AREA)
- Development Economics (AREA)
- Entrepreneurship & Innovation (AREA)
- Quality & Reliability (AREA)
- Operations Research (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Game Theory and Decision Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Primary Health Care (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the invention discloses a data processing method, a data processing device, a readable storage medium and electronic equipment. The method comprises the steps of obtaining sample data of at least two stages through historical order data, dividing the order data into at least two stages according to different order states, wherein the sample data correspond to different sampling time points and comprise a characteristic vector and duration of the time when the distance of the sampling time points is switched to the next order state, and training a time prediction model according to the characteristic data, wherein the input of the time prediction model is the characteristic vector of the sample data, and the output of the time prediction model is the duration of the time when the distance of the sampling time points is switched to the next order state. By the method, the time prediction model is trained, the duration of the time when the distance from the current time is switched to the next order state in the distribution process can be predicted in real time through the time prediction model, and the accuracy of duration prediction is improved.
Description
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and an apparatus for data processing, a readable storage medium, and an electronic device.
Background
With the progress of science and technology, the life style of people is changed, for example, rapid development of industries such as take-out, express delivery and the like is realized, and the life of people is more convenient. Taking take a take-out as an example, a user places an order through a take-out application in a terminal device, the take-out application sends the order to a merchant and allocates a rider who complicatedly delivers the order, after the user places the order, the take-out application displays the expected delivery time of the order so as to prompt the user, but since the application only displays the overall expected delivery time, the user cannot know the state of the rider in a specific order delivery process, and the displayed expected delivery time may have the problem of inaccuracy, which causes the user's trouble and affects the user experience.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data processing method, an apparatus, a readable storage medium, and an electronic device, which can predict, in real time, a time required by a current time to be distant from a start time of a next stage in a delivery process, and improve accuracy of time prediction.
In a first aspect, an embodiment of the present invention provides a data processing method, where the method includes: obtaining sample data of at least two stages according to historical order data, wherein the historical order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and a duration of a time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format; and training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the distance between the sampling time points is switched to the next order state.
Preferably, the feature vectors of the sample data of different stages have the same dimension, and at least some of the data items in the feature vectors of the sample data that do not match the stage to which the sample data belongs are empty.
Preferably, the at least part of the data items that do not match the phase to which the sample data belongs are: and the phase corresponding to the data item is the data item after the phase of the sample data.
Preferably, the phases include at least two of a pick-up phase, an arrival phase, a pick-up phase, and a delivery phase.
Preferably, the feature vector is determined by:
responding to the sample data belonging stage as an order receiving stage, and determining the characteristic vector according to at least one of a traffic line to which the traffic belongs, a current state of the traffic, a distance between the traffic and the shop, a current task volume of the traffic, a time from the current time to the time when the traffic receives the task, an average waiting time when the traffic reaches the shop, and an average time from the time when the traffic receives the task to the time when the traffic reaches the shop;
responding to the fact that the stage to which the sample data belongs is a store-arriving stage, and determining the feature vector according to at least one of a traffic line to which the traffic belongs, the current state of the traffic, the distance between the traffic and a store, the current task amount of the traffic, the time from the current time to the time of receiving the traffic, the average waiting time of the traffic arriving at the store, the average time from the time of receiving the traffic arriving at the store to the time of arriving at the store, the un-taken task amount of the traffic currently arriving at the store, and the proportion of meal taking within a set time after the traffic arrives at the store; and
and responding to the stage that the sample data belongs to is a fetching and sending stage, and determining the characteristic vector according to at least one of a movement line to which the movement belongs, a movement current state, a distance between the movement and a shop, a movement current task amount, a time length from current time to the moment when the movement receives a task, an average waiting time length from the moment when the movement arrives at the shop, an average time length from the moment when the movement receives the task to the moment when the movement arrives at the shop, an un-fetched task amount when the movement currently arrives at the shop, a ratio of fetching within a set time length after the movement arrives at the shop, and whether the distance between the movement current task and a user is the nearest distance among all the movement tasks.
Preferably, the temporal prediction model is a deep factor model deep fm.
In a second aspect, an embodiment of the present invention provides a data processing method, where the method includes: acquiring a real-time feature vector of an order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time feature vector comprises current time information;
inputting the real-time characteristic vector into a pre-trained time prediction model, and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the characteristic vector and the duration of the sampling time from the time of switching to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format.
Preferably, the method comprises: and performing smoothing operation on the predicted time length to determine the display time length.
Preferably, the smoothing operation on the predicted duration to determine the display duration specifically includes:
and determining the sum of the predicted time length, the distance time length and the additional time length as the display time length in response to the current time being the first time slice of the current stage of the order to be predicted, wherein the distance time length is a predicted value of the time length when the position of the transport capacity at the current time reaches a key position triggering order state switching, and the additional time length is a preset correction value.
Preferably, the distance duration is equal to a weighted value of a ratio of a distance between the position of the transport capacity at the current moment and the key position to the average speed of the transport capacity.
Preferably, the smoothing operation on the predicted duration to determine the display duration specifically includes:
and responding to the second time slice of the current stage of the order to be predicted at the current moment or the time slices behind the second time slice, and determining the display time length according to the predicted time length, the predicted time length corresponding to the previous time slice and the interval of the time slices.
In a third aspect, an embodiment of the present invention provides an apparatus for data processing, where the apparatus includes: the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring sample data of at least two stages according to historical order data, the order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and the duration of the time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format; and the training unit is used for training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the sampling time point distance is switched to the next order state.
In a fourth aspect, an embodiment of the present invention provides an apparatus for data processing, where the apparatus includes: the second obtaining unit is used for obtaining a real-time characteristic vector of the order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time characteristic vector comprises current time information; the determining unit is used for inputting the real-time characteristic vector into a pre-trained time prediction model and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the characteristic vector and the duration of the sampling time from the time of switching to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format.
In a fifth aspect, embodiments of the present invention provide a computer-readable storage medium on which computer program instructions are stored, which, when executed by a processor, implement a method according to any one of the first aspect, any one of the possibilities of the first aspect, the second aspect or any one of the possibilities of the second aspect.
In a sixth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is configured to store one or more computer program instructions, where the one or more computer program instructions are executed by the processor to: obtaining sample data of at least two stages according to historical order data, wherein the historical order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and a duration of a time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format; and training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the distance between the sampling time points is switched to the next order state.
Preferably, the feature vectors of the sample data of different stages have the same dimension, and at least some of the data items in the feature vectors of the sample data that do not match the stage to which the sample data belongs are empty.
Preferably, the at least part of the data items that do not match the phase to which the sample data belongs are: and the phase corresponding to the data item is the data item after the phase of the sample data.
Preferably, the phases include at least two of a pick-up phase, an arrival phase, a pick-up phase, and a delivery phase.
Preferably, the processor is further configured to perform:
responding to the sample data belonging stage as an order receiving stage, and determining the characteristic vector according to at least one of a traffic line to which the traffic belongs, a current state of the traffic, a distance between the traffic and the shop, a current task volume of the traffic, a time from the current time to the time when the traffic receives the task, an average waiting time when the traffic reaches the shop, and an average time from the time when the traffic receives the task to the time when the traffic reaches the shop;
responding to the fact that the stage to which the sample data belongs is a store-arriving stage, and determining the feature vector according to at least one of a traffic line to which the traffic belongs, the current state of the traffic, the distance between the traffic and a store, the current task amount of the traffic, the time from the current time to the time of receiving the traffic, the average waiting time of the traffic arriving at the store, the average time from the time of receiving the traffic arriving at the store to the time of arriving at the store, the un-taken task amount of the traffic currently arriving at the store, and the proportion of meal taking within a set time after the traffic arrives at the store; and
and responding to the stage that the sample data belongs to is a fetching and sending stage, and determining the characteristic vector according to at least one of a movement line to which the movement belongs, a movement current state, a distance between the movement and a shop, a movement current task amount, a time length from current time to the moment when the movement receives a task, an average waiting time length from the moment when the movement arrives at the shop, an average time length from the moment when the movement receives the task to the moment when the movement arrives at the shop, an un-fetched task amount when the movement currently arrives at the shop, a ratio of fetching within a set time length after the movement arrives at the shop, and whether the distance between the movement current task and a user is the nearest distance among all the movement tasks.
Preferably, the temporal prediction model is a deep factor model deep fm.
In a seventh aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is configured to store one or more computer program instructions, where the one or more computer program instructions are executed by the processor to: acquiring a real-time feature vector of an order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time feature vector comprises current time information;
inputting the real-time characteristic vector into a pre-trained time prediction model, and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the characteristic vector and the duration of the sampling time from the time of switching to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format.
Preferably, the processor is further configured to perform: and performing smoothing operation on the predicted time length to determine the display time length.
Preferably, the processor is specifically configured to perform:
and determining the sum of the predicted time length, the distance time length and the additional time length as the display time length in response to the current time being the first time slice of the current stage of the order to be predicted, wherein the distance time length is a predicted value of the time length when the position of the transport capacity at the current time reaches a key position triggering order state switching, and the additional time length is a preset correction value.
Preferably, the distance duration is equal to a weighted value of a ratio of a distance between the position of the transport capacity at the current moment and the key position to the average speed of the transport capacity.
Preferably, the processor is further specifically configured to perform:
and responding to the second time slice of the current stage of the order to be predicted at the current moment or the time slices behind the second time slice, and determining the display time length according to the predicted time length, the predicted time length corresponding to the previous time slice and the interval of the time slices.
The method comprises the steps of obtaining sample data of at least two stages through historical order data, wherein the historical order data are divided into at least two stages according to different order states, the sample data correspond to different sampling time points, the sample data comprise a characteristic vector and the duration of the time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format; and training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the distance between the sampling time points is switched to the next order state. By the method, the time prediction model is trained, the duration of the time when the distance from the current time is switched to the next order state in the distribution process can be predicted in real time through the time prediction model, and the accuracy of duration prediction is improved.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
FIG. 1 is a flow chart of a method of data processing according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a method of data processing according to a second embodiment of the present invention;
FIG. 3 is a flow chart of a method of data processing according to a second embodiment of the present invention;
FIG. 4 is a schematic interface diagram of a second embodiment of the present invention;
FIG. 5 is a schematic interface diagram of a second embodiment of the present invention;
FIG. 6 is a schematic interface diagram of a second embodiment of the present invention;
FIG. 7 is a graph showing the results of the second embodiment of the present invention;
FIG. 8 is a diagram of an application scenario of the third embodiment of the present invention;
FIG. 9 is a schematic diagram of a data processing apparatus according to a fourth embodiment of the present invention;
FIG. 10 is a schematic diagram of a data processing apparatus according to a fifth embodiment of the present invention;
fig. 11 is a schematic view of an electronic apparatus according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the present invention.
Further, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and are not necessarily drawn to scale.
Meanwhile, it should be understood that, in the following description, a "circuit" refers to a conductive loop constituted by at least one element or sub-circuit through electrical or electromagnetic connection. When an element or circuit is referred to as being "connected to" another element or element/circuit is referred to as being "connected between" two states, it may be directly coupled or connected to the other element or intervening elements may be present, and the connection between the elements may be physical, logical, or a combination thereof. In contrast, when an element is referred to as being "directly coupled" or "directly connected" to another element, it is intended that there are no intervening elements present.
Unless the context clearly requires otherwise, throughout the description, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
In the prior art, after a user places an order through a takeout application in a terminal device, the takeout application sends the order to a merchant and allocates a rider for complicated delivery of the order, the takeout application displays the estimated delivery time of the order so as to prompt the user, for example, the order which is sent by the user at 11 hours and 30 minutes is estimated to be delivered to the user through a delivery time estimation model, namely, the order is delivered to a client at 12 hours and 00 minutes is estimated to be delivered to the user through a delivery time estimation model, and 'the estimated delivery time is 12 hours and 00 minutes' is displayed in the takeout application in the terminal device of the user; however, since the application only displays the whole predicted delivery time, but the displayed predicted delivery time may have an inaccurate problem, the user cannot know the state of the rider in the specific order delivery process, and if the user does not receive the order delivered by the rider at the predicted delivery time, the user cannot know the order or the current state of the rider, the user will have trouble, and serious complaints will be made, which affects the user experience.
In the embodiment of the invention, the order is divided into four stages from the moment that a rider receives an order distributed by an application program, namely an order receiving stage, a store arriving stage, a picking and delivering stage and a delivering stage, wherein the starting moment of the order receiving stage is the moment that the transporting capacity receives a task, the ending moment of the order receiving stage is the moment that the transporting capacity arrives at a store, the starting moment of the store arriving stage is the moment that the transporting capacity arrives at the store, the ending moment of the store arriving stage is the moment that the transporting capacity acquires a meal corresponding to the task, the starting moment of the delivering stage is the moment that the transporting capacity acquires the meal, and the ending moment of the delivering stage is the moment that the transporting capacity arrives at the meal; the time when the food is delivered to the client is the starting time of the delivery stage, and the embodiment of the invention does not pay attention to the time periods except the starting time of the delivery stage. In this embodiment of the present invention, the rider may be referred to as a capacity, the order may be referred to as a task, and the stage may be referred to as a state, which is not limited in this embodiment of the present invention.
In the embodiment of the invention, the time required by a rider in each stage can be estimated through the time prediction model, the time required by the current time to the starting time of the next stage can also be estimated, the time required by the current time to the starting time of the next stage in each stage is displayed to a user through an application program in real time, so that the user can clearly obtain the current stage of the current order and the time required by the current stage to the starting time of the next stage, the understanding and the progress of the order by the user are enhanced, and the use experience of the user can be improved; and the time length required by the current time to the starting time of the next stage is estimated in stages, so that the estimation accuracy can be improved.
In the embodiment of the present invention, the time length required by the current time from the starting time of the next stage may also be referred to as a time length from the current time to the time when the next order state is switched.
In the embodiment of the present invention, the training of the time prediction model and the use of the time prediction model will be described separately.
Fig. 1 is a flowchart of a data processing method according to a first embodiment of the present invention. As shown in fig. 1, the method specifically comprises the following steps:
step S100, sample data of at least two stages are obtained according to historical order data, wherein the historical order data are divided into at least two stages according to different order states, the sample data correspond to different sampling time points, the sample data comprise a feature vector and the duration of the time when the distance between the sampling time points is switched to the next order state, the feature vector of each sample data is determined according to the order state information of the corresponding sampling time, and the feature vectors of the sample data of different stages have the same format.
Specifically, the phases include at least two of an order receiving phase, an order arriving phase, a picking and delivering phase and a delivering phase, where a starting time of the order receiving phase is a time when the transportation capacity receives a task, a terminating time of the order receiving phase is a time when the transportation capacity reaches a store, a starting time of the order arriving phase is a time when the transportation capacity reaches the store, a terminating time of the order arriving phase is a time when the transportation capacity obtains a meal corresponding to the task, a starting time of the delivering phase is a time when the transportation capacity obtains the meal, a terminating time of the picking and delivering phase is a time when the transportation capacity reaches the meal, and a starting time of the delivering phase is a time when the meal reaches a customer. The shop may also be referred to as a merchant, the capacity may also be referred to as a rider, and the task may also be referred to as an order or a waybill, which is not limited in the embodiments of the present invention.
In a possible implementation manner, the starting time of the picking-up and delivering stage is the time when the transportation capacity obtains the food, and is a time point, the ending time of the picking-up and delivering stage is the time when the transportation capacity reaches the food, and is also a time point, and the starting time of the delivering stage is the time when the food reaches the client, and is also a time point. And can only be the final output of the pre-trained temporal prediction model.
In a possible implementation manner, the fetching and delivering stages may be two stages, where a starting time of the first stage is a time when the transportation capacity obtains the food, and an ending time of the first stage is a time when the transportation capacity reaches a place near a designated delivery location, for example, a doorway of an office building; the beginning of the second phase is when the capacity reaches the vicinity of the designated delivery location, and the ending of the second phase is when the capacity delivers the meal to the user, e.g., from an office doorway to a floor-15 user's office.
In a possible implementation manner, the sample data corresponds to different sampling time points, the sample data includes a feature vector and a duration of the sampling time point from the time of switching to the next order state, that is, the duration of the sampling time point from the time of the next order state may be referred to as a sample label (cable), and the sample cable of each sample is equal to a difference value between the starting time of the next stage/next order state and the sampling time point.
For example, assume that the phases and corresponding times for a historical order are as follows: the time of receiving the task at the time of 11 hours 20 minutes of transportation, the time of arriving at the shop at the time of 11 hours 25 minutes of transportation, the time of acquiring the food corresponding to the task at the time of 11 hours 51 minutes of transportation and the time of delivering the food at the time of 12 hours 05 minutes of transportation; assuming that the sampling interval is 1 minute, the corresponding relationship between the sampling time point of the order and the sample table is shown in table 1:
TABLE 1
Sampling time point | Sample table |
11:21 | 4 minutes (11: 25-11:21) |
11:22 | 3 minutes (11: 25-11:22) |
11:23 | 2 minutes (11: 25-11:23) |
11:24 | 1 minute (11: 25-11:24) |
11:25 | 0 minute (11: 25-11:25) |
11:26 | 26 minutes (11: 51-11:25) |
… | … |
12:00 | 5 minutes (12: 05-12:00) |
… | … |
In a possible implementation manner, the feature vectors of the sample data at different stages have the same format, which may also be referred to as that the feature vectors corresponding to each stage have the same dimension, but the specific feature vector corresponding to each stage is determined according to the order state information of the corresponding sampling time.
In a possible implementation manner, the feature vectors of the sample data at different stages have the same dimension, and at least some data items in the feature vectors of the sample data, which are not matched with the stage to which the sample data belongs, are empty; the at least some data items that do not match the phase to which the sample data belongs are: and the phase corresponding to the data item is the data item after the phase of the sample data.
In a possible implementation manner, in the previous stage, the data items of the partial dimensions corresponding to the later stage are null, and the previous stage avoids introducing the data items of the later stage, for example, in the order receiving stage, there is no data item in the store-to stage, so that the data item in the store-to stage is null, in the store-to stage, there is no data item in the pick-and-send stage, and the data item in the pick-and-send stage is null.
For example, the feature vector is divided into the following three cases:
in case one, in response to the fact that the stage to which the sample data belongs is an order receiving stage, the feature vector is determined according to at least one of a traffic line to which the traffic belongs, a current state of the traffic, a distance between the traffic and a store (the distance between the traffic and the store when the traffic just receives a task is the longest distance of the order receiving stage, the traffic moves towards the store, the distance is continuously reduced, and the traffic is in the stage when the traffic reaches the store and the distance is 0 m) when the traffic reaches the store, a current task amount of the traffic (which can also be referred to as a current back order amount, namely the number of orders received by the traffic), a time length from a current time to a time when the traffic receives the task, an average waiting time length for the traffic to reach the store, and an average time length from the time when the traffic receives the task to the time when the traffic.
In one possible implementation, the average waiting time for the capacity to reach the store can be the average waiting time for the capacity to reach the store within the 7-day history time; the average time length from the time of the capacity reception task to the time of the capacity arrival at the store may be an average time length from the time of the capacity reception task to the time of the capacity arrival at the store within the 7-day history time.
And secondly, in response to the fact that the stage to which the sample data belongs is a store-arriving stage, determining the characteristic vector according to at least one of a traffic line to which the traffic belongs, a current state of the traffic, a distance between the traffic and a store, a current task amount of the traffic, a time length from a current time to a time of receiving a task of the traffic, an average waiting time length of the traffic arriving at the store, an average time length from the time of receiving the task of the traffic to the time of arriving at the store, an un-taken task amount of the traffic currently arriving at the store, and a ratio of meal taking within a set time length after the traffic arrives at the store.
In one possible implementation manner, the average duration from the moment when the transportation capacity receives the task to the moment when the transportation capacity reaches the store may be the average duration from the moment when the transportation capacity receives the task to the moment when the transportation capacity reaches the store within the 7-day history time; the proportion of taking meals within a set time after the capacity reaches the shop can be the proportion of taking meals within 15 seconds after the capacity reaches the shop within 7 days of history.
And thirdly, responding to the situation that the sample data belongs to a fetching and sending stage, and determining the characteristic vector according to at least one of the current line of the transportation capacity, the current state of the transportation capacity, the distance between the transportation capacity and the shop, the current task amount of the transportation capacity, the time length from the current time to the moment of receiving the transportation capacity, the average waiting time length from the moment of receiving the transportation capacity to the shop, the average time length from the moment of receiving the transportation capacity to the shop, the un-fetched task amount of the transportation capacity to the shop, the proportion of fetching meals within the set time length after the transportation capacity reaches the shop, and whether the distance between the current task of the transportation capacity and the user is the closest distance among all the transportation capacity tasks.
Step S101, training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the sampling time point distance is switched to the next order state.
In one possible implementation, the temporal prediction model is a deep factor model (deep factor model, deep fm).
Fig. 2 is a flow chart of a method of data processing according to a second embodiment of the present invention. As shown in fig. 2, the method specifically includes the following steps:
step S200, obtaining a real-time characteristic vector of an order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time characteristic vector comprises current time information.
Specifically, the at least two stages include at least two of an order taking stage, a store arriving stage, a pick-up and delivery stage, and a delivery stage, wherein the order taking stage, the store arriving stage, the pick-up and delivery stage, and the delivery stage are in sequence: first the order taking phase, then the store arriving phase, then the pick-up phase, and finally the delivery phase.
Step S201, inputting a real-time feature vector into a pre-trained time prediction model, and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the feature vector and the duration of the sampling time from the time of switching to the next order state, the feature vector of each sample data is determined according to the order state information of the corresponding sampling time, and the feature vectors of the sample data of different stages have the same format.
Fig. 3 is a flowchart of a data processing method according to a second embodiment of the present invention, and after step S201, the method further includes:
and step S202, performing smoothing operation on the predicted time length, and determining the display time length.
In a possible implementation manner, performing a smoothing operation on the predicted duration, and determining the display duration specifically includes the following two manners:
in a first mode, in response to that the current time is a first time slice of the current stage of the order to be predicted, determining the sum of the predicted time, the distance time and the additional time as the display time, wherein the distance time is a predicted value of the time when the position of the transport capacity reaches a key position triggering order state switching at the current time, and the additional time is a preset correction value.
And the distance duration is equal to the weighted value of the ratio of the distance between the position of the transport capacity at the current moment and the key position to the average speed of the transport capacity.
For example, in the first time slice of each stage, the display duration T from the current time to the starting time of the next stage (the time of switching to the next order state) is represented by the following formula:
T=T0+distance/500m*60s+60s
the TO is the output of the current time of the time prediction model, namely the time length from the previous time TO the starting time of the next stage, the distance (distance) from the position of the current-time transport force TO the position where the next-stage transport force needs TO reach the starting time of the next stage, 500m can be the distance that the transport force can be ridden per minute, and distance/500m 60s is the distance time length; the additional time period may be 60 seconds, which is not limited in the embodiment of the present invention.
And secondly, responding to the second time slice of the current stage of the order to be predicted at the current moment or the time slices behind the second time slice, and determining the display duration according to the predicted duration, the predicted duration corresponding to the previous time slice and the interval of the time slices.
For example, in the second time slice of each stage or the time slices after the second time slice, the display duration T between the current time and the starting time of the next stage is represented by the following formula:
T=avg(T0,T1-60s,T2-120s,T3-180s)
the method comprises the steps that TO is output of a time prediction model at the current moment, T1 is output of the time prediction model 1 minute (min) before the current moment, T2 is output of the time prediction model 2 minutes (min) before the current moment, T1 is output of the time prediction model 3 minutes (min) before the current moment, the set duration corresponding TO the output of the time prediction model 1 minute (min) before the current moment is 60 seconds, the set duration corresponding TO the output of the time prediction model 2 minutes (min) before the current moment is 120 seconds, and the set duration corresponding TO the output of the time prediction model 3 minutes (min) before the current moment is 180 seconds.
In a possible implementation manner, the two manners are also adopted to perform the smoothing operation on the duration in the process of training the time prediction model, which is not limited in the embodiment of the present invention.
In a possible implementation manner, during the order receiving stage, the time of the order from the moment when the capacity receives the task to the moment when the capacity reaches the store is predicted by the stage time prediction model, and the time predicted by the stage time prediction model is the time required from the current moment to the moment when the capacity reaches the store, specifically as shown in fig. 4, a schematic diagram is displayed for an application program interface, a virtual schematic diagram of a person and an electric vehicle represented by a rider is displayed on a distribution map, a virtual schematic diagram of the person and the electric vehicle represented by the rider is displayed on the distribution map in a floating window manner, the virtual schematic diagram shows that the rider is approaching the merchant and is away from the merchant for 274m and 6 minutes, the virtual schematic diagram can also show that the rider is at the body temperature of 36.7 ℃, fig. 4 is only an exemplary illustration, and.
In a possible implementation manner, at the store stage, the time of the order from the moment that the capacity of the order reaches the store to the moment that the capacity of the order gets the meal is predicted by the stage time prediction model, specifically, as shown in fig. 5, a schematic diagram is displayed for an application program interface, a virtual schematic diagram of a person and an electric vehicle represented by a rider is displayed on a distribution map, and "the rider gets the goods in the store" and "the goods are expected after 12 minutes" are displayed on the distribution map by a floating window, and fig. 5 is only an exemplary illustration, the goods can be successfully taken after 12 minutes of the rider, and the goods taking time can be continuously decreased.
In a possible implementation manner, during the delivery phase, the order is taken from the moment of capacity taking to the moment of capacity delivery, the time predicted by the phase time prediction model is the time required by the current moment to the moment of capacity delivery to the task, specifically as shown in fig. 6, a schematic diagram is displayed for an application program interface, a virtual schematic diagram of a person and an electric vehicle represented by a rider is displayed on a delivery map, a virtual schematic diagram of a rider and an electric vehicle is displayed on the delivery map in a floating window manner, and "the rider is delivering goods" is 485m and 10 minutes away from a merchant ", and" the rider body temperature is 36.7 ℃ and "is displayed on the delivery map, and fig. 6 is only an exemplary illustration, and the delivery can be successful after 10 minutes, namely 10 minutes of the rider, and the delivery time can be continuously decreased.
In one possible implementation, the prediction time may be evaluated by Mean Absolute Error (MAE), 2min accuracy, or 5min accuracy, where the 2min accuracy represents a ratio of the number of orders to the total number of orders within plus or minus 2min of a space (gap) between a predicted value and a true value of the time prediction model; the 5min accuracy represents the ratio of the order quantity to the total order quantity within plus or minus 5min of the interval (gap) between the predicted value and the true value of the time prediction model.
In the embodiment of the present invention, fig. 7 is a schematic diagram of the result of the second embodiment of the present invention, taking the order-receiving stage as an example, the vertical axis is distance, the unit is meter, the horizontal axis is time, the unit is minute, and specifically includes the actual distance between the rider and the store, the predicted time value of the rider reaching the store, the sample label of the time of the rider reaching the store in the history data, and the predicted time value of the smoothed rider reaching the store.
Fig. 8 is a diagram of an application scenario of the third embodiment of the present invention, including a user terminal, a server and a capacity terminal, wherein, the number of the user terminal, the server and the capacity terminal can be multiple, the server can also be called as a takeout system, a takeout platform or the like, the user terminal and the capacity terminal can be mobile devices which can be positioned, such as a mobile phone, a tablet personal computer and the like, the server acquires sample data of at least two stages according to historical order data, wherein the historical order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and the duration of the time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data at different stages have the same format; and training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the distance between the sampling time points is switched to the next order state. By the method, the time prediction model is trained, the duration of the time when the distance from the current time is switched to the next order state in the distribution process can be predicted in real time through the time prediction model, and the accuracy of duration prediction is improved.
Fig. 9 is a schematic diagram of a data processing apparatus according to a fourth embodiment of the present invention. As shown in fig. 9, the apparatus of the present embodiment includes a first acquisition unit 91 and a training unit 92.
The first obtaining unit 91 is configured to obtain sample data in at least two stages according to historical order data, where the order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data includes a feature vector and a duration of a time when a distance between the sampling time points is switched to a next order state, the feature vector of each sample data is determined according to order state information of corresponding sampling time, and the feature vectors of the sample data in different stages have the same format; and a training unit 92, configured to train a time prediction model according to the feature data, where an input of the time prediction model is a feature vector of sample data, and an output of the time prediction model is a duration of a time when the sampling time point distance is switched to a next order state.
Furthermore, the dimensions of the feature data corresponding to each stage are the same, and the feature values of some of the feature data of the same dimension corresponding to each stage are null.
Further, the determining that the feature value of part of the feature data of the dimension in the feature data of the same dimension corresponding to each stage is null specifically includes: in the feature data of the same dimension corresponding to each stage, the data value of the feature data corresponding to the stage between the current stage and the current stage is not null, and the feature value of the feature data corresponding to the stage after the current stage is null.
Further, the feature vectors of the sample data of different stages have the same dimension, and at least some data items in the feature vectors of the sample data, which do not match with the stage to which the sample data belongs, are empty.
Further, the feature vectors of the sample data of different stages have the same dimension, and at least some data items in the feature vectors of the sample data, which do not match with the stage to which the sample data belongs, are empty.
Further, the stages comprise at least two of a pick-up stage, an arrival stage, a pick-up stage, and a delivery stage.
Further, the first obtaining unit is specifically configured to: responding to the sample data belonging stage as an order receiving stage, and determining the characteristic vector according to at least one of a traffic line to which the traffic belongs, a current state of the traffic, a distance between the traffic and the shop, a current task volume of the traffic, a time from the current time to the time when the traffic receives the task, an average waiting time when the traffic reaches the shop, and an average time from the time when the traffic receives the task to the time when the traffic reaches the shop;
responding to the fact that the stage to which the sample data belongs is a store-arriving stage, and determining the feature vector according to at least one of a traffic line to which the traffic belongs, the current state of the traffic, the distance between the traffic and a store, the current task amount of the traffic, the time from the current time to the time of receiving the traffic, the average waiting time of the traffic arriving at the store, the average time from the time of receiving the traffic arriving at the store to the time of arriving at the store, the un-taken task amount of the traffic currently arriving at the store, and the proportion of meal taking within a set time after the traffic arrives at the store; and
and responding to the stage that the sample data belongs to is a fetching and sending stage, and determining the characteristic vector according to at least one of a movement line to which the movement belongs, a movement current state, a distance between the movement and a shop, a movement current task amount, a time length from current time to the moment when the movement receives a task, an average waiting time length from the moment when the movement arrives at the shop, an average time length from the moment when the movement receives the task to the moment when the movement arrives at the shop, an un-fetched task amount when the movement currently arrives at the shop, a ratio of fetching within a set time length after the movement arrives at the shop, and whether the distance between the movement current task and a user is the nearest distance among all the movement tasks.
Further, the time prediction model is deep factor model deep fm.
Fig. 10 is a schematic diagram of a data processing apparatus according to a fifth embodiment of the present invention. As shown in fig. 10, the apparatus of the present embodiment includes a second acquisition unit 1001 and a determination unit 1002.
The second obtaining unit 1001 is configured to obtain a real-time feature vector of an order to be predicted, where the order is divided into at least two stages according to different order states, and the real-time feature vector includes current time information; the determining unit 1002 is configured to input a real-time feature vector to a pre-trained time prediction model, and determine a predicted time length of a time when a current time is away from a next order state, where the time prediction model is obtained by training sample data in at least two stages of historical order data, the sample data includes the feature vector and a time length of a time when a sampling time point is away from the next order state, the feature vector of each sample data is determined according to order state information of corresponding sampling time, and the feature vectors of the sample data in different stages have the same format.
Further, the determining unit is further configured to: and performing smoothing operation on the predicted time length to determine the display time length.
Further, the determining unit is specifically configured to: and determining the sum of the predicted time length, the distance time length and the additional time length as the display time length in response to the current time being the first time slice of the current stage of the order to be predicted, wherein the distance time length is a predicted value of the time length when the position of the transport capacity at the current time reaches a key position triggering order state switching, and the additional time length is a preset correction value.
Further, the distance duration is equal to a weighted value of a ratio of the distance between the position of the transport capacity at the current moment and the key position to the average speed of the transport capacity.
Further, the determining unit is specifically further configured to: and responding to the second time slice of the current stage of the order to be predicted at the current moment or the time slices behind the second time slice, and determining the display time length according to the predicted time length, the predicted time length corresponding to the previous time slice and the interval of the time slices.
Fig. 11 is a schematic view of an electronic apparatus according to a sixth embodiment of the present invention. In this embodiment, the electronic device is a server. It should be understood that other electronic devices, such as raspberry pies, are also possible. As shown in fig. 11, the electronic device: at least one processor 1101; and a memory 1102 communicatively coupled to the at least one processor 1101; and a communication component 1103 communicatively connected to the scanning device, the communication component 1103 receiving and sending data under control of the processor 1101; wherein the memory 1102 stores instructions executable by the at least one processor 1101 to perform, by the at least one processor 1101: obtaining sample data of at least two stages according to historical order data, wherein the historical order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and a duration of a time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format; and training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the distance between the sampling time points is switched to the next order state.
Further, the feature vectors of the sample data of different stages have the same dimension, and at least some data items in the feature vectors of the sample data, which do not match with the stage to which the sample data belongs, are empty.
Further, the at least some data items that do not match the phase to which the sample data belongs are specifically: and the phase corresponding to the data item is the data item after the phase of the sample data.
Further, the stages comprise at least two of a pick-up stage, an arrival stage, a pick-up stage, and a delivery stage.
Further, the processor is further configured to perform: responding to the sample data belonging stage as an order receiving stage, and determining the characteristic vector according to at least one of a traffic line to which the traffic belongs, a current state of the traffic, a distance between the traffic and the shop, a current task volume of the traffic, a time from the current time to the time when the traffic receives the task, an average waiting time when the traffic reaches the shop, and an average time from the time when the traffic receives the task to the time when the traffic reaches the shop; responding to the fact that the stage to which the sample data belongs is a store-arriving stage, and determining the feature vector according to at least one of a traffic line to which the traffic belongs, the current state of the traffic, the distance between the traffic and a store, the current task amount of the traffic, the time from the current time to the time of receiving the traffic, the average waiting time of the traffic arriving at the store, the average time from the time of receiving the traffic arriving at the store to the time of arriving at the store, the un-taken task amount of the traffic currently arriving at the store, and the proportion of meal taking within a set time after the traffic arrives at the store; and responding to the stage that the sample data belongs to as a fetching and sending stage, and determining the characteristic vector according to at least one of a movement line to which the movement belongs, the current state of the movement, the distance between the movement and the shop, the current task amount of the movement, the time from the current time to the moment of receiving the movement, the average waiting time of the movement to the shop, the average time from the moment of receiving the movement to the shop, the un-fetched task amount of the movement to the shop, the proportion of fetching within the set time after the movement reaches the shop, and whether the distance between the current task of the movement and the user is the nearest distance among all the movement tasks.
Further, the time prediction model is deep factor model deep fm.
The processor 1101 is further configured to perform: acquiring a real-time feature vector of an order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time feature vector comprises current time information; inputting the real-time characteristic vector into a pre-trained time prediction model, and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the characteristic vector and the duration of the sampling time from the time of switching to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format. .
Further, the processor is further configured to perform: and performing smoothing operation on the predicted time length to determine the display time length.
Further, the processor is specifically configured to perform: and determining the sum of the predicted time length, the distance time length and the additional time length as the display time length in response to the current time being the first time slice of the current stage of the order to be predicted, wherein the distance time length is a predicted value of the time length when the position of the transport capacity at the current time reaches a key position triggering order state switching, and the additional time length is a preset correction value.
Further, the distance duration is equal to a weighted value of a ratio of the distance between the position of the transport capacity at the current moment and the key position to the average speed of the transport capacity.
Further, the processor is specifically further configured to perform: and responding to the second time slice of the current stage of the order to be predicted at the current moment or the time slices behind the second time slice, and determining the display time length according to the predicted time length, the predicted time length corresponding to the previous time slice and the interval of the time slices.
Specifically, the electronic device includes: one or more processors 1101 and a memory 1102, with one processor 1101 being illustrated in fig. 11. The processor 1101 and the memory 1102 may be connected by a bus or other means, such as the bus in fig. 11. Memory 1102, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 1101 executes various functional applications of the device and data processing, i.e., implements the above-described data processing method, by executing nonvolatile software programs, instructions, and modules stored in the memory 1102.
The memory 1102 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory 1102 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 1102 may optionally include memory located remotely from the processor 1101, which may be connected to an external device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 1102, which when executed by the one or more processors 1101, perform the method of data processing in any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
A seventh embodiment of the invention relates to a non-volatile storage medium for storing a computer-readable program for causing a computer to perform some or all of the above-described method embodiments.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
The embodiment of the invention discloses A1 and a data processing method, which comprises the following steps:
obtaining sample data of at least two stages according to historical order data, wherein the historical order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and a duration of a time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format;
and training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the distance between the sampling time points is switched to the next order state.
A2, the method according to A1, wherein the feature vectors of the sample data of different stages have the same dimension, and at least some data items in the feature vectors of the sample data which do not match with the stage to which the sample data belong are empty.
A3, the method as in a2, wherein the at least some data items that do not match the phase to which the sample data belongs are:
and the phase corresponding to the data item is the data item after the phase of the sample data.
A4, the method of A1, the phases comprising at least two of a pick-up phase, an arrival phase, a pick-up phase, and a delivery phase.
A5, the method of a4, determining the feature vector by:
responding to the sample data belonging stage as an order receiving stage, and determining the characteristic vector according to at least one of a traffic line to which the traffic belongs, a current state of the traffic, a distance between the traffic and the shop, a current task volume of the traffic, a time from the current time to the time when the traffic receives the task, an average waiting time when the traffic reaches the shop, and an average time from the time when the traffic receives the task to the time when the traffic reaches the shop;
responding to the fact that the stage to which the sample data belongs is a store-arriving stage, and determining the feature vector according to at least one of a traffic line to which the traffic belongs, the current state of the traffic, the distance between the traffic and a store, the current task amount of the traffic, the time from the current time to the time of receiving the traffic, the average waiting time of the traffic arriving at the store, the average time from the time of receiving the traffic arriving at the store to the time of arriving at the store, the un-taken task amount of the traffic currently arriving at the store, and the proportion of meal taking within a set time after the traffic arrives at the store; and
and responding to the stage that the sample data belongs to is a fetching and sending stage, and determining the characteristic vector according to at least one of a movement line to which the movement belongs, a movement current state, a distance between the movement and a shop, a movement current task amount, a time length from current time to the moment when the movement receives a task, an average waiting time length from the moment when the movement arrives at the shop, an average time length from the moment when the movement receives the task to the moment when the movement arrives at the shop, an un-fetched task amount when the movement currently arrives at the shop, a ratio of fetching within a set time length after the movement arrives at the shop, and whether the distance between the movement current task and a user is the nearest distance among all the movement tasks.
A6, the method according to A1, wherein the time prediction model is deep factor model DeepFM.
The embodiment of the invention discloses B1 and a data processing method, which comprises the following steps:
acquiring a real-time feature vector of an order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time feature vector comprises current time information;
inputting the real-time characteristic vector into a pre-trained time prediction model, and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the characteristic vector and the duration of the sampling time from the time of switching to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format.
B2, the method of B1, comprising:
and performing smoothing operation on the predicted time length to determine the display time length.
B3, the method according to B2, wherein the smoothing operation is performed on the predicted time duration to determine the display time duration, specifically includes:
and determining the sum of the predicted time length, the distance time length and the additional time length as the display time length in response to the current time being the first time slice of the current stage of the order to be predicted, wherein the distance time length is a predicted value of the time length when the position of the transport capacity at the current time reaches a key position triggering order state switching, and the additional time length is a preset correction value.
And B4, according to the method B3, the distance duration is equal to the weighted value of the ratio of the distance between the position of the transport capacity at the current moment and the key position to the average speed of the transport capacity.
B5, the method according to B2, wherein the smoothing operation is performed on the predicted time duration to determine the display time duration, specifically includes:
and responding to the second time slice of the current stage of the order to be predicted at the current moment or the time slices behind the second time slice, and determining the display time length according to the predicted time length, the predicted time length corresponding to the previous time slice and the interval of the time slices.
The embodiment of the invention discloses C1 and a data processing device, which comprises:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring sample data of at least two stages according to historical order data, the order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and the duration of the time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format;
and the training unit is used for training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the sampling time point distance is switched to the next order state.
The embodiment of the invention discloses D1 and a data processing device, which comprises:
the second obtaining unit is used for obtaining a real-time characteristic vector of the order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time characteristic vector comprises current time information;
the determining unit is used for inputting the real-time characteristic vector into a pre-trained time prediction model and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the characteristic vector and the duration of the sampling time from the time of switching to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format.
The embodiment of the invention discloses E1, a computer readable storage medium on which computer program instructions are stored, wherein the computer program instructions realize the method according to any one of A1-A6 and B1-B5 when being executed by a processor.
The embodiment of the invention discloses F1, and an electronic device, which comprises a memory and a processor, wherein the memory is used for storing one or more computer program instructions, and the one or more computer program instructions are executed by the processor to realize the following steps:
obtaining sample data of at least two stages according to historical order data, wherein the historical order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and a duration of a time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format;
and training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the distance between the sampling time points is switched to the next order state.
F2, the electronic device according to F1, the feature vectors of the sample data of different stages have the same dimension, and at least some data items in the feature vectors of the sample data which do not match with the stage to which the sample data belong are empty.
F3, in the electronic device according to F2, the at least some data items that do not match the phase to which the sample data belongs are:
and the phase corresponding to the data item is the data item after the phase of the sample data.
F4, the electronic device as F1, the stages including at least two of a pick-up stage, a store stage, a pick-up stage, and a delivery stage.
F5, the electronic device as described in F4, the processor further configured to perform:
responding to the sample data belonging stage as an order receiving stage, and determining the characteristic vector according to at least one of a traffic line to which the traffic belongs, a current state of the traffic, a distance between the traffic and the shop, a current task volume of the traffic, a time from the current time to the time when the traffic receives the task, an average waiting time when the traffic reaches the shop, and an average time from the time when the traffic receives the task to the time when the traffic reaches the shop;
responding to the fact that the stage to which the sample data belongs is a store-arriving stage, and determining the feature vector according to at least one of a traffic line to which the traffic belongs, the current state of the traffic, the distance between the traffic and a store, the current task amount of the traffic, the time from the current time to the time of receiving the traffic, the average waiting time of the traffic arriving at the store, the average time from the time of receiving the traffic arriving at the store to the time of arriving at the store, the un-taken task amount of the traffic currently arriving at the store, and the proportion of meal taking within a set time after the traffic arrives at the store; and
and responding to the stage that the sample data belongs to is a fetching and sending stage, and determining the characteristic vector according to at least one of a movement line to which the movement belongs, a movement current state, a distance between the movement and a shop, a movement current task amount, a time length from current time to the moment when the movement receives a task, an average waiting time length from the moment when the movement arrives at the shop, an average time length from the moment when the movement receives the task to the moment when the movement arrives at the shop, an un-fetched task amount when the movement currently arrives at the shop, a ratio of fetching within a set time length after the movement arrives at the shop, and whether the distance between the movement current task and a user is the nearest distance among all the movement tasks.
F6, the electronic device as described in F1, the time prediction model is deep factor model DeepFM.
The embodiment of the invention discloses G1 electronic equipment, which comprises a memory and a processor, wherein the memory is used for storing one or more computer program instructions, and the one or more computer program instructions are executed by the processor:
acquiring a real-time feature vector of an order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time feature vector comprises current time information;
inputting the real-time characteristic vector into a pre-trained time prediction model, and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the characteristic vector and the duration of the sampling time from the time of switching to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format.
G2, the electronic device of G1, the processor further configured to perform:
and performing smoothing operation on the predicted time length to determine the display time length.
G3, the electronic device of G2, the processor being configured to perform:
and determining the sum of the predicted time length, the distance time length and the additional time length as the display time length in response to the current time being the first time slice of the current stage of the order to be predicted, wherein the distance time length is a predicted value of the time length when the position of the transport capacity at the current time reaches a key position triggering order state switching, and the additional time length is a preset correction value.
G4, the electronic device according to G3, wherein the distance duration is equal to a weighted value of a ratio of a distance between the position of the transport capacity at the current moment and the key position to the average speed of the transport capacity.
G5, the electronic device of G2, the processor further configured to:
and responding to the second time slice of the current stage of the order to be predicted at the current moment or the time slices behind the second time slice, and determining the display time length according to the predicted time length, the predicted time length corresponding to the previous time slice and the interval of the time slices.
Claims (10)
1. A method of data processing, the method comprising:
obtaining sample data of at least two stages according to historical order data, wherein the historical order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and a duration of a time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format;
and training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the distance between the sampling time points is switched to the next order state.
2. The method of claim 1, wherein the feature vectors of sample data of different phases have the same dimensions, and at least some of the data items in the feature vectors of the sample data that do not match the phase to which the sample data belongs are empty.
3. The method of claim 2, wherein said at least some data items that do not match said stage to which said sample data belongs are:
and the phase corresponding to the data item is the data item after the phase of the sample data.
4. The method of claim 1, wherein the phases include at least two of an order taking phase, a store arriving phase, a pick up phase, and a delivery phase.
5. A method of data processing, the method comprising:
acquiring a real-time feature vector of an order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time feature vector comprises current time information;
inputting the real-time characteristic vector into a pre-trained time prediction model, and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the characteristic vector and the duration of the sampling time from the time of switching to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format.
6. An apparatus for data processing, the apparatus comprising:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring sample data of at least two stages according to historical order data, the order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and the duration of the time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format;
and the training unit is used for training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the sampling time point distance is switched to the next order state.
7. An apparatus for data processing, the apparatus comprising:
the second obtaining unit is used for obtaining a real-time characteristic vector of the order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time characteristic vector comprises current time information;
the determining unit is used for inputting the real-time characteristic vector into a pre-trained time prediction model and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the characteristic vector and the duration of the sampling time from the time of switching to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format.
8. A computer-readable storage medium on which computer program instructions are stored, which, when executed by a processor, implement the method of any one of claims 1-5.
9. An electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to perform the steps of:
obtaining sample data of at least two stages according to historical order data, wherein the historical order data is divided into at least two stages according to different order states, the sample data corresponds to different sampling time points, the sample data comprises a characteristic vector and a duration of a time when the distance between the sampling time points is switched to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format;
and training a time prediction model according to the characteristic data, wherein the input of the time prediction model is a characteristic vector of sample data, and the output of the time prediction model is the duration of the time when the distance between the sampling time points is switched to the next order state.
10. An electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executable by the processor to:
acquiring a real-time feature vector of an order to be predicted, wherein the order is divided into at least two stages according to different order states, and the real-time feature vector comprises current time information;
inputting the real-time characteristic vector into a pre-trained time prediction model, and determining the prediction duration of the current time from the time of switching to the next order state, wherein the time prediction model is obtained by training sample data of at least two stages in historical order data, the sample data comprises the characteristic vector and the duration of the sampling time from the time of switching to the next order state, the characteristic vector of each sample data is determined according to the order state information of the corresponding sampling time, and the characteristic vectors of the sample data of different stages have the same format.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011036152.9A CN112183856A (en) | 2020-09-27 | 2020-09-27 | Data processing method and device, readable storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011036152.9A CN112183856A (en) | 2020-09-27 | 2020-09-27 | Data processing method and device, readable storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112183856A true CN112183856A (en) | 2021-01-05 |
Family
ID=73945152
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011036152.9A Pending CN112183856A (en) | 2020-09-27 | 2020-09-27 | Data processing method and device, readable storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112183856A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113159281A (en) * | 2021-03-25 | 2021-07-23 | 拉扎斯网络科技(上海)有限公司 | Data processing method and data processing device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100018862A1 (en) * | 2004-08-03 | 2010-01-28 | Kazunori Okano | Cellomics system |
CN107845016A (en) * | 2017-09-26 | 2018-03-27 | 北京小度信息科技有限公司 | information output method and device |
CN109033966A (en) * | 2018-06-25 | 2018-12-18 | 北京嘀嘀无限科技发展有限公司 | Detour detection model training method and device, and detour detection method and device |
CN110119847A (en) * | 2019-05-14 | 2019-08-13 | 拉扎斯网络科技(上海)有限公司 | Distribution time length prediction method and device, storage medium and electronic equipment |
-
2020
- 2020-09-27 CN CN202011036152.9A patent/CN112183856A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100018862A1 (en) * | 2004-08-03 | 2010-01-28 | Kazunori Okano | Cellomics system |
CN107845016A (en) * | 2017-09-26 | 2018-03-27 | 北京小度信息科技有限公司 | information output method and device |
CN109033966A (en) * | 2018-06-25 | 2018-12-18 | 北京嘀嘀无限科技发展有限公司 | Detour detection model training method and device, and detour detection method and device |
CN110119847A (en) * | 2019-05-14 | 2019-08-13 | 拉扎斯网络科技(上海)有限公司 | Distribution time length prediction method and device, storage medium and electronic equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113159281A (en) * | 2021-03-25 | 2021-07-23 | 拉扎斯网络科技(上海)有限公司 | Data processing method and data processing device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103971170B (en) | The method and apparatus that a kind of change being used for characteristic information is predicted | |
CN109754105A (en) | A kind of prediction technique and terminal, server | |
US10991184B2 (en) | Device enabling coffee preparing apparatus to provide user with ordered coffee and method for operating same | |
US11783288B2 (en) | Systems and methods for rush order fulfillment optimization | |
CA3080753A1 (en) | Network computer system to implement predictive time-based determinations for fulfilling delivery orders | |
CN110861104B (en) | Method, medium, terminal and device for assisting robot in conveying articles | |
CN107871221B (en) | Method and device for acquiring amount of marketable inventory | |
CN107527184A (en) | Order processing method, apparatus, equipment and computer-readable recording medium | |
US11783403B2 (en) | Systems, non-transitory computer readable mediums, and methods for grocery order batching and customer experience | |
CN108021642A (en) | Application program recommends method, apparatus, mobile terminal and storage medium | |
CN110633928A (en) | Commodity inverse matching decision method and device | |
CN110782090A (en) | Data processing method and device, readable storage medium and electronic equipment | |
CN109389471B (en) | Order processing method and device | |
CN107563530A (en) | Removal of home vehicle call request method for pushing and system based on fence | |
CN112183856A (en) | Data processing method and device, readable storage medium and electronic equipment | |
CN110378529A (en) | Data generation method and device, readable storage medium and electronic equipment | |
CN108154328A (en) | Time prompting method, apparatus, electronic equipment and computer readable storage medium | |
CN111523955A (en) | Order processing method and device, electronic equipment and nonvolatile storage medium | |
CN109639787B (en) | Position state acquisition method and device, readable storage medium and electronic equipment | |
JP7224436B2 (en) | Information processing device, program and information processing method | |
US20220172240A1 (en) | Information processing device, method, and medium | |
WO2019089827A1 (en) | Computing system to implement network delivery service | |
CN112668949B (en) | Method and device for picking goods | |
CN112686576A (en) | Distribution capacity identification method and device, storage medium and electronic equipment | |
CN114897584A (en) | Network appointment order processing method, device, server and storage medium |
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: 20210105 |