Logistics route recommendation method, device, computer equipment and storage medium

By using the random forest prediction model and similarity calculation in the logistics line recommendation system, the accuracy problem of logistics line selection is solved and more efficient logistics transportation is achieved.

CN115130944BActive Publication Date: 2025-08-22SF TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110325488.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-26
Publication Date
2025-08-22
Estimated Expiration
2041-03-26

AI Technical Summary

Technical Problem

The existing logistics line recommendation technology cannot quickly respond to complex and changeable business scenarios, resulting in the accuracy of line selection and cannot meet business needs.

Method used

By obtaining the basic information of the waybill of the target logistics waybill, the random forest prediction model is used to determine the target line in the historical candidate line, and combining the similarity calculation of the current candidate line, select the most suitable recommended line.

Benefits of technology

It improves the accuracy of line prediction and the applicable rate of recommended lines, improves logistics efficiency, and avoids inapplicability problems caused by line changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115130944B_ABST
    Figure CN115130944B_ABST
Patent Text Reader

Abstract

The present application provides a logistics route recommendation method, apparatus, computer device, and storage medium. The method comprises: obtaining basic waybill information of a target logistics waybill; based on the basic waybill information, determining a target route from at least one pre-stored historical candidate route; obtaining a current candidate route, wherein the current candidate route includes a first route that matches the target route and / or a second route that does not match the target route; if the current candidate route does not include the first route, calculating the similarity between the second route and the target route; and determining a recommended route corresponding to the target logistics waybill based on the similarity. Using this method to recommend logistics routes for logistics waybills not only solves the problem of routes being changed and rendered inapplicable due to actual business rule adjustments, improves route prediction accuracy, and also increases the applicability and logistics efficiency of recommended routes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and specifically to a logistics route recommendation method, apparatus, computer equipment, and storage medium. Background Art

[0002] With the rapid development of logistics technology, more and more goods are packaged into parcels and flow into logistics channels. Logistics service providers have also customized more and more logistics routes based on current business needs in order to efficiently transport parcels to their destinations. However, as the number of routes continues to grow, the accuracy of route selection has gradually become a prominent issue.

[0003] Based on the widespread application of artificial intelligence (AI) across various technological fields, existing logistics route selection technology typically utilizes machine learning multi-classification models to automatically generate and select the most frequently used route codes for parcel movement. However, this technology still suffers from accuracy issues, meaning it cannot quickly respond to complex and changing business scenarios. Any change in any logistics factor can cause the model's selected routes to mismatch actual business needs, ultimately failing to meet them.

[0004] Therefore, the existing logistics route recommendation technology has the technical problem of low route prediction accuracy. Summary of the Invention

[0005] Based on this, it is necessary to provide a logistics route recommendation method, device, computer equipment and storage medium to address the above technical problems in order to improve the accuracy of route prediction.

[0006] In a first aspect, the present application provides a logistics route recommendation method, the method comprising:

[0007] Obtain the basic information of the target logistics waybill;

[0008] Determining a target route from at least one pre-stored historical candidate route based on the waybill basic information;

[0009] Acquire a current candidate route, where the current candidate route includes a first route that matches the target route and / or a second route that does not match the target route;

[0010] If the current candidate routes do not include the first route, calculating the similarity between the second route and the target route;

[0011] Based on the similarity, a recommended route corresponding to the target logistics waybill is determined.

[0012] In some embodiments of the present application, after obtaining the current candidate route, the method further includes:

[0013] If the current candidate routes include the first route, the first route is determined as the recommended route corresponding to the target logistics waybill.

[0014] In some embodiments of the present application, the basic waybill information includes the waybill product type, the waybill destination, and the waybill arrival time. After obtaining the current candidate route, the method further includes:

[0015] Obtaining basic route information of the current candidate route, the basic route information including applicable product type of the route, applicable destination of the route, and applicable arrival time of the route;

[0016] Based on the product type applicable to the route, the destination applicable to the route, the arrival time applicable to the route, and the waybill product type, the waybill destination, and the waybill arrival time, select current candidate routes whose basic route information matches the basic waybill information as optional routes;

[0017] An optional route that matches the target route is determined as the first route, and an optional route that does not match the target route is determined as the second route.

[0018] In some embodiments of the present application, if the current candidate routes do not include the first route, the step of calculating the similarity between the second route and the target route includes:

[0019] If the current candidate lines do not include the first line, obtaining line coding information of the second line;

[0020] Splitting the line coding information based on a preset line coding rule, and performing vector conversion on the split line coding information to obtain a current line coding vector;

[0021] A target line coding vector of the target line is obtained, and a similarity between the second line and the target line is calculated based on the target line coding vector and the current line coding vector.

[0022] In some embodiments of the present application, the step of obtaining a target line coding vector of the target line and calculating the similarity between the second line and the target line based on the target line coding vector and the current line coding vector includes:

[0023] Obtaining a target line coding vector of the target line based on a distribution representation model of a matrix;

[0024] Based on a preset cosine similarity formula, the target line coding vector and the current line coding vector are calculated to obtain the similarity between the second line and the target line.

[0025] In some embodiments of the present application, the step of determining a recommended route corresponding to the target logistics waybill based on the similarity includes:

[0026] If the similarity is more than one similarity, the more than one similarities are arranged in descending order to obtain a similarity sequence;

[0027] The second routes corresponding to the first N similarities in the similarity sequence are determined as the recommended routes corresponding to the target logistics waybill, where N≥1.

