Delivery route generation method, device, equipment and storage medium
The distribution path generation model is encoded and coded based on the environment and waybill feature information, and directly generates a reasonable distribution path, solving the problems of high computational complexity and low efficiency in the existing technology, and achieving more efficient distribution path generation and accurate moments Estimate.
Patent Information
- Application Number
- CN202011387613.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-01
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2040-12-01
AI Technical Summary
The prior art has high computational complexity and low efficiency when generating delivery paths. Especially in takeaway delivery scenarios, multiple candidate paths need to be estimated and time-information correction is performed, resulting in waste of computing resources and reduced efficiency.
The distribution path generation model is used to encode and code the environment, delivery personnel behavior and waybill feature information to directly generate reasonable distribution paths, simplify the calculation process and reduce the calculation complexity.
The calculation efficiency of distribution path generation is improved, the output time information is more accurate, the inadaptability problems caused by manual rule correction are avoided, and various factors affecting the delivery of items are fully considered.
Smart Images

Figure CN114580692B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine learning, and in particular to a delivery path generation method, device, equipment and storage medium. Background Art
[0002] Nowadays, more and more people like to shop online. Accordingly, the items purchased online need to be delivered, which further promotes the development of logistics business. In the process of delivering items, it is necessary to plan the delivery routes reasonably to deliver items from different pick-up locations to different delivery locations.
[0003] Exemplarily, in a food delivery scenario, the delivery system assigns food delivery waybills to delivery personnel and ensures the rationality of the delivery personnel's delivery of each waybill. During this process, the delivery system first estimates the delivery paths of each delivery personnel for new and existing waybills, and selects the delivery personnel for the new waybills based on the above delivery paths of each delivery personnel. Among them, the estimation of the delivery path of each delivery personnel is that the delivery system first generates candidate delivery paths for the delivery of new and existing waybills, and then estimates the time information of key nodes on each candidate delivery path. Then, the candidate delivery paths are scored based on the above estimated time information, driving distance, and delivery time of the waybill, and the candidate delivery path with the highest score is determined as the delivery path of the delivery personnel. Finally, the time information of key nodes on the delivery path needs to be corrected.
[0004] In the above distribution path generation process, operations research methods were used to generate multiple candidate paths. Each path requires time estimation for key nodes, which increases the computational complexity of the entire solution. Summary of the invention
[0005] The embodiment of the present application provides a method, device, equipment and storage medium for generating a delivery path, which calls a delivery path generation model to perform encoding and decoding operations based on the environment, the behavior of the delivery personnel, and the characteristic information of the waybill, and directly generates the delivery path of the delivery personnel for the waybill. Compared with the process of using operations research methods to generate multiple candidate paths, and then estimating the time of the key nodes on each path, and then screening the delivery path and correcting the time information, the calculation process of generating the delivery path is greatly simplified, the calculation complexity of the entire solution is reduced, and the efficiency of the computer device in generating the delivery path is improved. The technical solution is as follows:
[0006] According to one aspect of the present application, a delivery path generation method is provided, which is applied to a computer device, wherein a delivery path generation model is provided in the computer device, and the delivery path generation model includes an encoding module and a decoding module. The method includes:
[0007] Obtain environmental feature information, behavioral feature information of the delivery personnel, and n waybill feature information of n waybills, where the n waybills include newly added waybills and existing waybills of the delivery personnel, and n is a positive integer greater than 1;
[0008] The coding module is called to encode and learn the environmental feature information to obtain the environmental feature coding vector; the coding module is called to encode and learn the behavior feature information to obtain the behavior feature coding vector; the coding module is called to encode and learn the associated features of item extraction and item delivery for n waybill feature information to obtain the waybill feature coding vector;
[0009] The decoding module is called to perform decoding based on the environmental feature coding vector, the behavioral feature coding vector, and the waybill feature coding vector to obtain the time information of the item pick-up and delivery nodes corresponding to each of the n waybills, and based on the time information, output the delivery routes of the delivery personnel for the new waybills and the existing waybills.
[0010] According to another aspect of the present application, a distribution path generation device is provided, in which a distribution path generation model is provided, and the distribution path generation model includes an encoding unit and a decoding unit. The device includes:
[0011] A first acquisition module is used to acquire environmental feature information, behavioral feature information of the delivery personnel, and n waybill feature information of n waybills, where the n waybills include newly added waybills and existing waybills of the delivery personnel, and n is a positive integer greater than 1;
[0012] The first learning module is used to call the encoding unit to encode and learn the environmental feature information to obtain the environmental feature encoding vector; call the encoding unit to encode and learn the behavior feature information to obtain the behavior feature encoding vector; call the encoding unit to encode and learn the associated features of item extraction and item delivery for n waybill feature information to obtain the waybill feature encoding vector;
[0013] The first generation module is used to call the decoding unit to decode based on the environmental feature coding vector, the behavioral feature coding vector, and the waybill feature coding vector to obtain the time information of the item pick-up and delivery nodes corresponding to each of the n waybills, and output the delivery paths of the delivery personnel for the new waybills and the existing waybills based on the time information.
[0014] According to another aspect of the present application, a computer device is provided, comprising: a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the delivery route generation method as described above.
[0015] According to another aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the delivery route generation method as described above.
[0016] According to another aspect of the present application, a computer program product is provided, the computer program product comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the delivery route generation method as described above.
[0017] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0018] In the delivery path generation method provided in the present application, the delivery path generation model is called to perform encoding and decoding operations based on the environment, the behavior of the delivery personnel, and the characteristic information of the waybill, and the time information of the delivery personnel at the pick-up and delivery nodes for the newly added waybill and the existing waybill is estimated, and the delivery path for reasonable delivery of the above-mentioned new waybill and the existing waybill is directly output. Compared with the process of using operations research methods to generate multiple candidate paths, and then estimating the time of the key nodes on each path, and then screening out the delivery path and correcting the time information, this process greatly simplifies the calculation process of generating the delivery path, reduces the calculation complexity of the entire solution, and improves the efficiency of computer equipment in generating delivery paths.
[0019] In the process of generating the delivery path, the method comprehensively considers external environmental factors, personal behavior factors of delivery personnel, and characteristic factors of waybills to estimate the time information of the pick-up and delivery nodes of each waybill, and comprehensively considers various factors affecting the delivery of goods, so that the estimated time information is more accurate. There is no need to use manual rules to correct the time of the pick-up and delivery nodes after the delivery path is determined, thereby avoiding the situation that after correcting one moment in the delivery path, other moments in the delivery path are difficult to fully adapt to the above-mentioned manual rules. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A flow chart of a method for generating a delivery path provided by an exemplary embodiment of the present application is shown;
[0022] Figure 2 A schematic diagram of a feature vector encoding process provided by an exemplary embodiment of the present application is shown;
[0023] Figure 3 A schematic diagram of a feature vector decoding process provided by an exemplary embodiment of the present application is shown;
[0024] Figure 4 A flow chart showing a method for training a delivery path generation model provided by an exemplary embodiment of the present application is shown;
[0025] Figure 5 A block diagram of a delivery path generation device provided by an exemplary embodiment of the present application is shown;
[0026] Figure 6 A block diagram of a training device for a delivery path generation model provided by an exemplary embodiment of the present application is shown;
[0027] Figure 7 A schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0029] First, several nouns involved in this application are introduced:
[0030] A waybill is a non-negotiable document issued by the carrier, which proves the contract for the transportation of goods and the fact that the goods have been taken over by the carrier or loaded on a ship, truck or by air, and that the carrier guarantees that the goods will be delivered to the designated consignee. For example, taking takeout as an example, the person who orders food places an order with the merchant in the ordering process; the merchant issues the waybill for the food after receiving the takeout order; the delivery staff accepts the waybill for the food, picks up the food from the merchant and delivers it to the person who ordered the food, thus completing the waybill. The delivery staff is the person who accepts the waybill and transports the goods from the pickup location to the delivery location.
[0031] A computer system is provided to support the operation of the delivery service platform. Each major delivery service platform provides a waybill generation service, that is, a service that generates a waybill for the delivery of items according to customer requirements, and also provides a waybill distribution service, that is, a service that distributes the customer's waybill to the delivery personnel. Exemplarily, each major delivery service platform includes delivery service software and background services. Customers can install and run the delivery service software in the terminal, and request the delivery of items to the background service through the delivery service software. The background service generates a waybill for the item based on the customer's request and distributes the waybill to the delivery personnel.
[0032] Exemplarily, the above-mentioned computer system carries a distribution service platform, and the computer equipment includes a terminal and a server. The above-mentioned distribution service software can be installed and run on the terminal, and the server is used to provide background services for the distribution service software.
[0033] Among them, the terminals in the above-mentioned computer system may include at least one of a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer, a desktop computer, and a notebook computer.
[0034] The server in the computer system may include at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center. Those skilled in the art may know that the number of terminals in the computer system may be more or less. For example, the number of terminals in the computer system may be only one, or may be dozens or hundreds, or more. The embodiment of the present application does not limit the number and device type of terminals in the computer system.
[0035] The above-mentioned distribution service platform continuously receives item distribution commissions, generates waybills for item distribution, and distributes newly added waybills to delivery personnel. In the process of distributing waybills, it is necessary to plan reasonable distribution paths for the existing waybills in the hands of the delivery personnel and the newly distributed waybills, so as to ensure that the above-mentioned distribution paths can complete the distribution of the existing waybills and the newly added waybills according to the customer's distribution requirements. Therefore, the present application provides a distribution path generation method, which can directly and quickly generate reasonable distribution paths corresponding to the existing waybills and the newly added waybills of the delivery personnel. For a detailed description of the distribution path generation method, please refer to the following embodiments.
[0036] Figure 1 This is a flow chart of a method for generating a delivery path provided by an exemplary embodiment of the present application. Taking the method applied to a server of a computer system as an example, the generation process of the delivery path is described. A delivery path generation model is provided in the server, and the delivery path generation model includes an encoding module and a decoding module. The method includes:
[0037] Step 101, obtaining environmental feature information, behavioral feature information of the delivery personnel, and n waybill feature information of n waybills, where the n waybills include newly added waybills and existing waybills of the delivery personnel.
[0038] The server obtains the characteristic information of each waybill in the newly added waybill and the existing waybill of the delivery personnel, and obtains n waybill characteristic information; wherein n is a positive integer greater than 1. The above waybill characteristic information includes the pickup location and delivery location of the item; the above pickup location refers to the location where the delivery personnel pick up the item, and the above delivery location refers to the location where the item needs to be delivered. Optionally, the above waybill characteristic information also includes the delivery time of the item; illustratively, the delivery time can be the latest delivery time promised by the delivery service provider, for example, the restaurant promises to deliver the takeaway to the orderer at 12:00 at the latest, then the above 12:00 is the delivery time last night; the delivery time can also be the delivery time required by the user, for example, the user requires the item to be delivered between 13:00 and 13:30. Among them, the newly added waybill is a waybill that has not been assigned and is planned to be assigned to the delivery personnel, and the existing order is a waybill that has been assigned to the delivery personnel.
[0039] The above-mentioned environmental characteristic information includes weather information and road condition information. The weather information includes weather information of the city where the delivery personnel is located. For example, the weather information may be rainy, snowy, sunny, or foggy. The road condition information includes road condition information in the delivery area where the waybill is located. For example, the road condition information in the delivery area where the waybill is located may be road condition information of the road section from the location of the delivery personnel to the pickup location, and road condition information of the road section from the pickup location to the delivery location. For example, the road condition information may be the traffic volume, traffic congestion, road maintenance, and traffic light conditions of each road section in the above-mentioned delivery area. For example, the server requests the meteorological server to obtain the current weather conditions of the city where the delivery personnel is located, and requests the traffic management server to obtain the road condition information of the current period based on the pickup location and the delivery location of the waybill. The above-mentioned meteorological server is used to provide services related to meteorology, and the above-mentioned traffic management server provides services related to traffic management.
[0040] The above-mentioned behavioral characteristic information of the delivery personnel includes the delivery personnel's delivery on-time rate, delivery speed, and item completeness rate. The above-mentioned delivery on-time rate refers to the proportion of waybills delivered on time by the delivery personnel to all waybills; the above-mentioned delivery speed refers to the speed at which the delivery personnel deliver items. For example, the above-mentioned delivery speed can be the average speed of the delivery personnel delivering waybills in the delivery area where the waybills are located. For example, the distance from the delivery personnel's pickup location to the delivery location is L1, and the items are delivered after T1 hours. Then the delivery speed of the delivery personnel during this delivery process is L1 / T1; the above-mentioned item completeness rate refers to the proportion of waybills for which the delivery personnel deliver the items completely to all waybills. For example, the above-mentioned behavioral characteristic information of the delivery personnel is obtained based on the analysis of the historical delivery data of the delivery personnel and stored in the database corresponding to the server; the server obtains the delivery on-time rate, delivery speed, and item completeness rate from the database. For example, the server periodically updates the behavioral characteristic information of the delivery personnel in the database based on the historical delivery data of the delivery personnel to ensure the accuracy of the behavioral characteristic information of the delivery personnel.
[0041] Step 102: Call the encoding module to encode and learn the environmental feature information to obtain an environmental feature encoding vector.
[0042] After obtaining the environmental feature information, the server calls the delivery route generation model to perform preprocessing of the environmental feature information by normalizing the numerical features to obtain a preprocessed environmental feature vector; and performs encoding learning on the preprocessed environmental feature vector to obtain an environmental feature encoding vector. The server may preprocess the environmental feature information before encoding learning is performed by the encoding module, or it may be performed by the encoding module.
[0043] Exemplarily, the server calls the delivery route generation model to preprocess the environmental feature information by numerical feature standardization using one-hot encoding (one-hot encoding) to obtain a preprocessed environmental feature vector.
[0044] Exemplarily, after obtaining the preprocessed environmental feature vector, the server calls the encoding module to extract low-order feature combinations and high-order feature combinations from the preprocessed environmental feature vector, and finally outputs an environmental feature encoding vector including low-order features and high-order features. For example, there is an environmental feature encoding module based on the DeepFM architecture in the delivery path generation model, where FM is the abbreviation of Factorization Machines. The server calls the environmental feature encoding module to encode the environmental feature vector to obtain an environmental feature encoding vector that retains low-order features and high-order features.
[0045] Step 103: Call the encoding module to encode the behavior feature information to obtain a behavior feature encoding vector.
[0046] After obtaining the behavior feature information of the delivery personnel, the server calls the delivery route generation model to perform preprocessing of the behavior feature information by standardizing the numerical features to obtain a preprocessed behavior feature vector; and performs encoding learning on the preprocessed behavior feature vector to obtain a behavior feature encoding vector. The server may preprocess the behavior feature information before encoding learning is performed by the encoding module, or it may be performed by the encoding module.
[0047] Exemplarily, the server calls the delivery route generation model to preprocess the behavior feature information by numerical feature standardization using one-hot encoding (one-hot encoding) to obtain a preprocessed behavior feature vector.
[0048] Exemplarily, after obtaining the preprocessed behavior feature vector, the server calls the encoding module to extract low-order feature combinations and high-order feature combinations from the preprocessed behavior feature vector, and finally outputs a behavior feature encoding vector including low-order features and high-order features. For example, there is an encoding module for behavior features based on the DeepFM architecture in the delivery path generation model. The server calls the encoding module for the behavior features to encode the behavior feature vector, and obtains a behavior feature encoding vector that retains low-order features and high-order features.
[0049] Step 104, calling the encoding module to perform encoding learning of the associated features of item extraction and item delivery on the n waybill feature information, and obtaining the waybill feature encoding vector.
[0050] After obtaining the waybill feature information of the newly added waybill and the existing waybill of the delivery personnel, the server calls the delivery path generation model to perform preprocessing of the waybill feature information by numerical feature standardization to obtain the preprocessed waybill feature vector; and performs encoding learning on the preprocessed waybill feature vector to obtain the waybill feature encoding vector. The server preprocesses the waybill feature information before encoding learning by the encoding module, or it can be performed by the encoding module.
[0051] Exemplarily, the server calls the delivery path generation model to preprocess the waybill feature information by numerical feature standardization using one-hot encoding (one-hot encoding) to obtain a preprocessed waybill feature vector.
[0052] Exemplarily, after obtaining the preprocessed waybill feature vector, the server calls the encoding module to extract low-order feature combinations and high-order feature combinations from the preprocessed waybill feature vector, and finally outputs a waybill feature encoding vector including low-order features and high-order features. For example, there is an encoding module for waybill features based on the DeepFM architecture in the delivery path generation model. The server calls the encoding module for waybill features to encode the waybill feature vector, and obtains a waybill feature encoding vector that retains low-order features and high-order features.
[0053] Step 105, calling the decoding module to decode based on the environmental feature coding vector, the behavioral feature coding vector, and the waybill feature coding vector, obtains the time information of the item pick-up and delivery nodes corresponding to each of the n waybills, and outputs the delivery routes of the delivery personnel for the new waybills and the existing waybills based on the time information.
[0054] The server calls the delivery path generation model to splice the environmental feature coding vector, the behavioral feature coding vector, and the waybill feature coding vector to obtain the spliced full feature coding vector; calls the decoding module to decode the full feature coding vector, decodes the time information of the item pick-up and delivery nodes corresponding to each waybill, and outputs the delivery paths of the delivery personnel for the new waybill and the existing waybill based on the above time information.
[0055] Exemplarily, the delivery path generation model includes a vector splicing layer. The server can call the vector splicing layer to splice the environmental feature coding vector, the behavioral feature coding vector, and the waybill feature coding vector to obtain a spliced full feature coding vector; the vector splicing layer can be set in the encoding module, or in the decoding module, or outside the encoding module and the decoding module.
[0056] Among them, the above-mentioned item pickup and delivery nodes include item extraction nodes and item delivery nodes. The item extraction node refers to the path node that arrives at the item extraction location, and the item delivery node refers to the node that arrives at the item delivery location. Exemplarily, the item extraction node includes the delivery personnel arriving at the extraction location and not picking up the items, and the delivery personnel arriving at the extraction location and picking up the items. The item delivery node includes the delivery personnel arriving at the delivery location. The server calls the delivery path generation model to directly generate the time information of each of the above-mentioned nodes, arranges the pickup and delivery order of the newly added waybill and the existing orders according to the time sequence based on the above-mentioned time information, and outputs the delivery path of the newly added waybill and the existing waybill. Exemplarily, waybill A and B are arranged in time sequence, and the items of waybill A can be picked up first, and then the items of waybill B can be picked up, and then the items of waybill B can be delivered first, and then the items of waybill A can be delivered.
[0057] In summary, the delivery path generation method provided in this embodiment calls the delivery path generation model to perform encoding and decoding operations based on the environment, delivery personnel behavior, and characteristic information of the waybill, estimates the time information of the delivery personnel for each waybill in the new waybill and the existing waybill at the pick-up and delivery nodes, and directly outputs the delivery path for reasonable delivery of the above-mentioned new waybill and the existing waybill. Compared with the process of using operations research methods to generate multiple candidate paths, then estimating the time of the key nodes on each path, and then screening out the delivery path and correcting the time information, this greatly simplifies the calculation process of generating the delivery path, reduces the calculation complexity of the entire solution, and improves the efficiency of computer equipment in generating delivery paths.
[0058] In the process of generating the delivery path, the method comprehensively considers external environmental factors, personal behavior factors of delivery personnel, and characteristic factors of waybills to estimate the time information of the pick-up and delivery nodes of each waybill, and comprehensively considers various factors affecting the delivery of goods, so that the estimated time information is more accurate. There is no need to use manual rules to correct the time of the pick-up and delivery nodes after the delivery path is determined, thereby avoiding the situation that after correcting one moment in the delivery path, other moments in the delivery path are difficult to fully adapt to the above-mentioned manual rules.
[0059] In some optional embodiments, in order to fully learn the waybill features to accurately estimate the time information of the pick-up and delivery nodes, the distribution path generation model performs targeted learning on the item extraction nodes and the item delivery nodes respectively. That is to say, for the encoding learning of the waybill feature information, the server calls the encoding module to perform encoding learning on the associated features of item extraction and item delivery for the waybill feature information of each waybill, and obtains the item extraction feature vector and item delivery feature vector corresponding to each waybill, then obtains n item extraction feature vectors and item delivery feature vectors corresponding to the newly added waybill and the existing waybill, a total of n waybills; then the encoding module is called to perform feature cross-fusion learning on the n item extraction feature vectors and the n item delivery feature vectors to obtain the waybill feature encoding vector.
[0060] Optionally, in the encoding learning process of the above-mentioned waybill feature information, weights are shared when encoding the waybill feature information, that is, the waybill feature information is encoded with shared parameters to ensure that the encoding vectors of the waybill feature information are the same when the waybill feature information is the same.
[0061] Optionally, the cross fusion of vectors can adopt bilinear interaction pooling (Bi-Interaction pooling) operation, and the encoding module is called to adopt Bi-Interaction pooling operation to perform feature cross fusion learning on the feature vectors extracted from n items and the feature vectors delivered by n items, so as to obtain the waybill feature encoding vector.
[0062] For example, Figure 2 , showing a schematic flow chart of feature information encoding provided by an exemplary embodiment of the present application, including a display of a targeted learning process of the features of the item pickup node and the item delivery node of the waybill. The server first preprocesses the environmental feature information, the behavioral feature information of the delivery personnel, the new waybill and the n waybill feature information of the existing waybill of the delivery personnel, and obtains the environmental feature vector, the behavioral feature vector, and the n waybill feature vectors respectively; calls the encoding module to encode and learn the environmental feature vector to obtain the environmental feature encoding vector E; calls the encoding module to encode and learn the behavioral feature vector to obtain the behavioral feature encoding vector R; calls the encoding module to encode and learn the associated features of item extraction and item delivery for each waybill feature vector, that is, for a waybill feature vector, pays attention to the associated features of item extraction to obtain an item extraction feature vector, pays attention to the associated features of item delivery to obtain an item delivery feature vector, and finally obtains n item extraction feature vectors Bf1, Bf2, ..., Bfn, and n item delivery feature vectors Bd1, Bd2, ..., Bdn; in order to better analyze the relationship between each item pickup and delivery node in the delivery path, the encoding module is called to adopt Bi-Interaction The pooling operation multiplies each element of the vectors Bf1, Bf2, ..., Bfn, and Bd1, Bd2, ..., Bdn and then sums them up to perform feature cross-fusion. It can also ensure that the final generated waybill feature coding vector B maintains a predetermined length and is independent of the waybill position, that is, the waybills are equivalent, changing the order of the waybills does not affect the final coding result, and the same length of coding vectors can be obtained even with different numbers of waybills; then the temporal and spatial correlation of each item delivery node is obtained, such as the spatial distance and the length of the driving time, for example, Figure 2 A waybill feature cross-fusion module 201 is provided in the encoding module, Bf1, Bf2, ..., Bfn, and Bd1, Bd2, ..., Bdn are input into the waybill feature cross-fusion module 201, and the waybill feature cross-fusion module 201 outputs the waybill feature coding vector B.
[0063] Among them, the associated features extracted from the above items include relevant features of the item provider. For example, if the item provider is a restaurant, the associated features extracted from the items are the relevant features of the restaurant, such as the restaurant's food delivery speed; the associated features of item delivery include user-related features.
[0064] It should be noted that this embodiment does not limit the order in which the environmental feature coding vector, the behavioral feature coding vector, and the waybill feature coding vector are generated. After the above three feature coding vectors are generated, the server calls the coding module to use a multi-layer perceptron (MLP) 202 to concatenate the environmental feature coding vector, the behavioral feature coding vector, and the waybill feature coding vector to finally obtain a full feature coding vector C.
[0065] To summarize, the feature vector encoding method provided in this embodiment performs targeted learning on the item extraction node and the item delivery node respectively, so that the feature vector of the item extraction node focuses on the relevant features of the item provider, and the feature vector of the item delivery node focuses on the relevant features of the user, thereby more comprehensively extracting the features of the pick-up and delivery nodes, and then cross-merging the two types of feature vectors, which helps to analyze the relationship between the pick-up and delivery nodes in the delivery path.
[0066] Since the delivery personnel's existing waybill may have m waybill statuses, in some optional embodiments, in order to be able to more accurately estimate the time information at the item pick-up and delivery nodes of each waybill, a corresponding decoder is also set for each waybill status, that is, the decoding module includes m decoders corresponding to the m waybill statuses, m is a positive integer, wherein the waybill status indicates the completion progress of the waybill, for example, the waybill status of takeout includes the status of not arriving at the store, the status of not picking up the food at the store, and the status of picking up the food but not delivering it.
[0067] Correspondingly, the estimation of the time information of the item pick-up and delivery nodes corresponding to each waybill is achieved by calling the distribution path generation model to concatenate the environmental feature coding vector, the behavioral feature coding vector, and the waybill feature coding vector to obtain the full feature coding vector, and then calling the decoding module to input the item extraction feature vector and the item delivery feature vector corresponding to the i-th waybill feature information, as well as the full feature coding vector into the decoder corresponding to the i-th waybill status, and decoding to obtain the time information of the item pick-up and delivery nodes corresponding to the i-th waybill; wherein, the i-th waybill feature information corresponding to the i-th waybill includes the i-th waybill status, and i is a positive integer less than or equal to n.
[0068] For example, Figure 3 , shows a schematic diagram of a process flow of feature information decoding provided by an exemplary embodiment of the present application, Figure 2The item extraction feature vector Bfi and item delivery feature vector Bdi corresponding to the i-th waybill feature information obtained in the above method, as well as the full feature encoding vector C are input into the decoder corresponding to the i-th waybill status, and the decoder outputs the time information of the item pick-up and delivery node corresponding to the i-th waybill. Exemplarily, taking the waybill of takeout as an example, the first waybill is in the state of not arriving at the store, and Bf1, Bd1, and C are output to the waybill decoder 301 of not arriving at the store, and the waybill decoder 301 of not arriving at the store outputs the estimated arrival time ta1 of the delivery person, the pick-up time tf1, and the delivery time td1; the second waybill is in the state of arriving at the store but not picking up the meal, and Bf2, Bd2, and C are output to the waybill decoder 302 of arriving at the store but not picking up the meal, and the waybill decoder 302 of arriving at the store but not picking up the meal outputs the estimated pick-up time tf2 and the delivery time td2 of the delivery person; the nth waybill is in the state of picking up the meal but not delivering it, and Bfn, Bdn, and C are output to the waybill decoder 303 of picking up the meal but not delivering it, and the waybill decoder 303 of picking up the meal but not delivering it outputs the estimated delivery time tdn of the delivery person.
[0069] During the decoding process, the delivery path generation model concatenates the item extraction feature vector Bfi with the item delivery feature vector Bdi and the full feature encoding vector C. The decoder decodes the concatenated vector and estimates the time information on the item pick-up and delivery nodes. In order to ensure the pick-up and delivery order constraints of the path, the estimated time difference is non-negative, and then the time difference is prefixed and summed to obtain the time information. For example, the status of a takeaway waybill is that the meal has not been picked up at the store. During the decoding process, the decoder estimates the time difference between the pick-up time and the current time and the time difference between the delivery time and the pick-up time, and then sums them to obtain the pick-up time and delivery time of the takeaway waybill.
[0070] To sum up, the feature vector decoding method provided in this embodiment sets a decoding module corresponding to the waybill status in the called delivery path generation model, so that the model has stronger expressive ability, thereby more accurately decoding the time information of the waybill at the item pick-up and delivery node under different waybill states.
[0071] In some embodiments, the delivery path generation model is obtained by training the model to be trained. For example, the model to be trained may be a neural network model, such as Figure 4 , is a flow chart of a method for training a distribution path generation model provided by an exemplary embodiment of the present application. Taking the method applied to a server of a computer system as an example, the training process of the distribution path generation model is described, wherein the distribution path generation model is obtained by training a model to be trained, and the model to be trained includes an encoding module and a decoding module. The method includes:
[0072] Step 401, obtain r groups of sample data, the jth group of sample data includes environmental characteristic information samples, behavioral characteristic information samples of the jth delivery personnel, and k waybill characteristic information samples of k waybill samples, the k waybill samples include newly added waybill samples and existing waybill samples of the jth delivery personnel, and each of the k waybill samples carries reference time information of the item pick-up and delivery nodes.
[0073] The environmental characteristic information samples, the behavioral characteristic information samples of the j-th delivery personnel, and the k waybill characteristic information samples of the newly added waybill samples and the existing waybill samples of the j-th delivery personnel in the database are correspondingly stored as r groups of sample data; wherein r, j, k are positive integers, and j is less than r. Exemplarily, the delivery personnel in different groups are the same or different, and the corresponding k waybill characteristic information samples are partially different or completely different. Optionally, the number of waybill characteristic information samples in different groups is the same or different.
[0074] The server obtains r groups of sample data from the database, and each waybill sample in each group of sample data carries the reference time information of the item pickup and delivery nodes. For example, a takeaway waybill sample carries the reference store arrival time, reference meal pickup time, and reference delivery time, or a takeaway waybill sample carries the reference meal pickup time and reference delivery time, or a takeaway waybill sample carries the reference delivery time.
[0075] Step 402: Call the encoding module to perform encoding learning on the environmental feature information sample to obtain a first encoding vector of the sample environmental feature.
[0076] Exemplarily, the server calls the model to be trained to use one-hot encoding to preprocess the environmental feature information by numerical feature standardization to obtain a preprocessed environmental feature vector; the model to be trained contains an encoding module for environmental features based on the DeepFM architecture, and the environmental feature vector is encoded and learned through the encoding module for environmental features to obtain a first encoding vector of the sample environmental features.
[0077] Step 403: Call the encoding module to perform encoding learning on the behavior feature information sample to obtain a second encoding vector of the sample behavior feature.
[0078] Exemplarily, the server calls the model to be trained to use one-hot encoding to preprocess the behavior feature information of the delivery personnel by numerical feature standardization to obtain the preprocessed behavior feature vector; the model to be trained contains a behavior feature encoding module based on the DeepFM architecture, and the behavior feature vector is encoded and learned through the above-mentioned behavior feature encoding module to obtain a second encoding vector of the sample behavior feature.
[0079] Step 404, calling the encoding module to perform encoding learning of the associated features of item extraction and item delivery on the k waybill feature information samples, and obtaining a third encoding vector of the sample waybill features.
[0080] The server calls the encoding module to perform encoding learning of the associated features of item extraction and item delivery for each waybill feature information sample, and obtains the first vector of item extraction features and the second vector of item delivery features corresponding to each waybill sample; the server calls the encoding module to perform feature cross-fusion learning on k first vectors and k second vectors, and obtains a third encoding vector. Exemplarily, the server calls the encoding module to focus on learning the associated features of item extraction for each waybill feature vector, and obtains the first vector of item extraction features. Correspondingly, the server focuses on learning the associated features of item delivery for each waybill feature vector, and obtains the second vector of item delivery features.
[0081] Optionally, the learning of the first vector and the second vector can be achieved by using a coding module based on the DeepFM architecture, that is, the above-mentioned coding module is provided in the module to be trained, and the above-mentioned coding module is called to perform coding learning of the associated features of item extraction and item delivery for each waybill feature information sample, so as to obtain the first vector and the second vector corresponding to each waybill.
[0082] Optionally, the cross fusion of vectors may adopt Bi-Interaction pooling operation, and the server calls the encoding module to adopt Bi-Interaction pooling operation to perform feature cross fusion learning on k first vectors and k second vectors to obtain a third encoding vector.
[0083] Exemplarily, before encoding the waybill feature information, the server first calls the model to be trained to use one-hot encoding to preprocess the waybill feature information by numerical feature standardization to obtain a preprocessed waybill feature vector; then, the first vector and the second vector are learned based on the waybill feature vector.
[0084] It should also be noted that the server may use a coding module to pre-process the feature information. For example, the server calls the coding module to pre-process the feature information in a one-hot coding manner.
[0085] Step 405, calling the decoding module to perform decoding based on the first coding vector, the second coding vector, and the third coding vector to obtain the estimated time information of the item pick-up and delivery nodes corresponding to each waybill sample.
[0086] The above-mentioned decoding module includes m decoders corresponding to m waybill states one by one, where the waybill state indicates the completion progress of the waybill, and m is a positive integer; the g-th waybill feature information sample corresponding to the g-th waybill sample includes the g-th waybill state, and g is a positive integer less than or equal to k; the server calls the model to be trained to concatenate the first encoding vector, the second encoding vector, and the third encoding vector to obtain the sample full feature encoding vector; the decoding module is called to input the first vector and the second vector corresponding to the g-th waybill feature information sample, and the sample full feature encoding vector into the decoding module corresponding to the g-th waybill state, and decode to obtain the estimated time information of the item pick-up and delivery node corresponding to the g-th waybill sample.
[0087] For example, the estimated time information of the item pick-up and delivery nodes corresponding to the takeaway waybill sample may include the estimated arrival time at the store, the estimated pickup time, and the estimated delivery time, or the estimated pickup time and the estimated delivery time, or the estimated delivery time.
[0088] Step 406, based on the time estimation loss between the reference time information and the estimated time information, the to-be-trained model is propagated and trained, and after training with r groups of sample data, a delivery path generation model is finally obtained.
[0089] The estimated time information of the item pickup and delivery nodes includes at least one type of estimated time, for example, the estimated time information of the item pickup and delivery nodes corresponding to the takeaway waybill includes three types: estimated store arrival time, estimated meal pickup time, and estimated delivery time. The server calculates the sub-time estimated loss of each waybill under each type of estimated time information, and then comprehensively calculates the moment estimated loss of each type of estimated time information, for example, calculating the average absolute error loss of k sub-time estimated losses under each type of estimated time information as the moment estimated loss of each type of estimated time information; the final moment estimated loss is calculated based on the moment estimated loss of each type of estimated time information.
[0090] For example, taking the estimated loss calculation corresponding to the takeaway waybill as an example, the server calculates the mean absolute error loss (MAE Loss) L_deliver corresponding to the delivery time, the MAE Loss L_arrive corresponding to the store arrival time, and the MAE Loss L_fetch corresponding to the meal pickup time. The formula is as follows:
[0091]
[0092]
[0093]
[0094] Among them, t deliver is the reference delivery time, tarrive is the reference arrival time, t fetch It is the reference time for picking up meals. is the estimated delivery time. It is the estimated time of arrival at the store. is the estimated meal pickup time; based on the above L_deliver, L_arrive, and L_fetch, the estimated loss L at the time is calculated as follows:
[0095] L=t deliver +α·t arrive +β·t fetch
[0096] Among them, α and β are hyperparameters, and · represents the multiplication sign.
[0097] The server uses the calculated moment estimation loss to perform back propagation training on the model to be trained, adjusts the model parameters in the model to be trained, and obtains the delivery path generation model after r rounds of training on the model to be trained with r groups of sample data. Exemplarily, the server uses the calculated moment estimation loss to perform back propagation training on the encoding module and the decoding module in the model to be trained, and finally obtains the trained delivery path generation model.
[0098] In summary, the training method of the delivery path generation model provided in this embodiment uses sample data including characteristic information of the environment, delivery personnel behavior, and waybills to train the to-be-trained model, and continuously adjusts the model parameters in the model so that the model can estimate the time information of the delivery personnel at the pick-up and delivery nodes for each of the new waybills and the existing waybills based on the characteristic information of the environment, delivery personnel behavior, and waybills, and directly outputs the delivery paths for reasonable delivery of the above-mentioned new waybills and the existing waybills. When used, the final delivery path generation model greatly simplifies the calculation process of generating the delivery path, reduces the calculation complexity of the entire solution, and improves the efficiency of the computer equipment in generating the delivery path, compared with the process of using operations research methods to generate multiple candidate paths, then estimating the time of the key nodes on each path, and then screening out the delivery path and correcting the time information.
[0099] During use, the final distribution path generation model comprehensively considers external environmental factors, personal behavior factors of delivery personnel, and characteristic factors of waybills to estimate the time information of the pick-up and delivery nodes of each waybill. It can comprehensively consider various factors affecting the delivery of goods, making the estimated time information more accurate. There is no need to use manual rules to correct the time of the pick-up and delivery nodes after the distribution path is determined, thereby avoiding the situation where after one moment in the distribution path is corrected, other moments in the distribution path are difficult to fully adapt to the above-mentioned manual rules.
[0100] Figure 5 A block diagram of a distribution path generation device provided by an exemplary embodiment of the present application is shown. The device can be implemented as part or all of a server or terminal through software, hardware, or a combination of both. A distribution path generation model is provided in the device, and the distribution path generation model includes an encoding unit and a decoding unit. The device includes:
[0101] The first acquisition module 510 is used to acquire environmental feature information, behavioral feature information of the delivery personnel, and n waybill feature information of n waybills, where the n waybills include newly added waybills and existing waybills of the delivery personnel, and n is a positive integer greater than 1;
[0102] The first learning module 520 is used to call the encoding unit to encode and learn the environmental feature information to obtain the environmental feature encoding vector; call the encoding unit to encode and learn the behavior feature information to obtain the behavior feature encoding vector; call the encoding unit to encode and learn the associated features of item extraction and item delivery for n waybill feature information to obtain the waybill feature encoding vector;
[0103] The first generation module 530 is used to call the decoding unit to decode based on the environmental feature coding vector, the behavioral feature coding vector, and the waybill feature coding vector to obtain the time information of the item pick-up and delivery nodes corresponding to each waybill, and output the delivery routes of the delivery personnel for the new waybill and the existing waybill based on the time information.
[0104] In some embodiments, the first learning module 520 includes:
[0105] The first encoding submodule 521 is used to call the encoding unit to perform encoding learning of the associated features of item extraction and item delivery on the waybill feature information of each waybill, and obtain the item extraction feature vector and item delivery feature vector corresponding to each waybill;
[0106] The first fusion submodule 522 is used to call the encoding unit to perform feature cross-fusion learning on the n item extraction feature vectors and the n item delivery feature vectors to obtain the waybill feature encoding vector.
[0107] In some embodiments, the first fusion submodule 522 is used to call the encoding unit to use a bilinear pooling operation to perform feature cross-fusion learning on the n item extraction feature vectors and the n item delivery feature vectors to obtain a waybill feature encoding vector.
[0108] In some embodiments, the decoding unit includes m decoders corresponding to m waybill states one by one, the waybill state indicates the completion progress of the waybill, and m is a positive integer; the i-th waybill characteristic information corresponding to the i-th waybill includes the i-th waybill state, and i is a positive integer less than or equal to n;
[0109] The first generating module 530 includes:
[0110] The first concatenation submodule 531 is used to concatenate the environmental feature coding vector, the behavior feature coding vector, and the waybill feature coding vector to obtain a full feature coding vector;
[0111] The first generating submodule 532 is used to call the decoding unit to input the item extraction feature vector and the item delivery feature vector corresponding to the i-th waybill feature information, and the full feature coding vector into the decoding unit corresponding to the i-th waybill status, and decode to obtain the time information of the item pick-up and delivery node corresponding to the i-th waybill.
[0112] To summarize, the delivery path generation device provided in this embodiment calls the delivery path generation model to perform encoding and decoding operations based on the environment, delivery personnel behavior, and characteristic information of the waybill, estimates the time information of the delivery personnel for each waybill in the new waybill and the existing waybill at the pick-up and delivery nodes, and directly outputs the delivery path for reasonable delivery of the above-mentioned new waybill and the existing waybill. Compared with the process of using operations research methods to generate multiple candidate paths, then estimating the time of the key nodes on each path, and then screening out the delivery path and correcting the time information, this greatly simplifies the calculation process of generating the delivery path, reduces the calculation complexity of the entire solution, and improves the efficiency of computer equipment in generating delivery paths.
[0113] In the process of generating the delivery path, the device comprehensively considers external environmental factors, personal behavior factors of the delivery personnel, and characteristic factors of the waybill to estimate the time information of the pick-up and delivery nodes of each waybill, and comprehensively considers various factors affecting the delivery of goods, so that the estimated time information is more accurate. There is no need to use manual rules to correct the time of the pick-up and delivery nodes after the delivery path is determined, thereby avoiding the situation that after correcting one moment in the delivery path, other moments in the delivery path are difficult to fully adapt to the above-mentioned manual rules.
[0114] Figure 6 A block diagram of a training device for a delivery path generation model provided by an exemplary embodiment of the present application is shown. The device can be implemented as part or all of a server or terminal through software, hardware, or a combination of both. The device is provided with a model to be trained, and the model to be trained includes an encoding unit and a decoding unit. The device includes:
[0115] The second acquisition module 540 is used to acquire r groups of sample data, where the jth group of sample data includes an environmental feature information sample, a behavior feature information sample of the jth delivery person, and k waybill feature information samples of k waybill samples, where the k waybill samples include a newly added waybill sample and an existing waybill sample of the jth delivery person, and each waybill sample in the k waybill samples carries reference time information of an item pick-up and delivery node, where r, j, and k are positive integers, and j is less than r;
[0116] The second learning module 550 is used to call the encoding unit to perform encoding learning on the environmental feature information sample to obtain a first encoding vector of the sample environmental feature; call the encoding unit to perform encoding learning on the behavior feature information sample to obtain a second encoding vector of the sample behavior feature; call the encoding unit to perform encoding learning on the associated features of item extraction and item delivery on k waybill feature information samples to obtain a third encoding vector of the sample waybill feature;
[0117] The second generating module 560 is used to call the decoding unit to perform decoding based on the first coding vector, the second coding vector, and the third coding vector to obtain the estimated time information of the item pick-up and delivery nodes corresponding to each waybill sample;
[0118] The training module 570 is used to perform propagation training on the to-be-trained model based on the time estimation loss between the reference time information and the estimated time information, and finally obtain the delivery path generation model after training with r groups of sample data.
[0119] In some embodiments, the second learning module 550 includes:
[0120] The second encoding submodule 551 is used to call the encoding unit to perform encoding learning of the associated features of item extraction and item delivery for each waybill feature information sample, and obtain a first vector of item extraction features and a second vector of item delivery features corresponding to each waybill sample;
[0121] The second fusion submodule 552 is used to call the encoding unit to perform feature cross-fusion learning on the k first vectors and the k second vectors to obtain a third encoding vector.
[0122] In some embodiments, the second fusion submodule 552 is used to call the encoding unit to use a bilinear pooling operation to perform feature cross-fusion learning on the k first vectors and the k second vectors to obtain a third encoding vector.
[0123] In some embodiments, the decoding unit includes m decoders corresponding to m waybill states one by one, the waybill state indicates the completion progress of the waybill, and m is a positive integer; the g-th waybill characteristic information sample corresponding to the g-th waybill sample includes the g-th waybill state, and g is a positive integer less than or equal to k;
[0124] The second generation module 560 includes:
[0125] The second concatenation submodule 561 is used to concatenate the first coding vector, the second coding vector, and the third coding vector to obtain a sample full feature coding vector;
[0126] The second generation submodule 562 is used to call the decoding unit to input the first vector and the second vector corresponding to the g-th waybill characteristic information sample, and the sample full feature coding vector into the decoder corresponding to the g-th waybill status, and decode to obtain the estimated time information of the item pick-up and delivery node corresponding to the g-th waybill sample.
[0127] In summary, the training device for the delivery path generation model provided in the present embodiment uses sample data including characteristic information of the environment, the behavior of the delivery personnel, and the waybill to train the to-be-trained model, and continuously adjusts the model parameters in the model so that the model can estimate the time information of the delivery personnel at the pick-up and delivery nodes for each of the new waybill and the existing waybill based on the characteristic information of the environment, the behavior of the delivery personnel, and the waybill, and directly outputs the delivery path for reasonable delivery of the above-mentioned new waybill and the existing waybill. When used, the final delivery path generation model greatly simplifies the calculation process of generating the delivery path, reduces the calculation complexity of the entire solution, and improves the efficiency of the computer equipment in generating the delivery path, compared with the process of using operations research methods to generate multiple candidate paths, then estimating the time of the key nodes on each path, and then screening out the delivery path and correcting the time information.
[0128] During use, the final distribution path generation model comprehensively considers external environmental factors, personal behavior factors of delivery personnel, and characteristic factors of waybills to estimate the time information of the pick-up and delivery nodes of each waybill. It can comprehensively consider various factors affecting the delivery of goods, making the estimated time information more accurate. There is no need to use manual rules to correct the time of the pick-up and delivery nodes after the distribution path is determined, thereby avoiding the situation where after one moment in the distribution path is corrected, other moments in the distribution path are difficult to fully adapt to the above-mentioned manual rules.
[0129] Figure 7 The schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application is shown. The computer device may be a device for executing the distribution path generation method or the distribution path generation model training method provided by the present application, and the computer device may be a terminal or a server. Specifically:
[0130] The computer device 600 includes a central processing unit (CPU) 601, a system memory 604 including a random access memory (RAM) 602 and a read only memory (ROM) 603, and a system bus 605 connecting the system memory 604 and the central processing unit 601. The computer device 600 also includes a basic input / output system (I / O system) 606 for facilitating information transmission between various components in the computer, and a large-capacity storage device 607 for storing an operating system 613, application programs 614, and other program modules 615.
[0131] The basic input / output system 606 includes a display 608 for displaying information and an input device 609 such as a mouse and a keyboard for user inputting information. The display 608 and the input device 609 are connected to the central processing unit 601 through an input / output controller 610 connected to the system bus 605. The basic input / output system 606 may also include an input / output controller 610 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 610 also provides output to a display screen, a printer, or other types of output devices.
[0132] The mass storage device 607 is connected to the central processing unit 601 through a mass storage controller (not shown) connected to the system bus 605. The mass storage device 607 and its associated computer readable media provide non-volatile storage for the computer device 600. That is, the mass storage device 607 may include a computer readable medium (not shown) such as a hard disk or a compact disc read only memory (CD-ROM) drive.
[0133] Computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash memory or other solid-state storage technologies, CD-ROM, Digital Versatile Disc (DVD) or Solid State Drive (SSD), other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Among them, random access memory may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM). Of course, those skilled in the art will know that computer storage media are not limited to the above. The above-mentioned system memory 604 and large-capacity storage device 607 can be collectively referred to as memory.
[0134] According to various embodiments of the present application, the computer device 600 can also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device 600 can be connected to the network 612 through the network interface unit 611 connected to the system bus 605, or the network interface unit 611 can be used to connect to other types of networks or remote computer systems (not shown).
[0135] The above-mentioned memory also includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.
[0136] In an optional embodiment, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the delivery path generation method as described above, or the training method of the delivery path generation model.
[0137] In an optional embodiment, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set or instruction set is stored in the storage medium, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the delivery path generation method as described above, or the training method of the delivery path generation model.
[0138] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0139] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0140] The present application also provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the delivery path generation method provided by the above-mentioned method embodiments, or the training method of the delivery path generation model.
[0141] The present application also provides a computer program product, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned distribution path generation method or the distribution path generation model training method.
[0142] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0143] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0144] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating a delivery route, characterized in that: Applied in a computer device, the computer device is provided with a distribution path generation model, the distribution path generation model includes an encoding module and a decoding module, and the method includes: Acquire environmental feature information, behavioral feature information of the delivery personnel, and n waybill feature information of n waybills, wherein the n waybills include newly added waybills and existing waybills of the delivery personnel, and n is a positive integer greater than 1; Calling the encoding module to encode and learn the environmental feature information to obtain an environmental feature encoding vector; calling the encoding module to encode and learn the behavior feature information to obtain a behavior feature encoding vector; calling the encoding module to encode and learn the associated features of item extraction and item delivery for the n waybill feature information to obtain a waybill feature encoding vector; Calling the decoding module to perform decoding based on the environmental feature coding vector, the behavior feature coding vector, and the waybill feature coding vector to obtain the time information of the item pick-up and delivery nodes corresponding to each waybill in the n waybills, and outputting the delivery paths of the delivery personnel for the newly added waybill and the existing waybill based on the time information; The calling of the encoding module to perform encoding learning of the associated features of item extraction and item delivery on the n waybill feature information to obtain the waybill feature encoding vector includes: Calling the encoding module to perform encoding learning of the associated features of item extraction and the associated features of item delivery on the waybill feature information of each waybill, respectively, performing encoding learning on the associated features of n item extraction to obtain n item extraction feature vectors, and performing encoding learning on the associated features of n item delivery to obtain n item delivery feature vectors; Calling the encoding module to perform feature cross-fusion learning on the n item extraction feature vectors and the n item delivery feature vectors to obtain the waybill feature encoding vector; Wherein, in the coding learning process of the waybill characteristic information, weight sharing is performed when encoding the waybill characteristic information; The calling of the encoding module to perform feature cross-fusion learning on the n item extraction feature vectors and the n item delivery feature vectors to obtain the waybill feature encoding vector includes: The encoding module is called to adopt a bilinear pooling operation to perform feature cross-fusion learning on the n item extraction feature vectors and the n item delivery feature vectors to obtain the waybill feature encoding vector.
2. The method according to claim 1, characterized in that The decoding module includes m decoders corresponding to m waybill states one by one, the waybill state indicates the completion progress of the waybill, and m is a positive integer; the i-th waybill characteristic information corresponding to the i-th waybill includes the i-th waybill state, and i is a positive integer less than or equal to n; The calling of the decoding module to perform decoding based on the environmental feature coding vector, the behavior feature coding vector, and the waybill feature coding vector to obtain the time information of the item pick-up and delivery node corresponding to each waybill in the n waybills includes: Concatenate the environmental feature coding vector, the behavior feature coding vector, and the waybill feature coding vector to obtain a full feature coding vector; The decoding module is called to input the item extraction feature vector and the item delivery feature vector corresponding to the i-th waybill feature information, and the full feature coding vector into the decoder corresponding to the i-th waybill status, and decode to obtain the time information of the item pick-up and delivery node corresponding to the i-th waybill.
3. The method according to claim 1, characterized in that The delivery path generation model is obtained by training the model to be trained, the model to be trained includes the encoding module and the decoding module, and the training process of the model to be trained is as follows: Obtain r groups of sample data, wherein the j-th group of sample data in the r groups of sample data includes an environmental feature information sample, a behavior feature information sample of the j-th delivery person, and k waybill feature information samples of k waybill samples, wherein the k waybill samples include a newly added waybill sample and an existing waybill sample of the j-th delivery person, and each waybill sample in the k waybill samples carries reference time information of an item pick-up and delivery node, and r, j, and k are positive integers, and j is less than r; Calling the encoding module to perform encoding learning on the environmental feature information sample to obtain a first encoding vector of the sample environmental feature; calling the encoding module to perform encoding learning on the behavior feature information sample to obtain a second encoding vector of the sample behavior feature; calling the encoding module to perform encoding learning on the k waybill feature information samples for the associated features of item extraction and item delivery to obtain a third encoding vector of the sample waybill feature; Calling the decoding module to perform decoding based on the first coding vector, the second coding vector, and the third coding vector to obtain the estimated time information of the item pick-up and delivery nodes corresponding to each waybill sample; The model to be trained is propagated and trained based on the time estimation loss between the reference time information and the estimated time information, and the delivery path generation model is finally obtained after training with the r groups of sample data.
4. The method according to claim 3, characterized in that The calling of the encoding module to perform encoding learning of the associated features of item extraction and item delivery on the k waybill feature information samples to obtain a third encoding vector of the sample waybill features includes: Calling the encoding module to perform encoding learning of the associated features of item extraction and item delivery for each of the waybill feature information samples, respectively, to obtain a first vector of item extraction features and a second vector of item delivery features corresponding to each waybill sample; The encoding module is called to perform feature cross-fusion learning on the k first vectors and the k second vectors to obtain the third encoding vector.
5. The method according to claim 4, characterized in that The calling the encoding module to perform feature cross-fusion learning on the k first vectors and the k second vectors to obtain the third encoding vector includes: The encoding module is called to adopt a bilinear pooling operation to perform feature cross-fusion learning on the k first vectors and the k second vectors to obtain the third encoding vector.
6. The method according to claim 4, characterized in that The decoding module includes m decoders corresponding to m waybill states one by one, the waybill state indicates the completion progress of the waybill, and m is a positive integer; the g-th waybill characteristic information sample corresponding to the g-th waybill sample includes the g-th waybill state, and g is a positive integer less than or equal to k; The calling of the decoding module to perform decoding based on the first coding vector, the second coding vector, and the third coding vector to obtain the estimated time information of the item pick-up and delivery nodes corresponding to each waybill sample includes: Concatenate the first encoding vector, the second encoding vector, and the third encoding vector to obtain a sample full feature encoding vector; The decoding module is called to input the first vector and the second vector corresponding to the g-th waybill feature information sample, and the sample full feature encoding vector into the decoder corresponding to the g-th waybill status, and decode to obtain the estimated time information of the item pick-up and delivery node corresponding to the g-th waybill sample.
7. A computer device, characterized in that: The computer device comprises: a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the delivery route generation method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the delivery route generation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Predicted arrival time determination method and device, electronic equipment and storage medium
CN110543968A