[0028] In some embodiments of the present application, the step of determining a target route from at least one pre-stored historical candidate route based on the waybill basic information includes:

[0029] Performing feature engineering on the basic information of the waybill to obtain basic features of the waybill;

[0030] Based on the trained random forest prediction model, classification prediction is performed on the basic features of the waybill to determine the target route among the at least one historical candidate route.

[0031] In some embodiments of the present application, before performing classification prediction on the basic features of the waybill based on the trained random forest prediction model and determining the target route among the at least one historical candidate route, the method further includes:

[0032] Constructing an initial random forest prediction model, wherein the initial random forest prediction model includes at least one decision tree;

[0033] Obtaining a logistics data set, and dividing the logistics data set into a training set and a test set;

[0034] Performing preliminary training on the initial random forest prediction model using the training set to obtain a preliminary trained random forest prediction model;

[0035] The random forest prediction model after preliminary training is tested and adjusted using the test set to obtain a trained random forest prediction model.

[0036] In a second aspect, the present application provides a logistics route recommendation device, the device comprising:

[0037] Waybill information acquisition module, used to obtain the basic information of the target logistics waybill;

[0038] a target route determining module, configured to determine a target route from at least one pre-stored historical candidate route based on the waybill basic information;

[0039] a candidate route acquisition module, configured to acquire a current candidate route, wherein the current candidate route includes a first route that matches the target route and / or a second route that does not match the target route;

[0040] a similarity calculation module, configured to calculate the similarity between the second route and the target route if the first route is not included in the current candidate routes;

[0041] The recommended route determination module is used to determine the recommended route corresponding to the target logistics waybill based on the similarity.

[0042] In a third aspect, the present application further provides a computer device, comprising:

[0043] one or more processors;

[0044] A memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the logistics route recommendation method.

[0045] In a fourth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the logistics route recommendation method.

[0046] In a fifth aspect, embodiments of the present application provide a computer program product or computer program, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the first aspect.

[0047] The above-mentioned logistics route recommendation method, device, computer equipment and storage medium, after the server obtains the basic information of the target logistics waybill and determines the target route from at least one pre-stored historical candidate route, it also needs to obtain the current candidate route in order to analyze whether the current candidate route includes a first route that matches the target route, and when it is determined that the current candidate route does not include the first route, calculate the similarity between each second route that does not match the target route and the target route, and finally determine the recommended route corresponding to the target logistics waybill based on the similarity. The logistics route recommendation method proposed in this application is different from traditional recommendation technology. It not only analyzes and obtains the target route from the historical candidate routes, but also takes into account the problem that the route is changed and becomes inapplicable due to the adjustment of actual business rules. It further compares and analyzes the target route with the current candidate route updated in real time, selects a more reasonable recommended route for the target logistics waybill, and avoids the target route no longer being applicable to the target logistics waybill due to route changes. While improving the route prediction accuracy, it also improves the applicability and logistics efficiency of the recommended route. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0049] Figure 1 Schematic diagram of a logistics route recommendation method according to an embodiment of the present application;

[0050] Figure 2 Schematic diagram of the flow of the logistics route recommendation method in the embodiment of the present application;

[0051] Figure 3 This is a prediction flow chart of the random forest prediction model in the embodiment of the present application;

[0052] Figure 4 This is a schematic diagram of a specific process of the logistics route recommendation method in an embodiment of the present application;

[0053] Figure 5 This is a schematic diagram of the structure of the logistics route recommendation device in an embodiment of the present application;

[0054] Figure 6 It is a structural diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0056] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the described features. In the description of this application, "plurality" means two or more, unless otherwise specifically defined.

[0057] In the description of this application, it should be understood that the term "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any person skilled in the art to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in this application.

[0058] In the embodiments of this application, the logistics route recommendation method provided herein is executed on a computer device. The processing objects of each computer device exist in the form of data or information. For example, time, for example, is essentially time information. It is understood that any references to origin, destination, time, city, etc. in subsequent embodiments represent corresponding data for processing by the computer device, and the details are not further elaborated here.

[0059] The embodiments of the present application provide a logistics route recommendation method, apparatus, computer equipment, and storage medium, which are described in detail below.

[0060] See Figure 1 , Figure 1This is a scenario diagram of the logistics route recommendation method provided in this application. The logistics route recommendation method can be applied to a logistics route recommendation system, and can also be applied to a logistics route navigation system to display recommended routes, providing support for cargo sorting by logistics staff. The logistics route recommendation system includes a terminal 100 and a server 200. The terminal 100 can be a device that includes both receiving and transmitting hardware, that is, a device with receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Such a device may include: a cellular or other communication device with a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The terminal 100 can specifically be a desktop terminal or a mobile terminal. The terminal 100 can also specifically be one of a mobile phone, a tablet computer, a laptop computer, etc.

[0061] The server 200 may be a standalone server or a server network or server cluster, including but not limited to a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. A cloud server is composed of a large number of computers or network servers based on cloud computing; the network includes but is not limited to a wide area network, a metropolitan area network, or a local area network.

[0062] Those skilled in the art should understand that Figure 1 The application environment shown in the figure is only one application scenario applicable to the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer computer devices as shown in Figure 1 Only one server 200 is shown. It is understood that the system may also include one or more other servers or one or more other terminals, which are not specifically limited here. In addition, the system may also include a memory 300 for storing data, such as logistics data, for example, various data of the logistics platform, such as logistics transportation information of logistics outlets such as transfer stations, specifically, such as waybill information, delivery vehicle information, and logistics outlet information.

[0063] Those skilled in the art should understand that Figure 1 The scenario diagram of the logistics route recommendation system shown is only an example. The logistics route recommendation system and scenario described in the embodiment of the present invention are intended to more clearly illustrate the technical solution of the embodiment of the present invention, and do not constitute a limitation on the technical solution provided by the embodiment of the present invention. Ordinary technicians in this field can know that with the evolution of the logistics route recommendation system and the emergence of new business scenarios, the technical solution provided by the embodiment of the present invention is also applicable to similar technical problems.

[0064] See Figure 2The present application embodiment provides a logistics route recommendation method, which will be mainly applied to the above Figure 1 Taking the server 200 in FIG. 1 as an example, the method includes steps S201 to S205, which are specifically as follows:

[0065] S201, obtaining the basic information of the target logistics waybill.

[0066] Among them, the logistics waybill can refer to a logistics certificate that records the information of the consignee, sender, cargo, etc. of the logistics express. It mainly associates the logistics status of the corresponding express through a string of waybill numbers.

[0067] Among them, the target logistics waybill may refer to the logistics waybill of the goods to be sorted in the logistics transfer yard. The logistics transfer yard is a distribution node in the network, and its basic function is to distribute and transfer express parcels.

[0068] The basic waybill information may include the waybill product type (e.g., "food," "electronic products," etc.) corresponding to the goods to be sorted, the waybill destination (e.g., "Beijing," "Shenzhen," or specifically, "Beijing Site 1," "Beijing Site 2"), and the waybill arrival time (e.g., "January 2, 2021, 00:00"). The "site" referred to in this embodiment generally refers to the logistics transfer site described above, unless otherwise specified.

[0069] Specifically, before assigning the target route for the target logistics waybill, the server 200 first needs to obtain the basic information of the target logistics waybill so as to use the basic information as the basis for analyzing the route assignment. The basic information of the waybill can be obtained in one of the following ways according to actual needs:

[0070] (1) Periodically requesting the terminal 100 to send its pre-stored basic waybill information. The request time can be a fixed time preset according to business needs. At this time, the basic waybill information sent by the terminal 100 can be information manually entered in advance by the logistics staff, or it can be information pre-collected by the logistics staff by scanning the waybill number using a camera installed on the terminal 100, such as the "bar gun" commonly used in the logistics field;

[0071] (2) Waiting for the terminal 100 to send the basic waybill information it has obtained in real time. That is, the basic waybill information sent by the terminal 100 at this time should be the information it has obtained at the current moment. There is no need for the server 200 to send an information acquisition instruction. The terminal 100 will send the information it has obtained to the server 200.

[0072] (3) Periodically request other servers to send basic information about the waybill. The request time can be a fixed time preset according to business needs. The relationship between other servers and server 200 can be a blockchain node relationship in the same blockchain system, or a tree node relationship with a superior-subordinate relationship. Among them, the basic information about the waybill stored in any node server can be requested and obtained by other node servers in the system. After the upper-level server updates the basic information about the waybill, the lower-level server can request to obtain it in real time. After the lower-level server updates the basic information about the waybill, the upper-level server can poll and obtain it periodically.

[0073] S202: Determine a target route from at least one pre-stored historical candidate route based on the waybill basic information.

[0074] Historical candidate routes can refer to transportation routes previously used to complete logistics operations. Because they were used during historical time periods, they can be analyzed as candidate routes to determine whether they are suitable as target routes for executing the target logistics waybill. Transportation route information can consist of address information arranged in a chronological order, such as Beijing-Shanghai-Guangzhou or Beijing Site 1-Shenzhen Site 1.

[0075] Specifically, after server 200 obtains the basic waybill information of the target logistics waybill, it can match the basic waybill information with the pre-stored historical candidate routes one by one, and select the routes in the historical candidate routes that match the basic waybill information as the target routes of the target logistics waybill, so as to utilize the transportation capacity corresponding to the target route (such as aircraft, trucks, etc.) to undertake the transportation task of the target logistics waybill. Among them, the basis for matching the basic waybill information with the historical candidate routes includes but is not limited to: waybill product type, waybill destination, and waybill arrival time (actually refers to the latest arrival time of the waybill). The route screening steps involved in this embodiment will be described in detail below.

[0076] In one embodiment, this step includes: performing feature engineering on the basic information of the waybill to obtain basic features of the waybill; and performing classification prediction on the basic features of the waybill based on the trained random forest prediction model to determine the target route among the at least one historical candidate route.

[0077] Among them, feature engineering is an engineering activity that aims to extract features from raw data to the maximum extent possible for use by algorithms and models. Feature processing is the core part of feature engineering, including data preprocessing, feature selection, dimensionality reduction, etc.

[0078] Specifically, server 200's matching analysis of basic waybill information and historical candidate routes is not a simple consistency analysis, but rather a feature-based analysis. This requires obtaining the features of both the basic waybill information and the historical candidate routes before matching, and then analyzing the differences between these features. In this embodiment, a random forest prediction model is used to match the features of the basic waybill information with those of the historical candidate routes. The feature extraction prior to this analysis utilizes the data preprocessing, feature selection, and dimensionality reduction steps outlined in "feature engineering."

[0079] For example, the basic information of the waybill is cleaned and simplified, special characters are removed, Chinese characters, English letters, and numbers 0-9 are retained, and any traditional Chinese characters that may exist are simplified into simplified Chinese characters. Word segmentation is then performed to convert the segmented basic information of the waybill into a one-hot vector, thereby obtaining the basic features of the waybill required for subsequent matching analysis, including but not limited to features corresponding to "waybill product type," "waybill destination," and "waybill arrival time."

[0080] More specifically, after server 200 obtains the basic features of the waybill information, it uses these features as model inputs to the trained random forest prediction model. This allows the model to select the corresponding target route for the target logistics waybill based on the route screening function learned during previous training. The trained random forest prediction model is trained based on the features of historical logistics waybills and the features of historical candidate routes, and therefore has the ability to predict the corresponding route for subsequent analysis of target logistics waybills.

[0081] For example, if the historical candidate routes include N1, N2, and N3, the basic features of the target logistics waybill are input into the trained random forest prediction model. If the model outputs N2, then N2 will be used as the target route for the target logistics waybill. The model training steps involved in this embodiment are described in detail below.

[0082] In one embodiment, before classifying and predicting the basic features of the waybill based on the trained random forest prediction model and determining the target route among the at least one historical candidate route, the method further includes: constructing an initial random forest prediction model, wherein the initial random forest prediction model includes at least one decision tree; obtaining a logistics data set, and dividing the logistics data set into a training set and a test set; using the training set to perform preliminary training on the initial random forest prediction model to obtain a preliminary trained random forest prediction model; and using the test set to test and adjust the preliminary trained random forest prediction model to obtain a trained random forest prediction model.

[0083] Among them, random forest refers to a classifier that uses multiple trees to train and predict samples. Its model includes at least one decision tree. The decision tree is a basic classifier that generally divides features into two categories. Therefore, the initial random forest prediction model mentioned in this embodiment should include at least one decision tree.

[0084] The logistics data includes but is not limited to the arrival time, product type, destination direction (origin and / or transit point and / or destination) of the logistics waybill and other information.

[0085] Specifically, before the server 200 uses the trained random forest prediction model to predict the route classification of the target logistics waybill, it first needs to build an initial random forest prediction model. The initial random forest prediction model consists of at least one decision tree. The number and classification nature of the decision trees can be initially established based on business needs. Figure 3 As shown, each decision tree in the random forest prediction model is trained with the same or different samples (D1 / D2 / D3) and continuously learns the classification function. For example, the training set is used for preliminary training, and the test set is used for test adjustment. This allows the random forest prediction model to complete the learning of the route classification prediction function required by this application, and ultimately obtain the target decision tree that meets the actual business needs of this application for route prediction.

[0086] For example, Figure 3 The random forest prediction model shown here consists of three independent decision trees, each trained based on a separate sample (D1 / D2 / D3). This allows them to classify and screen historical candidate routes, yielding the corresponding classification prediction results for each decision tree: Decision tree 1 yields "Route Code 1," decision tree 2 yields "Route Code 2," and decision tree 3 yields "Route Code 3." Based on the principle of random forest prediction, after obtaining the prediction results for each decision tree, a vote is performed across all the decision tree results to determine their respective weights. The result with the most votes and the highest weight is then used as the output of the random forest prediction model.

[0087] More specifically, server 200 trains and tests the trained random forest prediction model, and then inputs the basic information of the waybill (basic features of the waybill) processed by feature engineering into the model, so that the model analyzes the basic features of the current waybill and outputs the target route corresponding to the target logistics waybill.

[0088] The "route code" referred to in this embodiment is a unique identifier for each historical candidate route or other route. This identifier can be represented by uppercase and lowercase English letters or numbers. The length of the identifier depends on actual business needs, as does the information used in the identifier. For example, the route code for route 1 is "AB0300," where "A" represents the route's origin, "B" represents the route's destination, and "0300" represents the route's departure time / latest arrival time.

[0089] In this way, by using the logistics information corresponding to each route to perform route coding, a route that matches the basic information of the target logistics waybill can be further selected during the subsequent multi-route screening process, ensuring that the target logistics waybill can be efficiently completed after being assigned to the route. The route screening steps involved in this embodiment will be described in detail below.

[0090] S203: Acquire a current candidate route, where the current candidate route includes a first route that matches the target route and / or a second route that does not match the target route.

[0091] The current candidate route refers to a candidate route that is updated in real time and is at the current moment. Different from the historical candidate routes, the current candidate route is acquired later than the historical candidate routes.

[0092] Specifically, the server 200 obtains the basic information of the target logistics waybill, and based on the basic information of the waybill, selects the target route corresponding to the target logistics waybill from the historical candidate routes. It is then necessary to obtain the current candidate routes and analyze whether there is a route that matches the target route in the current candidate routes to avoid route updates due to business adjustments, which makes the target route selected based on the historical candidate routes no longer applicable.

[0093] For example, after server 200 analyzes and determines the target route from the historical candidate routes, if the target route is directly fed back to terminal 100 for use by logistics personnel, it is inevitable that the current route has been adjusted while the historical candidate routes have not been updated in a timely manner, resulting in the target route being unsuitable for the target logistics waybill. Therefore, the embodiment of the present application proposes that after obtaining the target route, it is necessary to further obtain the current candidate routes and then analyze whether there is a route in the current candidate routes that matches the target route.

[0094] If it exists, it indicates that the target route is available; if it does not exist, it indicates that the route has been updated and it is necessary to re-acquire the required route corresponding to the target logistics waybill from the updated current candidate routes, which is the final recommended route. The route analysis steps involved in this embodiment will be described in detail below.

[0095] In one embodiment, after this step, the method further includes: if the current candidate routes include the first route, determining the first route as a recommended route corresponding to the target logistics waybill.

[0096] Specifically, as described above, if the current candidate routes include a first route that matches the target route, indicating that the target route is available, the first route can be determined as the recommended route. Server 200 then sends this first route back to terminal 100, where it is displayed to logistics personnel, allowing them to sort the target logistics waybill to the "checkpoint" corresponding to the recommended route based on the recommended route. The "checkpoint" mentioned in this embodiment refers to the security checkpoint / entrance / exit within the cargo sorting and transfer yard used to sort cargo and load it into the corresponding "transport capacity."

[0097] In one embodiment, the basic information of the waybill includes the waybill product type, the waybill destination and the waybill arrival time. After this step, it also includes: obtaining the basic route information of the current candidate route, the basic route information includes the applicable product type of the route, the applicable destination of the route and the applicable arrival time of the route; based on the applicable product type of the route, the applicable destination of the route, the applicable arrival time of the route and the waybill product type, the waybill destination and the waybill arrival time, screening out the current candidate route whose basic route information matches the basic information of the waybill as an optional route; determining the optional route that matches the target route as the first route, and determining the optional route that does not match the target route as the second route.

[0098] The significance of the waybill product type, waybill destination, and waybill arrival time has been described above and will not be repeated here.

[0099] Among them, the product types applicable to the route may refer to the product types that can be loaded with the corresponding transportation capacity of the route, such as "cold chain products" or "fragile products".

[0100] The applicable destination of the route may refer to the last address of the waybill to which the route applies. For example, if the route is "Beijing-Shanghai-Guangzhou", the route is only applicable to logistics waybills with the waybill destination being "Guangzhou".

[0101] Among them, the applicable arrival time of the route actually refers to the latest arrival time of the transport capacity corresponding to the route. For example, "January 3, 2021" means that the logistics waybill assigned to this route should meet the conditions that it can be unloaded before this time point and no longer requires transport capacity.

[0102] Specifically, server 200 obtains the basic information of the target logistics waybill and, based on this basic information, selects the target route corresponding to the target logistics waybill from the historical candidate routes. It then analyzes whether there is a route among the currently updated candidate routes that matches the target route. If so, the determined target route can be directly fed back to terminal 100. After the logistics staff obtains the route through terminal 100, they can quickly sort the packages / express shipments corresponding to the target logistics waybill to the checkpoint corresponding to the target route. If not, the target route cannot be used any longer, and further analysis is required to identify a route more suitable for the target logistics waybill from the updated routes.

[0103] More specifically, route analysis is based on factors including, but not limited to, the route's applicable product type, the route's applicable destination, and the route's applicable arrival time. It may also include the route's applicable time period, i.e., the time period during which the route's corresponding capacity is available to handle logistics tasks. This basic route information is then analyzed for consistency with the target logistics waybill's basic information to screen out candidate routes and determine whether the first route is included among the candidate routes. The purpose of screening candidate routes is not only to analyze the target route's effectiveness but also to pre-process the recommended routes. This ensures that routes with similarity to the target route match the target logistics waybill's basic information, thus pre-empting any candidate routes that do not match the target logistics waybill's basic information.

[0104] For example, the current candidate routes include N1, N2 and N3. The applicable product type of N1 is "food", the applicable destination is "Shanghai", and the applicable arrival time is "00:00 on January 5, 2021"; the applicable product type of N2 is "electronic products", the applicable destination is "Shenzhen", and the applicable arrival time is "13:00 on January 11, 2021"; the applicable product type of N3 is "food", the applicable destination is "Shanghai", and the applicable arrival time is "13:00 on January 11, 2021".

[0105] At this time, the waybill product type of the target logistics waybill is "food", the waybill destination is "Shanghai", and the waybill arrival time is "13:00 on January 4, 2021", then it can be determined that routes N1 and N3 are optional routes, and route N2 is a non-optional route.

[0106] In this way, all current candidate routes are labeled, and the server 200 can directly analyze and compare the matching degree of the optional routes with the target route, and then find the optional route with a 100% matching degree as the final recommended route without having to analyze the matching degree of all current candidate routes with the target route, thereby saving computing power and improving route recommendation efficiency.

[0107] S204: If the current candidate routes do not include the first route, calculate the similarity between the second route and the target route.

[0108] Among them, the similarity can be the degree of similarity between the second route and the target route in terms of route characteristics such as product type characteristics, destination characteristics, origin characteristics, arrival time characteristics and / or applicable time characteristics. The value range of the similarity can be expressed as a numerical range, such as 0-1, 0-10, etc., or as a percentage range, such as 0-100%.

[0109] Specifically, if server 200 analyzes and determines that the current candidate routes do not include the first route, it can only select the existing second routes that closely match the target route as the recommended route ultimately required for the target logistics waybill. This analysis can utilize the cosine similarity formula to calculate the similarity between each second route and the target route, and then determine the recommended route based on the similarity value. The similarity calculation steps involved in this embodiment are described in detail below.

[0110] In one embodiment, this step includes: if the current candidate line does not include the first line, obtaining line coding information of the second line; splitting the line coding information based on a preset line coding rule, and performing vector conversion on the split line coding information to obtain a current line coding vector; obtaining a target line coding vector of the target line, and calculating the similarity between the second line and the target line based on the target line coding vector and the current line coding vector.

[0111] Among them, the preset line coding rule refers to the line coding composition described above. For example, the line code of line 1 is "AB0300", where "A" represents the "origin" applicable to the line, "B" represents the "destination" applicable to the line, and "0300" represents the "departure time / latest arrival time" applicable to the line.

[0112] Specifically, before calculating the similarity, server 200 first needs to obtain the line coding information of each second line, namely the "line coding" mentioned above. Then, based on the preset line coding rules, the line coding information of each second line is split into information corresponding to different meanings, which is then converted into a one-hot vector to obtain the current line coding vector corresponding to each second line. For example, the line code "AB0300" will encode "A", "B", and "0300" in the digital dimension, convert it into a feature matrix, and then extract features of other dimensions through context association. Finally, the one-hot vector of the line coding information of the target line is obtained to obtain the target line coding vector. Then, the target line coding vector and the current line coding vector are analyzed to calculate the similarity between the second line and the target line. The similarity calculation steps involved in this embodiment are described in detail below.

[0113] In one embodiment, the step of obtaining a target line coding vector for the target line and calculating the similarity between the second line and the target line based on the target line coding vector and the current line coding vector includes: obtaining the target line coding vector for the target line based on a matrix distribution representation model; and calculating the target line coding vector and the current line coding vector based on a preset cosine similarity formula to obtain the similarity between the second line and the target line.

[0114] Matrix-based distributional representation models, also known as distributional semantic models, typically construct a "word-context" matrix from which word representations can be derived. In this matrix, each row corresponds to a word, each column represents a different context, and each element in the matrix corresponds to the number of co-occurrences of the relevant word and context. Using this model, the semantic similarity between two words can be directly converted into the spatial distance between the two vectors.

[0115] Specifically, the server 200 can first obtain the target line coding vector of the target line based on the matrix distribution representation model, and then use the preset cosine similarity formula to respectively substitute the target line coding vector and the current line coding vector for calculation to obtain the similarity between the second line and the target line.

[0116] Among them, the cosine similarity formula is as follows:

[0117]

[0118] Wherein, A and B are the feature vectors of the second line and the target line respectively, that is, the target line coding vector and the current line coding vector.

[0119] S205: Determine a recommended route corresponding to the target logistics waybill based on the similarity.

[0120] Specifically, after analyzing and obtaining the similarity between each second route and the target route, the server 200 can compare the similarity values ​​and select the second route with the highest similarity as the recommended route corresponding to the target logistics waybill. The steps for determining the recommended route involved in this embodiment will be described in detail below.

[0121] In one embodiment, this step includes: if there is more than one similarity, arranging the more than one similarities in descending order to obtain a similarity sequence; determining the second routes corresponding to the first N similarities in the similarity sequence as the recommended routes corresponding to the target logistics waybill, N≥1.

[0122] Specifically, when there are multiple second routes, there are also multiple similarities obtained based on the analysis of the second routes and the target route. At this time, the similarity values ​​can be arranged in descending order to obtain a similarity sequence with values ​​decreasing from large to small. Then, based on actual business needs, the top N similarities are selected, and the second routes corresponding to the top N similarities are determined as the recommended routes required for the target logistics waybill.

[0123] For example, the second route includes N2, N3, and N4, the target route is N1, the similarity between N1 and N2 is "0.2", the similarity between N1 and N3 is "0.8", and the similarity between N1 and N4 is "0.5". The current business situation only requires one recommended route, so it can be determined that the final recommended route required is the second route "N3".

[0124] The logistics route recommendation method described in the above embodiment not only analyzes and obtains the target route from the historical candidate routes, but also takes into account the problem that the route may become inapplicable due to changes in actual business rules. It further compares and analyzes the target route with the current candidate routes updated in real time, and selects a more reasonable recommended route for the target logistics waybill, avoiding the target route being no longer applicable to the target logistics waybill due to route changes. While improving the route prediction accuracy, it also improves the applicability and logistics efficiency of the recommended routes.

[0125] In order to enable those skilled in the art to fully understand the logistics route recommendation scheme proposed in this application, this application also provides an application scenario, which applies the above-mentioned logistics route recommendation method. Specifically, the application of the logistics route recommendation method in this application scenario will be combined with Figure 4 The following instructions are given:

[0126] like Figure 4 As shown, the logistics route recommendation scheme proposed in this application includes the following steps:

[0127] 1) After the target logistics waybill arrives at the cargo transfer site, extract the basic information of the target logistics waybill, including: waybill arrival time, waybill product type, waybill destination flow (origin site, origin city, destination site and / or destination city), etc., and perform feature engineering processing to obtain the basic features of the waybill;

[0128] 2) Using the trained random forest prediction model, the route prediction is performed based on the basic features of the target logistics waybill, and the model output result "empirical route code N2" is obtained;

[0129] 3) Recall all optional routes that match the product type, destination, and latest arrival time from the route code storage database, and generate a new route candidate set, including route N3, route N4, and route N5;

[0130] 4) Extract the effective features of each optional route to obtain the route coding vector, including destination, product, departure pilot, latest arrival time, etc., perform feature coding and calculate cosine similarity;

[0131] 5) Because there is no route N2 in the route candidate set, only N3, N4, and N5, and the similarity between N5 and N2 is "0.8", the similarity between N4 and N2 is "0.2", and the similarity between N3 and N2 is "0.47", the real-time route prediction result of N5 can be selected. In this case, the recommended route for the target logistics waybill is N5.

[0132] 6) On the contrary, if N2 is included in the route candidate set, N2 can be selected as the recommended route for the target logistics waybill.

[0133] The logistics route recommendation method provided by the above embodiment solves the problem that conventional machine learning models can only provide prediction results based on historical experience. It has been put into practical application in complex and changeable business scenarios and has improved prediction accuracy, thereby reducing the waste of logistics transportation resources and improving logistics efficiency.

[0134] In order to better implement the logistics route recommendation method in the embodiment of the present application, based on the logistics route recommendation method, the embodiment of the present application also provides a logistics route recommendation device, such as Figure 5 As shown, the logistics route recommendation device 500 includes:

[0135] Waybill information acquisition module 510, used to obtain the basic information of the target logistics waybill;

[0136] a target route determining module 520 for determining a target route from at least one pre-stored historical candidate route based on the waybill basic information;

[0137] A candidate route acquisition module 530 is configured to acquire a current candidate route, wherein the current candidate route includes a first route that matches the target route and / or a second route that does not match the target route;

[0138] a similarity calculation module 540, configured to calculate the similarity between the second route and the target route if the current candidate routes do not include the first route;

[0139] The recommended route determination module 550 is used to determine the recommended route corresponding to the target logistics waybill based on the similarity.

[0140] In some embodiments of the present application, the logistics route recommendation device 500 further includes a route determination module, which is configured to determine the first route as a recommended route corresponding to the target logistics waybill when the first route is included in the current candidate routes.

[0141] In some embodiments of the present application, the basic information of the waybill includes the waybill product type, the waybill destination and the waybill arrival time, and the logistics route recommendation device 500 also includes a route screening module for obtaining the basic route information of the current candidate route, the basic route information including the applicable product type of the route, the applicable destination of the route and the applicable arrival time of the route; based on the applicable product type of the route, the applicable destination of the route, the applicable arrival time of the route and the waybill product type, the waybill destination and the waybill arrival time, the current candidate route whose basic route information matches the basic information of the waybill is screened out as an optional route; the optional route that matches the target route is determined as the first route, and the optional route that does not match the target route is determined as the second route.

[0142] In some embodiments of the present application, the similarity calculation module 540 is further configured to obtain line coding information of the second line if the current candidate line does not include the first line; split the line coding information based on a preset line coding rule, and perform vector conversion on the split line coding information to obtain a current line coding vector; obtain a target line coding vector of the target line, and calculate the similarity between the second line and the target line based on the target line coding vector and the current line coding vector.

[0143] In some embodiments of the present application, the similarity calculation module 540 is further used to obtain a target line coding vector of the target line based on a matrix distribution representation model; and calculate the target line coding vector and the current line coding vector based on a preset cosine similarity formula to obtain the similarity between the second line and the target line.

[0144] In some embodiments of the present application, the recommended route determination module 550 is further used to, if there is more than one similarity, arrange the more than one similarities in descending order to obtain a similarity sequence; determine the second routes corresponding to the first N similarities in the similarity sequence as the recommended routes corresponding to the target logistics waybill, N≥1.

[0145] In some embodiments of the present application, the target route determination module 520 is also used to perform feature engineering processing on the basic information of the waybill to obtain basic features of the waybill; based on the trained random forest prediction model, the basic features of the waybill are classified and predicted to determine the target route among the at least one historical candidate route.

[0146] In some embodiments of the present application, the target route determination module 520 is also used to construct an initial random forest prediction model, which includes at least one decision tree; obtain a logistics data set and divide the logistics data set into a training set and a test set; use the training set to perform preliminary training on the initial random forest prediction model to obtain a random forest prediction model after preliminary training; use the test set to test and adjust the random forest prediction model after preliminary training to obtain a trained random forest prediction model.

[0147] In the above embodiment, not only is the target route from the historical candidate routes analyzed and obtained, but the problem of the route being changed and becoming inapplicable due to adjustments to actual business rules is also taken into consideration. The target route is further compared and analyzed with the current candidate routes updated in real time, and a more reasonable recommended route is selected for the target logistics waybill. This avoids the target route being no longer applicable to the target logistics waybill due to route changes. While improving the accuracy of route prediction, it also improves the applicability and logistics efficiency of the recommended routes.

[0148] The specific definitions of the logistics route recommendation device can be found in the definitions of the logistics route recommendation method above and will not be repeated here. Each module in the aforementioned logistics route recommendation device may be implemented in whole or in part via software, hardware, or a combination thereof. Each of these modules may be embedded in or independent of a processor within a computer device in hardware form, or may be stored in a computer device memory in software form, allowing the processor to invoke and execute the corresponding operations of each module.

[0149] In some embodiments of the present application, the logistics route recommendation device 500 can be implemented in the form of a computer program. The computer program can be used in Figure 6 The computer device shown in FIG. 1 is run on the computer device shown in FIG. The memory of the computer device can store various program modules constituting the logistics route recommendation device 500, such as: Figure 5The computer program composed of the program modules 510, 520, 530, 540, and 550 enables the processor to execute the steps of the logistics route recommendation method of each embodiment of the present application described in this specification.

[0150] For example, Figure 6 The computer device shown can be Figure 5 The waybill information acquisition module 510 in the logistics route recommendation device 500 shown executes step S201. The computer device may execute step S202 via the target route determination module 520. The computer device may execute step S203 via the candidate route acquisition module 530. The computer device may execute step S204 via the similarity calculation module 540. The computer device may execute step S205 via the recommended route determination module 550. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is configured to communicate with an external computer device via a network connection. When executed by the processor, the computer program implements a logistics route recommendation method.

[0151] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0152] In some embodiments of the present application, a computer device is provided, comprising one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to cause the processor to execute the steps of the logistics route recommendation method described above. The steps of the logistics route recommendation method herein may be the steps of the logistics route recommendation method described in each of the above embodiments.

[0153] In some embodiments of the present application, a computer-readable storage medium is provided, storing a computer program. The computer program is loaded by a processor, causing the processor to execute the steps of the logistics route recommendation method described above. The steps of the logistics route recommendation method herein may be the steps of the logistics route recommendation method described in each of the above embodiments.

[0154] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0155] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0156] The above is a detailed introduction to a logistics route recommendation method, device, computer equipment and storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A logistics route recommendation method, characterized in that: The method comprises: Obtain the basic information of the target logistics waybill; Based on the basic information of the waybill, determining a target route from at least one pre-stored historical candidate route, wherein the historical candidate route includes a transportation route used to complete historical logistics business; Obtaining current candidate routes, where the current candidate routes include a first route that matches the target route and / or a second route that does not match the target route. The current candidate routes are candidate routes that are updated in real time and are at the current moment. If the current candidate routes do not include the first route, calculating the similarity between the second route and the target route; Based on the similarity, a recommended route corresponding to the target logistics waybill is determined.

2. The logistics route recommendation method according to claim 1, characterized in that: After obtaining the current candidate route, the method further includes: If the current candidate routes include the first route, the first route is determined as the recommended route corresponding to the target logistics waybill.

3. The logistics route recommendation method according to claim 2, characterized in that: The basic waybill information includes the waybill product type, the waybill destination, and the waybill arrival time. After obtaining the current candidate route, the method further includes: Obtaining basic route information of the current candidate route, the basic route information including applicable product type of the route, applicable destination of the route, and applicable arrival time of the route; Based on the product type applicable to the route, the destination applicable to the route, the arrival time applicable to the route, and the waybill product type, the waybill destination, and the waybill arrival time, select current candidate routes whose basic route information matches the basic waybill information as optional routes; An optional route that matches the target route is determined as the first route, and an optional route that does not match the target route is determined as the second route.

4. The logistics route recommendation method according to claim 1 or 3, characterized in that: If the current candidate routes do not include the first route, the step of calculating the similarity between the second route and the target route includes: If the current candidate lines do not include the first line, obtaining line coding information of the second line; Splitting the line coding information based on a preset line coding rule, and performing vector conversion on the split line coding information to obtain a current line coding vector; A target line coding vector of the target line is obtained, and a similarity between the second line and the target line is calculated based on the target line coding vector and the current line coding vector.

5. The logistics route recommendation method according to claim 4, characterized in that: The step of obtaining a target line coding vector of the target line and calculating the similarity between the second line and the target line based on the target line coding vector and the current line coding vector includes: Obtaining a target line coding vector of the target line based on a distribution representation model of a matrix; Based on a preset cosine similarity formula, the target line coding vector and the current line coding vector are calculated to obtain the similarity between the second line and the target line.

6. The logistics route recommendation method according to claim 2, characterized in that: The step of determining a recommended route corresponding to the target logistics waybill based on the similarity includes: If the similarity is more than one similarity, the more than one similarities are arranged in descending order to obtain a similarity sequence; The second routes corresponding to the first N similarities in the similarity sequence are determined as the recommended routes corresponding to the target logistics waybill, where N≥1.

7. The logistics route recommendation method according to claim 2, characterized in that: The step of determining a target route from at least one pre-stored historical candidate route based on the waybill basic information includes: Performing feature engineering on the basic information of the waybill to obtain basic features of the waybill; Based on the trained random forest prediction model, classification prediction is performed on the basic features of the waybill to determine the target route among the at least one historical candidate route.

8. The logistics route recommendation method according to claim 7, characterized in that: Before performing classification prediction on the basic features of the waybill based on the trained random forest prediction model and determining the target route among the at least one historical candidate route, the method further includes: Constructing an initial random forest prediction model, wherein the initial random forest prediction model includes at least one decision tree; Obtaining a logistics data set, and dividing the logistics data set into a training set and a test set; Performing preliminary training on the initial random forest prediction model using the training set to obtain a preliminary trained random forest prediction model; The random forest prediction model after preliminary training is tested and adjusted using the test set to obtain a trained random forest prediction model.

9. A logistics route recommendation device, characterized in that: The device comprises: Waybill information acquisition module, used to obtain the basic information of the target logistics waybill; a target route determination module, configured to determine a target route from at least one pre-stored historical candidate route based on the waybill basic information, wherein the historical candidate route includes a transportation route used to complete historical logistics business; a candidate route acquisition module, configured to acquire current candidate routes, wherein the current candidate routes include a first route that matches the target route and / or a second route that does not match the target route, and the current candidate routes are candidate routes that are updated in real time and are at the current moment; a similarity calculation module, configured to calculate the similarity between the second route and the target route if the first route is not included in the current candidate routes; The recommended route determination module is used to determine the recommended route corresponding to the target logistics waybill based on the similarity.

10. A computer device, characterized in that: The computer device comprises: one or more processors; A memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the logistics route recommendation method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the logistics route recommendation method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Navigation method based on real-time road condition and navigation system based on real-time road condition

    CN105973251A

  • Predicting and utilizing variability of travel times in mapping services

    CN107111794A