Freight route planning method and device, computer equipment and storage medium
By obtaining freight demand information and historical freight line data, extracting and matching line characteristics, and outputting target freight lines with high similarity, the problem of low accuracy in freight line planning in traditional methods is solved, and more efficient cost control and accurate line planning are achieved.
Patent Information
- Application Number
- CN202311650314.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2025-06-06
AI Technical Summary
The traditional freight route planning method has low accuracy, which leads to difficulty in controlling capacity costs, resulting in unnecessary cost losses and resource waste.
By obtaining freight demand information, the initial line characteristics are generated, and based on the predicted freight volume and freight cost data of the historical freight line, the alternative line characteristics are extracted and similarity matched, thereby outputting the target freight line with high similarity to the initial line characteristics.
It improves the accuracy of freight line planning, reduces cost control risks, effectively controls the cost of freight line planning, and improves the accuracy of the ultimate target freight line.
Smart Images

Figure CN120106722A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a freight route planning method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the improvement of logistics specialization, transportation tasks have developed rapidly. For most companies in the freight industry, transportation resources are the foundation of the company's survival; correspondingly, the control of transportation costs is also a top priority for the company. The core of the control of transportation costs is the transportation and planning of transportation routes.
[0003] In traditional technical solutions, freight routes are usually planned and managed based on the freight volume and corresponding cost expenditures of freight routes after determining the existence of freight demand. However, since the freight volume corresponding to freight routes is extremely irregular and is affected by a variety of objective factors, traditional technical solutions only consider the carrying capacity of freight volume in order to control the transportation cost, and deal with freight routes in a one-size-fits-all manner. The treatment method is relatively rigid, and the treatment results are usually counterproductive, resulting in unnecessary cost losses and waste of resources. In summary, the accuracy of freight route planning in traditional technical solutions is low. Summary of the invention
[0004] Based on this, it is necessary to provide a more accurate freight route planning method, device, computer equipment, computer readable storage medium and computer program product to address the above technical problems.
[0005] In a first aspect, the present application provides a method for freight route planning. The method comprises:
[0006] Acquiring freight demand information, and generating initial route characteristics according to the freight demand information;
[0007] According to the freight demand information, a plurality of alternative freight routes are obtained, wherein the receiving place and the dispatching place corresponding to the alternative freight routes are the same as the receiving place and the dispatching place specified in the freight demand information;
[0008] Extracting alternative route features corresponding to the alternative freight routes, wherein the alternative route features are used to characterize freight cost influencing factors corresponding to each alternative freight route;
[0009] The initial route feature is matched with the candidate route feature in similarity, and a target freight route having a similarity with the initial route feature higher than a target similarity threshold is output from the plurality of candidate freight routes.
[0010] In one embodiment, acquiring a plurality of alternative freight routes according to the freight demand information includes:
[0011] According to the freight demand information, a plurality of historical freight routes are obtained, wherein the receiving place and the dispatching place corresponding to the historical freight routes are the same as the receiving place and the dispatching place specified in the freight demand information;
[0012] Obtaining a predicted freight volume of each historical freight route within a target time period, wherein the target time period is used to represent a time period specified in the freight demand information;
[0013] If the predicted freight volume is not less than the target freight volume, the historical freight route is marked as the alternative freight route.
[0014] In one embodiment, the method for generating the predicted freight volume of each historical freight route within the target time period includes:
[0015] Obtain the average daily freight volume data for each historical freight route;
[0016] Extracting the time characteristics of the daily average freight volume data to obtain timestamp characteristic information and time series value characteristic information;
[0017] The timestamp feature information and the time series value feature information are used as sample data, and the average daily freight volume data is used as a sample label, and are input into the prediction model to be trained for training;
[0018] The trained forecasting model is used to generate the forecasted freight volume for each historical freight route within the target time period.
[0019] In one embodiment, the method for extracting the time series value feature information includes:
[0020] Performing time series decomposition on the daily average freight volume data to obtain freight volume change trend information, freight volume change cycle information, and holiday freight volume information;
[0021] The time series value characteristic information is generated according to the time series corresponding to the freight volume change trend information, the freight volume change cycle information, and the holiday freight volume information.
[0022] In one of the embodiments, the prediction model includes a machine learning model and a deep learning model;
[0023] The generating of the predicted freight volume of each historical freight route in the target time period by the trained prediction model includes:
[0024] Predicting the first freight volume of the historical freight route within the target time period by using the trained machine learning model;
[0025] Predicting a second freight volume of the historical freight route within the target time period by using the trained deep learning model;
[0026] The route freight volume corresponding to the historical freight route is generated according to the first freight volume, the second freight volume, and the model prediction errors corresponding to the machine learning model and the deep learning model respectively.
[0027] In one embodiment, extracting the alternative route features corresponding to the alternative freight route includes:
[0028] Acquire historical freight cost data corresponding to the candidate freight routes, and freight cost influencing factors corresponding to the historical freight cost data;
[0029] Discretization is performed according to the freight cost influencing factors to obtain discrete features;
[0030] Based on the correlation coefficient of the degree of association between the discrete characteristics and the historical freight cost data, candidate route characteristics corresponding to a plurality of historical freight routes are screened from the discrete characteristics.
[0031] In one embodiment, the matching the initial route characteristics with the candidate route characteristics by similarity, and outputting a target freight route from the plurality of candidate freight routes whose similarity to the initial route characteristics is higher than a target similarity threshold comprises:
[0032] Performing vectorization processing on the initial line features and the candidate line features respectively;
[0033] generating the similarity according to a vector distance between the initial route feature after vectorization and the candidate route feature after vectorization;
[0034] If the similarity is higher than the target similarity threshold, marking the candidate route feature after vectorization as the target route feature;
[0035] The candidate freight route corresponding to the target route characteristic is marked as the target freight route.
[0036] In one embodiment, the method further comprises:
[0037] Obtaining historical freight cost data of the alternative freight route and current freight energy consumption unit price;
[0038] The historical freight cost data is updated according to the current freight energy consumption unit price to obtain the target freight cost data corresponding to the target freight route.
[0039] In a second aspect, the present application also provides a freight route planning device. The device comprises:
[0040] A demand analysis module, used to obtain freight demand information, and generate an initial freight route and initial route features corresponding to the initial freight route according to the freight demand information;
[0041] A route screening module, used for acquiring a plurality of alternative freight routes according to the freight demand information, wherein the receiving place and the dispatching place corresponding to the alternative freight routes are the same as the receiving place and the dispatching place specified in the freight demand information;
[0042] A feature engineering module, used for extracting alternative route features corresponding to the alternative freight routes, wherein the alternative route features are used for characterizing the freight cost influencing factors corresponding to each alternative freight route;
[0043] The comparison and screening module is used to perform similarity matching between the initial route characteristics and the candidate route characteristics, and output a target freight route from the plurality of candidate freight routes whose similarity with the initial route characteristics is higher than a target similarity threshold.
[0044] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0045] Acquiring freight demand information, and generating initial route characteristics according to the freight demand information;
[0046] According to the freight demand information, a plurality of alternative freight routes are obtained, wherein the receiving place and the dispatching place corresponding to the alternative freight routes are the same as the receiving place and the dispatching place specified in the freight demand information;
[0047] Extracting alternative route features corresponding to the alternative freight routes, wherein the alternative route features are used to characterize freight cost influencing factors corresponding to each alternative freight route;
[0048] The initial route feature is matched with the candidate route feature in similarity, and a target freight route having a similarity with the initial route feature higher than a target similarity threshold is output from the plurality of candidate freight routes.
[0049] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0050] Acquiring freight demand information, and generating initial route characteristics according to the freight demand information;
[0051] According to the freight demand information, a plurality of alternative freight routes are obtained, wherein the receiving place and the dispatching place corresponding to the alternative freight routes are the same as the receiving place and the dispatching place specified in the freight demand information;
[0052] Extracting alternative route features corresponding to the alternative freight routes, wherein the alternative route features are used to characterize freight cost influencing factors corresponding to each alternative freight route;
[0053] The initial route feature is matched with the candidate route feature in similarity, and a target freight route having a similarity with the initial route feature higher than a target similarity threshold is output from the plurality of candidate freight routes.
[0054] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0055] Acquiring freight demand information, and generating initial route characteristics according to the freight demand information;
[0056] According to the freight demand information, a plurality of alternative freight routes are obtained, wherein the receiving place and the dispatching place corresponding to the alternative freight routes are the same as the receiving place and the dispatching place specified in the freight demand information;
[0057] Extracting alternative route features corresponding to the alternative freight routes, wherein the alternative route features are used to characterize freight cost influencing factors corresponding to each alternative freight route;
[0058] The initial route feature is matched with the candidate route feature in similarity, and a target freight route having a similarity with the initial route feature higher than a target similarity threshold is output from the plurality of candidate freight routes.
[0059] The present application provides a method, device, computer equipment, storage medium and computer program product for freight route planning; first, freight demand information is obtained to construct an initial freight route, and the initial route features corresponding to the initial freight route are extracted. Then, based on the freight demand information, multiple alternative freight routes with the same receiving place and shipping place as the freight demand information and available for reference are obtained, and the alternative route features corresponding to the alternative freight routes are formed based on the freight cost influencing factors of each alternative freight route. The method of extracting features for the initial freight route and the historical freight route respectively in the scheme can cover various influencing factors of the route cost to the greatest extent, making the subsequent route comparison and screening process more accurate and reliable. Furthermore, similarity matching is performed based on the initial route features and the alternative route features, and based on the similarity matching results, a target freight route whose similarity with the initial route features is higher than the target similarity threshold is output from multiple alternative freight routes. The scheme reduces the preliminary preparation steps for freight route planning by selecting the freight route with the most similar characteristics from historical freight routes as the final target route, and can effectively control the cost of freight route planning. In addition, the scheme screens the target freight route by matching the initial route characteristics with the alternative route characteristics. Compared with the fixed route disposal method, it can more comprehensively cover the various factors affecting the freight cost, making the final target freight route more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 An application environment diagram of a freight route planning method in one embodiment;
[0061] Figure 2 A schematic diagram of a flow chart of a freight route planning method in one embodiment;
[0062] Figure 3 A schematic diagram of a flow chart of sub-steps for predicting freight volume in one embodiment;
[0063] Figure 4 A freight volume curve chart of a historical freight route in one embodiment;
[0064] Figure 5 This is a schematic diagram of the result after the time series decomposition of the line freight volume in one embodiment;
[0065] Figure 6 A schematic diagram of a freight volume trend of a historical freight route in an embodiment;
[0066] Figure 7 A schematic diagram of periodic seasonal changes in line freight volume of a certain historical freight line in an embodiment;
[0067] Figure 8 A schematic diagram of irregular fluctuations in freight volume on a historical freight route in an embodiment;
[0068] Fig. 9 A schematic diagram of a forecast result of the route freight volume of a certain historical freight route in an embodiment;
[0069] Fig.10 A flowchart of another freight route planning method in implementation is shown;
[0070] Fig.11 It is a schematic diagram of a process of predicting freight volume by using a freight volume prediction model in one embodiment;
[0071] Fig.12 is a structural block diagram of a freight route planning device in one embodiment;
[0072] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0074] In traditional technical solutions, freight routes are usually handled in a one-size-fits-all manner. The handling method is relatively rigid, and the handling results are usually counterproductive, leading to unnecessary cost losses and waste of resources. More specifically, in specific implementation scenarios such as land transportation bidding, due to the low accuracy of route planning in traditional technical solutions, it is difficult to price transportation routes and the failure rate is high, which is not conducive to business progress and cost control. To this end, the technical solution of this application organically combines algorithms and rules, and reduces cost control risks caused by inaccurate route planning through a path planning method that predicts trip prices in advance.
[0075] The freight route planning method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in FIG. 1 , the terminal 102 communicates with the server 104 via a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. Figure 1In the application environment shown, the terminal 102 obtains the corresponding operation instruction through the user interaction interface, and the operation instruction can be a planning instruction for the freight route initiated by clicking the relevant control in the user interaction interface. After the terminal 102 successfully receives the planning instruction, it will trigger the corresponding route planning request and send it to the server 104; the route planning request carries freight demand information, including but not limited to target freight volume, freight time, freight flow information, and transportation cost. In response to the route planning request, the server 104 will screen and optimize and adjust the processing based on the freight history records to form a target planning path that can meet the aforementioned freight demand information; and the target planning path will be fed back to the terminal 102, and visualized in its interactive interface, as a data reference in the subsequent freight route planning creation and bidding process.
[0076] On the server 104 side, after responding to the route planning request initiated by the terminal 102, it is first necessary to parse the freight demand information carried in the route planning request, and form the initial route characteristics according to the key information such as the place of shipment, the place of receipt, and the freight mode in the freight demand information. After obtaining the initial route characteristics, the server 104 needs to call the freight history records in the data storage system and filter out multiple alternative freight information. It should be noted that the freight history records record the place of shipment and the place of receipt of the freight route, and the flow direction of the goods between various cities or outlets can be roughly determined by the place of shipment and the place of receipt. Therefore, the server 104 can compare and filter the route information corresponding to the freight history records based on the place of receipt and the place of shipment specified in the freight demand information, and obtain multiple alternative freight routes with the same flow direction as the freight demand information. In addition, the freight history records also record the cost data spent on operating and maintaining specific historical freight routes, and the freight history records also carry freight cost influencing factors that may affect the cost data. In this application environment, the server 104 will characterize each alternative freight route by constructing feature engineering, that is, by using multiple alternative route features; the server 104 will extract the freight cost influencing factors of each route through feature extraction, and thereby form alternative route features corresponding to each alternative freight route. Furthermore, the server 104 will screen out the route that is most similar or close to the initial route features from many alternative freight routes by matching the initial route features with the alternative route features for similarity, as a reference for the final target freight route. In this application scenario, the route features are used as key factors for matching and refined recommendations, which reduces the loss of bid failure caused by the current solidified one-size-fits-all inquiry model and improves the accuracy of target route planning.
[0077] It should be noted that in this application scenario, the terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. In addition, the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0078] In one embodiment, Figure 2 As shown, a freight route planning method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:
[0079] Step 202, obtain freight demand information, and generate initial route characteristics based on the freight demand information.
[0080] In an embodiment, freight demand information is demand information carried in a route planning request. The route planning request is request information formed based on multiple demand information or constraints such as freight transportation volume, freight transportation time, and freight transportation cost, and the request information is used to trigger the execution steps of freight route planning to form an optimal planned route that can meet the aforementioned multiple demand information. Among them, the freight demand information is used to characterize the conditions that should be met by the target freight route ultimately formed based on the route planning request. The initial route characteristics characterize the various factors that can affect the final cost of the freight route, and these factors are directly determined by the freight demand information carried in the route planning request.
[0081] Specifically in the embodiment, the server in the embodiment decodes and parses the received route planning request and performs natural language processing to extract specific freight demand information from the planning request. The server further needs to perform more detailed demand splitting on the freight demand information to obtain a more detailed and specific demand description; for example, the city flow, bidding month, and mileage interval in the freight demand information are parsed. The demand description formed based on the demand splitting can be used to preliminarily plan and construct the initial freight route; for example, based on the designated receiving place and shipping place information in the freight demand information, the freight flow direction information of the initial route is determined. The contents of various demand descriptions obtained based on the above analysis (including specific demand names and specific attribute values of the demand) are integrated to form the initial route characteristics.
[0082] Step 204, obtaining multiple alternative freight routes according to the freight demand information, wherein the receiving place and the shipping place corresponding to the alternative freight routes are the same as the receiving place and the shipping place specified in the freight demand information.
[0083] In an embodiment, the alternative freight route is the route information that can be the same as the receiving place and the dispatching place specified in the freight demand information, and is formed by screening and sorting from the historical freight records. In an embodiment, the freight history record is used to record the relevant information of each freight transportation task, including but not limited to the dispatching place of the goods, the receiving place of the goods, the transportation route, the transportation model, etc. Further, in the embodiment, each freight route may also include a number of intermediate nodes in the case of including the receiving place and the dispatching place, wherein the intermediate node may refer to the city or logistics outlet passed during the transportation of the goods. For example, historical route A and historical route B are in the same set, and both routes transport goods from city X to city Y; but the difference is that the outlets passed by historical route A include outlets 1, outlets 2 and outlets 3, while the outlets passed by historical route B include outlets 1 and outlets 4. It can be understood that when only the receiving place and the dispatching place are specified, there may be a variety of different freight routes due to different cities or logistics outlets; therefore, in the embodiment, multiple alternative freight routes can be determined based on the receiving place and the dispatching place in the freight demand information.
[0084] Exemplarily, before receiving the route planning request, the server in the embodiment may perform necessary updates and sorting on the freight history records stored in the data storage system (database) of the server. Specifically in the embodiment, the server first integrates all the freight history records that have been recently updated in the database, and performs corresponding data preprocessing on the integrated freight history records, for example, filling the missing values in the records, or removing the records with obvious abnormal values. After completing the integration and preprocessing work, the server will identify and extract each attribute field in the freight history records by natural language processing; based on the results of the identification and extraction, the historical freight routes corresponding to each freight history record are extracted, and the corresponding places of shipment and receiving of each historical freight route are also extracted, and each historical freight route is marked with the place of shipment and the place of receiving. After completing the above-mentioned marking work, after the server receives the route planning request, the route planning request is parsed to obtain the designated place of receipt and place of shipment information. Afterwards, based on the parsed place of receipt and place of shipment information, the server compares and screens the places of shipment and receiving marked by all historical freight routes, thereby obtaining multiple alternative freight routes.
[0085] Step 206 , extracting alternative route features corresponding to the alternative freight routes, where the alternative route features are used to characterize freight cost influencing factors corresponding to each alternative freight route.
[0086] In the embodiment, the alternative route feature is an attribute feature that can make a historical freight route clearly distinguishable from other historical freight routes. Specifically in the embodiment, the ultimate goal is to achieve accurate planning of freight routes to achieve the purpose of reasonable control of freight costs; for this reason, the embodiment adopts factors that may affect freight costs as the alternative route features corresponding to each alternative freight route; for example, the city flow direction of the route, the operation mode of the route (single / round trip / open), and the type of vehicle selected by the transport route, etc., can all affect the transportation cost of the alternative freight route. Therefore, the aforementioned attribute features can also be used as alternative route features of the alternative freight route.
[0087] Exemplarily, after obtaining multiple alternative freight routes, the server in the embodiment needs to perform an initial screening process on each alternative freight route to eliminate some abnormal data or situations that cannot be used as a reference. For example, based on the availability and feasibility of regional resources, it is necessary to eliminate the freight routes corresponding to the historical price data of the affiliated company's routes; based on the stability of suppliers, it is necessary to eliminate the freight routes corresponding to the short-term transaction records; for the case where the route attributes and prices do not match and the data is not referenceable, it is necessary to eliminate the freight routes corresponding to the demand change data; in order to limit cost overflow, it is necessary to eliminate the freight routes corresponding to the data with a single kilometer cost exceeding the threshold. After completing the aforementioned screening process, it is necessary to sort out the freight cost influencing factors corresponding to the alternative freight routes in each set through feature engineering to form the corresponding alternative freight route features. More specifically, in the feature sorting stage, the server can classify the features affecting pricing into two categories of internal factors and external factors based on the business process in the procurement stage and the expert experience judgment of the calibration results. Among them, the internal factors are the internal controllable related influencing factors accompanying the line's own attributes or the bidding and procurement stage (for example, the month of bidding and procurement). By combing the business process of line transportation: demand-bidding-contract-task-settlement-accounting, the One Data methodology is used to build a line historical task data chassis to describe the relevant attributes of a line task throughout its life cycle (for example, demand type, origin, destination, mileage, vehicle model, and operation mode, etc.) and the final settled transportation cost price. This is used as the data source for the construction of the price comparison pool. In addition, changes in the international situation and the external market environment will also have a certain degree of impact on the line bidding and procurement pricing. This type of impact, as an external factor, will be more intuitively reflected in the fluctuations in cargo volume and energy consumption prices (for example, oil prices). Because it is difficult to fully characterize this part of the impact through data, and the data granularity is inconsistent, the embodiment will use a time series cargo volume prediction model and a method of making up the oil price difference after locking the recommended price range to reduce the impact of cargo volume and oil price fluctuations on line prices. In the embodiment, the line characteristics contained in the internal factors and external factors are specifically shown in Table 1:
[0088] Table 1 Line characteristics classification table
[0089]
[0090] Based on the classification and sorting of route features in Table 1, in the embodiment, the server extracts feature attributes and attribute values corresponding to the freight history records corresponding to each candidate freight route based on the fields of each feature in Table 1 to form the features of the candidate routes.
[0091] Step 208 , performing similarity matching between the initial route characteristics and the candidate route characteristics, and outputting a target freight route whose similarity with the initial route characteristics is higher than a target similarity threshold.
[0092] In an embodiment, the similarity matching process is a process of calculating the similarity between the initial route characteristics and the alternative route characteristics, and judging whether the two are matched (same) based on the similarity value. The target similarity threshold is the minimum threshold used to judge whether two routes are similar; for example, the target similarity threshold is 90%, which means that only when the similarity between the initial route characteristics and the alternative route characteristics is higher than 90%, the alternative freight route corresponding to the current alternative route characteristics can be used as the target freight route outputted in the end.
[0093] Specifically in the embodiment, the core idea of the target freight route planning process is to control the cost price of the target freight route, that is, to complete the task of freight transportation with a target freight route with a lower cost price as much as possible; and the way to achieve cost price control in this embodiment is to use the price cost corresponding to the alternative freight route as a reference. Therefore, before matching and screening the routes, it is necessary to build a price comparison pool for reference. Among them, the construction process of the price comparison pool is to convert all the alternative freight routes into a set of feature vectors integrated by each feature factor based on the influence weight according to the influence of different route characteristics on the route cost. Then, the server calculates the similarity between the feature vector of the initial freight route and each feature vector in the price comparison pool, and selects the alternative freight route with the highest similarity to the feature vector of the initial freight route as the target freight route, and uses the historical cost price corresponding to the target freight route as the price reference for the final freight cost.
[0094] Exemplarily, in the embodiment, the target similarity threshold is 90%; when the initial route features are matched with the alternative route features in the price comparison pool, there is only one comparison result with a similarity value higher than 90%. Based on the alternative route features selected when calculating the similarity value, the alternative freight route corresponding to the alternative route feature is used as the final target freight route. For another example, when performing similarity matching in the embodiment, there are multiple comparison results with similarity values higher than 90%. Based on the alternative route features selected when calculating the similarity, multiple alternative freight routes are used as multiple target freight routes to be selected; subsequently, multiple target freight routes are visualized and output for free selection by the user. In another embodiment, when no alternative freight route with a similarity value higher than 90% is obtained through similarity matching, that is, when there is no alternative freight route that meets the conditions, the alternative freight route with the highest similarity value in the similarity matching result is output as the final screening result, and relevant prompt information is output at the same time.
[0095] It should be noted that, in the embodiment, before calculating the similarity between the initial route characteristics and the alternative route characteristics, the initial freight route formed needs to restrict the place of shipment and the place of receipt. The reasons are as follows: First, from the perspective of business needs, the routes under the same freight flow are directly comparable. The contract data of different flows are too different, and it is difficult to find similar route contract data. Second, from the perspective of application efficiency, the amount of data in the same flow direction can meet the data volume of instant calculation. If the range is larger, the amount of data involved in the correlation coefficient calculation will increase sharply, and the calculation efficiency will drop rapidly.
[0096] The above-mentioned freight route planning method first obtains freight demand information to construct an initial freight route, and extracts the initial route features corresponding to the initial freight route. Then, based on the freight demand information, multiple alternative freight routes with the same receiving place and shipping place as the freight demand information and available for reference are obtained, and the alternative route features corresponding to the alternative freight routes are formed based on the freight cost influencing factors of each alternative freight route. The method of extracting features for the initial freight route and the historical freight route respectively in the scheme can cover various influencing factors of the route cost to the greatest extent, making the subsequent route comparison and screening process more accurate and reliable. Further, similarity matching is performed based on the initial route features and the alternative route features, and based on the similarity matching results, the most reasonable target freight route is screened from the alternative route set. The scheme reduces the preparatory process of freight route planning by selecting the freight route with the most similar features from the historical freight routes as the final target route, and can effectively control the cost of freight route planning; and the method of selecting the target freight route by matching the initial route features with the alternative route features can more comprehensively cover various influencing factors on freight costs compared with the solidified route disposal method, so that the accuracy of the target freight route finally formed is higher.
[0097] Since accurately predicting the freight volume of a route can help the operator determine which routes need to be opened, in one embodiment, the method obtains multiple candidate freight routes according to the freight demand information, including:
[0098] Step 1: According to the freight demand information, multiple historical freight routes are obtained, and the receiving place and the shipping place corresponding to the historical freight routes are the same as the receiving place and the shipping place specified in the freight demand information.
[0099] Specifically in the embodiment, after obtaining the freight demand information, the server extracts clear delivery place and shipment place information from the freight demand information through natural language processing, for example, identification of key fields, and further performs preliminary screening of historical freight records stored in the server based on the parsed delivery place and shipment place information, retains historical freight records with the same delivery place and shipment place as the freight demand information, and forms corresponding historical freight routes based on the retained historical freight records.
[0100] Step 2: Obtain the predicted freight volume of each historical freight route within a target time period, where the target time period is used to represent the time period specified in the freight demand information.
[0101] In an embodiment, the predicted freight volume is the result of predicting the freight volume that the historical freight route can carry within a target time period after learning relevant features in the historical freight data of the historical freight route.
[0102] In the embodiment, the predicted freight volume can be outputted in the form of model prediction. Specifically, in the embodiment, the prediction model needs to be trained first, and the server needs to perform preliminary data processing on the historical data of the line freight volume of a specific historical freight line, the business volume forecast data, and the seasonal date data such as the e-commerce festival. The processing process includes abnormal point detection, normalization processing, time series decomposition, and cycle detection. The processed data is sorted to form training data. Based on the time series corresponding to the training data, the date features, lag features (lagfeature), window features, and statistical features of the extended window in the training data are obtained by feature extraction. Further, the various features and freight volume values obtained in the above steps are input as sample labels into the prediction model to be trained, and the prediction model is trained. After completing the training, the embodiment can also perform prediction post-processing such as abnormal detection and missing filling on the prediction model. Afterwards, the specified time period is obtained according to the analysis in the freight demand information. For example, the specific bidding month information is input into the prediction model to predict the freight volume of a specific historical freight line within the specified time period.
[0103] Step three: if the predicted freight volume is not less than the target freight volume, an initial freight route is generated according to the shipping place and the receiving place. The target freight volume is used to represent the freight volume specified in the freight demand information.
[0104] Specifically in the embodiment, the freight demand information may also carry the demand for freight volume. The server extracts the specific freight volume demand through natural language processing to form the target freight volume. After obtaining the predicted freight volume of a specific historical freight route and the target freight volume formed by the freight volume demand, the server will compare the predicted freight volume with the target freight volume. If it is determined that the historical freight route can meet the freight volume demand within the specified time period, the historical freight route will be retained as an alternative freight route, which means that the historical freight route has a certain reference value. After screening the historical freight routes, the obtained freight routes can all meet the freight volume demand, reducing the process of modification and adjustment in the later stage, and the route planning is more accurate and efficient.
[0105] like Figure 3 As shown, in one embodiment, the process of obtaining the predicted freight volume of each historical freight route within the target time period in the method may include the following steps:
[0106] Step 302: Obtain the average daily freight volume data of each historical freight route.
[0107] In an embodiment, the daily average freight volume data refers to the freight volume carried by a specific historical freight route in one day. Exemplarily, in the training process of the prediction model, the daily freight volume data of each route for two years is selected as the training data, and the specific data format is shown in Table 2:
[0108] Table 2 Sample data of daily freight volume of routes
[0109] date Line Coding Freight volume (tons) 2021-01-01 77****17 5.3 2021-01-02 77****17 5.7 ....... …… …… 2022-12-31 77****17 6.5
[0110] In addition, in the embodiment, daily business volume forecast data of the entire network can also be collected as a trend aid. The data format only has the date and the predicted overall business volume, for example, special seasonal calendars for the logistics industry such as the 618, Double 11, and Double 12 e-commerce festivals.
[0111] Step 304: extract the time characteristics of the daily average freight volume data to obtain timestamp characteristic information and time series value characteristic information.
[0112] In the embodiment, in the process of freight volume prediction, feature engineering is mainly used to extract two major types of features from the sample data: timestamp features and time series value features. Among them, timestamp features include but are not limited to time features and Boolean features; for example, time features determine the year, month, and week of the timestamp; Boolean features are combined with seasonal calendars to determine whether it is a weekend, a holiday, etc. Time series value features include but are not limited to lag value features, sliding window features, and extended window features; for example, lag value features select freight volume data such as t-1, t-7, and t-30 on the day to be predicted; sliding window features are used to count the average, median, and maximum values of freight volume in the t-7 time period on the day of prediction; extended window features are used to count the average, median, and maximum values of the freight volume time series of the entire route.
[0113] Specifically in the embodiment, before extracting features from the sample data, it is necessary to perform anomaly detection, normalization, time series decomposition, and periodicity detection. For example, in the process of data anomaly detection, business peaks are mainly identified by combining seasonal calendars. Since the peak and stable futures volumes in the logistics industry are very different, for example, Figure 4 The freight volume of a certain historical freight route shown in the figure is particularly low during the Spring Festival, and the freight volume surges during e-commerce festivals such as 618 and Double 11. This is abnormal data. If it is prepared to meet the peak capacity demand, it will cause a lot of resource waste. Therefore, it is necessary to identify extreme values and remove them, or do smoothing. The actual capacity preparation only needs to meet 99% of the stable scenarios, and additional temporary capacity resources are required for peak scenarios. For another example, normalization processing is mainly to unify the dimensions of line freight data and overall business volume data to avoid the overall business volume data from being too affected and unable to reflect the data law of the line itself. For another example, time series Fengjie is mainly used to extract the trend, seasonality, specific e-commerce festivals and holidays of the event sequence corresponding to the daily average freight volume data. For another example, periodic detection performs periodic analysis on multiple time windows such as years, months, and weeks to determine obvious cycle periods as the basis for feature engineering.
[0114] After anomaly detection, normalization, time series decomposition, and periodicity detection, the pre-built feature engineering is further used to extract time series feature information from the processed average daily freight volume data to obtain time series value features such as periodic changes and non-periodic changes. At the same time, timestamp features are extracted from the average daily freight volume data to obtain time series value features such as specific dates and holidays with irregular fluctuations.
[0115] Step 306: Use the timestamp feature information and the time series value feature information as sample data, and use the average daily freight volume data as sample labels, and input them into the prediction model to be trained for training.
[0116] Exemplarily, the timestamp feature information and time series value feature information extracted above are input into the prediction model, and the prediction model adjusts the model parameters through continuous iterative learning to finally obtain a trained prediction model. During the iterative learning process, the prediction model will output the predicted freight volume for a certain day based on the timestamp feature information and the time series value feature information, and compare this predicted freight volume with the average daily freight volume as the sample label to calculate the error value. If the error value does not reach an acceptable range, the model parameters of the prediction model will be optimized and adjusted, and the new predicted freight volume will be recalculated; until the error value does not reach an acceptable range, the iterative learning process of the prediction model is stopped to complete the model training.
[0117] Step 308: Generate the predicted freight volume of each historical freight route within the target time period through the trained prediction model.
[0118] For example, the server of the embodiment performs demand analysis on the freight demand information, and obtains that the (freight line) bidding month specified in the freight demand information is August. This bidding month information is used as the model input of the prediction model, and the freight volume of each day (freight line) in August is output through the calculation of the prediction model. In the embodiment, by predicting the freight volume of each historical freight line within the target time period, the operation side can be assisted in determining which historical freight lines need to continue to be opened and maintained, and timely eliminates lines that cannot meet the freight volume demand, so as to reasonably regulate the freight cost.
[0119] In one embodiment, the method for extracting the time series value feature information further includes the following steps:
[0120] Step 1: Perform time series decomposition on the average daily freight volume data to obtain freight volume change trend information, freight volume change cycle information, and holiday freight volume information.
[0121] Step 2: Generate time series value feature information based on the time series corresponding to the freight volume change trend information, freight volume change cycle information, and holiday freight volume information.
[0122] Specifically, in the embodiment, the prophet model is selected as the prediction model for freight volume prediction. In the process of time series decomposition, the three key elements of the prophet model are referred to: trend, seasonality, and specific e-commerce festivals and holidays. More specifically, Figure 5 As shown in the figure, the trend decomposition process of a historical freight route mainly analyzes the linear, nonlinear, sudden and gradual changes of time series data. For example, the freight volume of the historical route is in a linear and stable growth, or the route has a sudden change in freight volume due to natural disasters. The seasonal decomposition process mainly analyzes the periodic characteristics of the time series, for example, Figure 5 The freight volumes of the historical freight routes shown all show an obvious 7-day cycle. In addition, the decomposition of specific e-commerce festivals and holidays is essentially equivalent to the process of eliminating abnormal data in the aforementioned data process, which will not be repeated here.
[0123] More specifically, the prophet model expression is as follows:
[0124]
[0125] This expression contains three key applicable elements: ① Trend, the trend term factor g(t) of non-periodic changes; ② Seasonal changes, periodic changes, uniformly described as s(t); ③ Irregular fluctuations, uniformly described as holiday effects h(t).
[0126] like Figure 6 As shown, an example of the trend of line freight volume of a historical freight line is shown; in the embodiment, when allocating line capacity objects, the embodiment can find suppliers whose capacity development matches it according to trend factors; prevent the situation where contracts for those line freight volumes are in an upward period, and ultimately the contracts cannot be maintained due to the supplier's inability to keep up with the pace of capacity development.
[0127] like Figure 7 The figure shows an example of the periodic seasonal variation of freight volume on a historical freight route. Periodic seasonal variation refers to the frequency and amplitude of periodic fluctuations within a year. Figure 7 The cyclical seasonal changes in the freight volume reflect the stability of the line's freight volume fluctuations. Similarly, adaptive stable transport capacity is needed to meet the cyclical changes in freight volume and reduce cost losses caused by demand slack or demand surge.
[0128] like Figure 8 As shown, it is an example of the line freight volume of a historical freight route; irregular fluctuations include holiday fluctuations and special event fluctuations. First of all, for holiday fluctuations, in addition to setting important holidays or e-commerce promotion dates, such as: Double Eleven, Double Twelve, 618, Mid-Autumn Festival, National Day, etc. The prophet model also obtains the peak marks of historical freight routes. Although these peak marks are manually input, they represent to a certain extent that the expected workload of the corresponding outlets may reach a peak. Therefore, the frequency of the comprehensive peak mark is combined to input some holiday effect dates to improve the model prediction accuracy. Secondly, for special events in the logistics industry where the freight volume surges, for example, when a natural disaster occurs in a certain area, the freight volume of medical supplies flowing to the area surges. The embodiment needs to depict the level of freight volume surge of a route through the residual sequence to evaluate whether the existing transport capacity can meet the demand, so as to ensure that when facing the peak, it can calmly cope with the demand for the surge in freight volume.
[0129] like Fig. 9 As shown in the figure, it is the prediction result of the prophet model. The embodiment can further combine the definite cargo volume information fed back by the regional survey, adjust the abnormal results of the prediction model and fill in the prediction results to make the prediction results more reliable. After the model prediction results are output, the embodiment additionally measures the marginal contribution of the calculation features to the model output through various attribution methods, completes the root cause explanation of the black box model, and improves the acceptance and explanation of the model on the actual user side.
[0130] In one embodiment, a model fusion method can be used to comprehensively output the prediction results. Specifically, the prediction model used in the embodiment includes a machine learning model and a deep learning model; further, the method generates the predicted freight volume of each historical freight route within the target time period through the trained prediction model, and further includes the following steps:
[0131] Step 1: Use the trained machine learning model to predict the first freight volume of the historical freight route within the target time period.
[0132] Step 2: Use the trained deep learning model to predict the second freight volume of the historical freight route within the target time period.
[0133] Step three, generating the route freight volume corresponding to the historical freight route according to the first freight volume, the second freight volume, and the model prediction errors corresponding to the machine learning model and the deep learning model respectively.
[0134] Specifically in the embodiment, the prediction models are based on traditional machine learning (e.g., LightGBM, XGBoost, and Prophet) and deep learning (e.g., Seq2Seq, DeepAR) modeling, and Bayesian Optimization is also used in the embodiment to accelerate the hyperparameter search process. After modeling, the models are fused according to the mean absolute percentage error (MAPE) of each model prediction, and the prediction results are output comprehensively. After each model is predicted, the model is fused, and the overall prediction results are output to the operation planning side. At the same time, combined with the freight demand information fed back from the regional survey, the abnormal results of the prediction model are adjusted and the post-prediction results are filled in to make the prediction results more reliable.
[0135] In one embodiment, the process of obtaining the alternative route features corresponding to the plurality of historical freight routes in the method may include the following steps:
[0136] Step 1: extract historical freight cost data of each historical freight route and freight cost influencing factors corresponding to the historical freight cost data from freight history records.
[0137] Step 2: Discretize the factors affecting freight costs to obtain discrete features.
[0138] Step three, based on the correlation coefficient between the discrete characteristics and the historical freight cost data, the alternative route characteristics corresponding to multiple historical freight routes are screened from the discrete characteristics.
[0139] In the embodiment, historical freight cost data refers to the cost required to open and maintain a specific historical freight route; specifically in the bidding scenario of freight routes, the historical freight cost data may refer to the bidding price of a specific historical freight route. Similarly, in the bidding scenario, freight cost influencing factors refer to factors that may affect the bidding price of the final route. More specifically, the freight cost influencing factors in the embodiment are the characteristic attributes in Table 1 above. The correlation coefficient of the degree of association in the embodiment is used to characterize the degree of influence of discrete features on historical freight cost data; the larger the correlation coefficient, the greater the influence of the discrete feature on the historical freight cost data, and vice versa.
[0140] Specifically in the embodiment, at the stage of extracting the features of the alternative routes, it is first necessary to perform corresponding natural language processing on the content of the historical freight records, such as converting long and short sentences to obtain the text content of the short sentences. Then, the server performs keyword matching based on the various feature attributes proposed in Table 1, and extracts various freight cost influencing factors from the text content of the short sentences. In order to ensure the effectiveness and comparability of the feature screening evaluation results in the subsequent steps, the server needs to convert the freight cost influencing factors into discrete features; for example, the demand type (planned / temporary) and the demand category (conventional route / key customer / other) use label encoding to encode the features. For continuous numerical features, such as route mileage, a route mileage and price distribution map is drawn, and the route mileage is divided into multiple intervals according to the monotonicity of the distribution map (for example, intervals <10, [10-50), [50-100), [100-200).....), to ensure that each single feature maintains a monotonic relationship with the pricing, and then use label encoding to encode the features.
[0141] When determining the cost of different historical freight routes, the degree of correlation between the influencing factors and the cost is different, so it is necessary to evaluate the correlation index of each influencing factor by weighted calculation. Considering the reference of the sample size, the flow direction between the place of shipment and the place of receipt is used as the analysis dimension, that is, the different characteristics of the routes in the same city flow direction contribute the same. In addition, since it is an unsupervised problem, it is necessary to evaluate the degree of influence of various factors on the route price, so the embodiment performs correlation analysis on the encoded features.
[0142] There are many statistics in statistics that describe the correlation between data. When facing practical applications, the specific choice of which statistic often requires consideration of two aspects: data structure (meeting the application prerequisites of the statistic) and interpretability. As shown in Table 3, commonly used correlation evaluation indicators for different data types are given. From the perspective of data structure, most of the features used in the subsequent similarity matching process of the embodiment are discrete data, and a few continuous features are also converted into discrete features through binning, while the final price is continuous data. From this perspective, it is more appropriate to use the correlation ratio for evaluation; of course, in some other embodiments, if you consider discretizing the pricing results, you can also use the Cramer coefficient.
[0143] Table 3 Different correlation indicators
[0144]
[0145] More specifically, the correlation ratio is finally used as the evaluation index, mainly considering the practicality and computational efficiency. The correlation ratio calculation formula is as follows:
[0146]
[0147]
[0148]
[0149] Among them, K is the feature category, that is, the number of specific attribute values contained in the i-th influencing factor, n k is the number of historical freight routes with this feature. For example, taking the influencing factor of operation mode as an example, the operation mode includes two attribute values: one-way and round trip; the specific calculation process of the relevant ratio of the operation mode is as follows:
[0150] Intra-group variation = variance of one-way route cost price + variance of round-trip route cost price;
[0151] Component variation = number of unilateral line contracts * (average price of unilateral line contracts - average price of all line contracts) squared + number of round-trip line contracts * (average price of round-trip line contracts - average price of all line contracts) squared.
[0152] Exemplarily, in the embodiment, an influence factor with a correlation ratio (degree of influence) greater than 0.2 can be selected as an input factor for similarity calculation; that is, in the set of alternative routes in which the historical freight route is located, the freight cost influencing factors corresponding to each historical freight route will only be retained as valid alternative route features and participate in the subsequent similarity matching process when the correlation ratio with the historical freight cost price is greater than 0.2.
[0153] It should be noted that in order to smoothly realize the calculation between features in the embodiment, the embodiment needs to adopt a discrete processing method similar to the alternative route features in the process of forming the initial route features. Specifically, in the embodiment, natural language processing, identification and extraction of key fields are performed on the freight demand information to obtain the influencing factors for constraining freight costs. Similarly, after obtaining the aforementioned influencing factors, discretization processing is required; for example, the route mileage in the influencing factors is also discretized to obtain multiple mileage interval features such as intervals <10, [10-50), [50-100), [100-200), etc., that is, discrete features.
[0154] In one embodiment, the method performs similarity matching between the initial route characteristics and the candidate route characteristics, and outputs a target freight route from the plurality of candidate freight routes whose similarity to the initial route characteristics is higher than a target similarity threshold, comprising the following steps:
[0155] Step 1: Obtain alternative route features corresponding to historical freight routes in the alternative route set.
[0156] Step 2: vectorize the initial line features and the alternative line features respectively.
[0157] Step three, generating similarity based on the vector distance between the initial route features after vectorization processing and the candidate route features after vectorization processing.
[0158] Step 4: If the similarity is higher than the target similarity threshold, the candidate route feature after vectorization processing is marked as the target route feature.
[0159] Step 5: Mark the alternative freight route corresponding to the target route characteristics as the target freight route.
[0160] In an embodiment, the process of calculating the similarity is to calculate the similarity between the feature value of the candidate route feature and the feature value of the initial route feature, and the influencing factors described by the selected candidate route feature and the initial route feature should be the same factor.
[0161] For example, the alternative route feature describing the mileage is [10-50) kilometers, and the initial route feature describing the mileage is [50-100) kilometers. The process of calculating the similarity in the embodiment is to calculate the feature value between [10-50) kilometers and [50-100) kilometers. The target route feature in the embodiment is feature information that is sufficiently similar to the initial route feature and can uniquely characterize an alternative freight route; the uniquely characterized alternative freight route is the target freight route.
[0162] Specifically in the embodiment, the route cargo volume forecast helps the operation planning side determine the characteristics of the routes to be recruited; the price comparison pool is constructed according to the influence of different characteristic factors on pricing. The alternative freight routes are converted into a vector set of various alternative route characteristics and influence weights; and by calculating the distance between the initial route characteristics (after vectorization) and each vector in the vector set, the alternative freight route with the highest similarity to the initial freight route is found, and the cost price of the alternative freight route is used as a price reference.
[0163] More specifically, in the embodiment, the specific method used for similarity calculation is vector similarity calculation in the field of machine learning; for example, for the initial freight route X, there are two alternative freight routes A and B in the comparison pool, and the distance between "XA" and "XB" is calculated respectively. The historical route with a smaller distance is the route most similar to the initial freight route.
[0164] In addition, there are two specific methods of similarity calculation adopted in the embodiment, namely, a similarity calculation method focusing on general experience and a similarity calculation method focusing more on special experience. Among them, the similarity calculation formula focusing more on general experience is as follows:
[0165]
[0166] In addition, the similarity calculation formula that focuses more on special case experience is:
[0167]
[0168] Among them, S d (X d ,Y d ) Characteristic value X of line X d and the characteristic value Y of line Y d The similarity between d (X d ) Characterization feature X d The probability distribution of d (Y d ) represents the characteristic value Y d The probability distribution of N is the number of the feature. When obtaining the recommendation result of each route to be tendered, the embodiment can select the required calculation method according to the understanding of the route, or can select to output the results of both methods for comprehensive evaluation.
[0169] The reason for adopting the above two similarity calculations is that for the similarity measurement of categorical variables, the simple overlap calculation method (the same feature value is equal to 1, and the values are unequal to 0) cannot distinguish the differences between different values under the same feature; while the similarity calculation focusing on general experience and the similarity calculation focusing on special experience introduce the information contained in the sample set itself (the probability distribution of each value under a certain feature), and transform the original 0 in the case of unequal features into a function containing probability distribution. The similarity calculation result focusing on general experience is proportional to the probability distribution, while the similarity calculation result focusing on special experience is inversely proportional to the probability distribution. In this way, even in the case of unequal features, it is possible to finely distinguish which two values are more similar. At the same time, the case of equal features still remains at 1, which is more in line with business cognition and more interpretable. Among them, the similarity calculation method focusing on special experience will give lower similarity to high-frequency values, that is, more trust in special events; while the similarity calculation method focusing on general experience will give higher similarity to high-frequency values, and more trust in general experience.
[0170] For example, taking the bidding process of a freight line 67****31 as an example, it is planned to participate in the bidding in August. Combined with the freight volume forecast, the operation planning side finally determines the characteristic information of the initial line (only the key information is listed) as shown in Table 4:
[0171] Table 4 Example of key line information
[0172] City flow Shenzhen - Shanghai Model 30T Transport Mode unilateral Tender month August Transport Class Level 1 ... ...
[0173] Through the screening in the embodiment, the key information of the candidate freight routes for reference is obtained as shown in Table 5:
[0174] Table 5 Example of historical reference information of the target line
[0175]
[0176] The alternative freight routes 55****32 and 55****37 differ from the initial freight routes only in the bidding month. The similarities are calculated using the naive method, the similarity calculation method focusing on general experience, and the similarity calculation method focusing on special experience, as shown in Table 6:
[0177] Table 6. Similar recommendation comparison examples
[0178]
[0179] Obviously, if the similarity calculation of the two routes 55****32 and 55****37 is consistent for the naive method, but the bidding months of the two are inconsistent, the final result may not be satisfactory. However, by introducing the prior information of probability, the similarity calculation method focusing on general experience and the similarity calculation method focusing on special experience can distinguish which month is more similar to August when other factors are the same. From the results, we can see that if the similarity calculation method focusing on general experience is selected, the route 55****32 is more similar, so the price recommended is 10,000, while if the similarity calculation method focusing on special experience is selected, the route 55****37 will be more similar, so the price recommended is 20,000.
[0180] After completing the similarity calculation, the similarity values of the routes to be recruited and the alternative freight routes are obtained. According to the pre-set target similarity threshold, the corresponding similarity values of each alternative freight route are screened and judged. Only when the similarity value is greater than the similarity threshold, the alternative freight route can be used as the final target freight route. Alternatively, in the embodiment, the alternative freight route with the highest similarity value can be directly output as the target freight route. In addition, the model can achieve flexible switching for introducing two similarity calculation methods. The switching logic is to adapt to the new and old attributes of the route and the company's land transportation inquiry strategy deployment for the month. It can realize the strategy of supporting high-frequency data in most situations with absolute voice, and can complete bidding inquiries with less risk; it also supports the strategy of using low-frequency data to open up new price territory when there is a lack of historical data reference when opening up new routes, and assists in supporting a small number of newly signed suppliers to break through the situation of seeking prices.
[0181] In one embodiment, the freight route planning method provided by the present application may further include the following steps:
[0182] Step 1: Obtain historical freight cost data for multiple historical freight routes and current freight energy consumption unit prices.
[0183] Step 2: Update the historical freight cost data according to the current freight energy consumption unit price to obtain the target freight cost data corresponding to the target freight route.
[0184] Specifically in the embodiment, after obtaining the recommended price of the most similar route, considering that market supply and demand, geopolitics, and currency exchange rates have a large comprehensive impact on oil price fluctuations, the historical freight routes and the current target freight energy consumption (for example, oil or ionization energy) may be quite different. Therefore, in order to obtain the route price that meets the current freight energy consumption, it is necessary to further complete the calculation of the freight energy consumption difference. The specific calculation formula is as follows:
[0185] p e =Ps +0.01×d e ×f e ×(O e -O s )
[0186] Among them, p e is the final recommended price, p s is the price of the most similar historical route, d e is the distance of the historical freight route (the route to be recruited), f e is the energy consumption per 100 km of the line to be recruited, o e is the current energy price of the line to be recruited, and o s The energy consumption price of the most similar historical freight route. After the final price is determined, the actual bidding will be carried out, and the best supplier will be matched for the bidding route based on the rating of relevant factors such as supplier credit and transportation capacity, and then the procurement contract will be signed to complete the entire process of route bidding.
[0187] Taking the specific application scenario of a freight company conducting land transport route bidding as an example, the complete implementation process of the freight route planning method provided by the technical solution of this application is described as follows: Fig.10 As shown, the method combines rules and algorithms to build a pre-price prediction model to refine and pre-set bidding pricing standards and reduce unnecessary high price risks for routes. More specifically, the method mainly includes the following steps:
[0188] Step 1: Cargo volume forecasting model based on time series. Fig.11 As shown, the method uses the time series forecasting method to predict the route freight volume:
[0189] 1) Input data. The input data can be selected from the daily freight volume data of each route in the past two years as historical data.
[0190] 2) Output processing: Data processing mainly uses four conventional methods for processing time series data, such as anomaly detection, normalization, time series decomposition, and periodicity detection.
[0191] 3) Feature engineering. In this application scenario, feature engineering mainly processes two types of features: timestamp features and time series value features. Among them, timestamp features, for example, time features determine the year, month, and week of the timestamp; Boolean features are combined with seasonal calendars to determine whether it is a weekend, a holiday, etc. Time series value features, for example, lag value features, such as selecting freight volume data such as t-1, t-7, and t-30 on the day to be predicted; sliding window statistics, such as the average, median, and maximum value of the freight volume in the t-7 time period of the predicted day; extended window statistics, such as the average, median, and maximum value of the freight volume time series of the entire line.
[0192] 4) Model prediction. The prediction models are based on traditional machine learning (LightGBM, XGBoost, Prophet) and deep learning (Seq2Seq, DeepAR) modeling, and Bayesian Optimization is used to accelerate the hyperparameter search process. After modeling, the models are fused according to the mean absolute percentage error (MAPE) of each model prediction, and the prediction results are output comprehensively. After each model is predicted, the model is fused and the overall prediction results are output to the operation planning side. At the same time, combined with the determinable cargo volume information feedback from the regional survey, the abnormal results of the prediction model are adjusted and the post-prediction results are filled in to make the prediction results more reliable. After the model prediction results are output, various attribution methods are used to additionally measure the marginal contribution of the calculation features to the model output, complete the root cause explanation of the "black box" model, and improve the acceptance and explanation of the model on the actual user side.
[0193] Step 2: Construct a price comparison pool. The core idea of route price recommendation is to find the historical route that is most similar to the route to be recruited, and use the historical route price as a reference for the current route price to be recruited. The primary goal of this step is to construct a historical price comparison pool for reference. There are two main steps:
[0194] 1) Data cleaning. First, the data range for correlation calculation in the method is finally determined to be limited to the condition of network flow direction; second, the abnormal data of the line historical task data chassis is cleaned: the historical price data of the line of the affiliated company is eliminated; the short-term transaction data is eliminated; the demand change data is eliminated; and the data with the cost per kilometer exceeding the threshold is eliminated.
[0195] 2) Feature engineering. First, it is necessary to sort out the features. Based on the expert experience judgment of the business process in the procurement stage and the calibration results, the features that affect pricing are divided into two categories: internal factors and external factors. Among them, internal factors are the attributes of the freight company's routes to be procured or the internal controllable related influencing factors accompanying the procurement stage; for example, the procurement month. External factors are used to characterize the impact of changes in the international situation and the external market environment on the route procurement pricing, such as the fluctuation trend of oil prices. Secondly, in order to ensure the effectiveness and comparability of subsequent feature screening and evaluation, all features are converted into discrete features. Then, the weights of factors considered by different routes when determining prices are inconsistent, so it is necessary to screen all the features contained in the external factors and internal factors to evaluate the effective features that each route relies on. For example, in the embodiment, the correlation ratio can be used as an evaluation indicator for the feature, and features with a correlation ratio greater than 0.2 can be screened as model input factors for the calculation of urban flow similarity.
[0196] Step 3: Similarity calculation and sorting. The route cargo volume forecast helps the operation planning side determine the characteristics of the routes to be bid; the price comparison pool is constructed based on the influence of different characteristic factors on pricing, and the historical routes are converted into a vector set with influence weights for each factor value. By calculating the vector distance between the route to be bid and the historical route, the historical route with the highest similarity to the route to be bid is found as a price reference.
[0197] Step 4: Price determination and supplier recommendation. After obtaining the recommended price of the most similar route, considering that market supply and demand, geopolitics, and currency exchange rates have a large comprehensive impact on oil price fluctuations, the oil prices used for historical routes and current targets may be quite different. Therefore, in order to obtain a route price that meets the current oil price, it is necessary to further calculate the oil price difference. After the final price is determined, the actual bidding will be carried out, and the rating scores of relevant factors such as supplier credit and transportation capacity will be combined to match the best supplier for the route to be bid, and then the procurement contract will be signed to complete the entire process of route bidding.
[0198] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0199] Based on the same inventive concept, the embodiment of the present application also provides a freight route planning device for implementing the freight route planning method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the freight route planning device provided below can refer to the limitations of the freight route planning method above, and will not be repeated here.
[0200] In one embodiment, Fig.12 As shown, a freight route planning device 120 is provided, comprising: a demand analysis module 121, a route screening module 122, a feature engineering module 123 and a comparison screening module 124, wherein:
[0201] The demand analysis module 121 is used to obtain freight demand information, and generate an initial freight route and an initial route feature corresponding to the initial freight route according to the freight demand information;
[0202] A route screening module 122 is used to obtain a plurality of alternative freight routes according to the freight demand information, wherein the receiving place and the dispatching place corresponding to the alternative freight routes are the same as the receiving place and the dispatching place specified in the freight demand information;
[0203] A feature engineering module 123 is used to extract alternative route features corresponding to the alternative freight routes, wherein the alternative route features are used to characterize freight cost influencing factors corresponding to each alternative freight route;
[0204] The comparison and screening module 124 is used to perform similarity matching between the initial route characteristics and the candidate route characteristics, and output a target freight route from the plurality of candidate freight routes whose similarity with the initial route characteristics is higher than a target similarity threshold.
[0205] In one embodiment, the demand analysis module 121 is also used to obtain multiple historical freight routes based on the freight demand information, and the receiving places and shipping places corresponding to the historical freight routes are the same as the receiving places and shipping places specified in the freight demand information; obtain the predicted freight volume of each historical freight route within the target time period, and the target time period is used to represent the time period specified in the freight demand information; if the predicted freight volume is not less than the target freight volume, the historical freight route is marked as an alternative freight route.
[0206] In one embodiment, the demand analysis module 121 is also used to obtain the average daily freight volume data of each historical freight route; extract the time characteristics of the average daily freight volume data to obtain timestamp feature information and time series value feature information; use the timestamp feature information and time series value feature information as sample data, and use the average daily freight volume data as sample labels, and input them into the prediction model to be trained for training; generate the predicted freight volume of each historical freight route within the target time period through the trained prediction model.
[0207] In one embodiment, the demand analysis module 121 is also used to perform time series decomposition on the average daily freight volume data to obtain freight volume change trend information, freight volume change cycle information, and holiday freight volume information; and generate time series value feature information based on the time series corresponding to the freight volume change trend information, freight volume change cycle information, and holiday freight volume information.
[0208] In one embodiment, the prediction model includes a machine learning model and a deep learning model; further, the initial planning module 123 is also used to use timestamp feature information and time series value feature information as sample data, and use average daily freight volume data as sample labels, and input them into the machine learning model and deep learning model to be trained for training respectively; predict the first freight volume of the historical freight route within the target time period through the trained machine learning model; predict the second freight volume of the historical freight route within the target time period through the trained deep learning model; generate the line freight volume corresponding to the historical freight route according to the first freight volume, the second freight volume, and the model prediction errors corresponding to the machine learning model and the deep learning model.
[0209] In one embodiment, the feature engineering module 123 is also used to extract historical freight cost data of each historical freight route and freight cost influencing factors corresponding to the historical freight cost data from the freight history records; discretize the freight cost influencing factors to obtain discrete features; and based on the correlation coefficient between the discrete features and the historical freight cost data, select alternative route features corresponding to multiple historical freight routes from the discrete features.
[0210] In one embodiment, the comparison and screening module 124 is further used to obtain alternative route features corresponding to historical freight routes in the alternative route set; respectively perform vectorization processing on the initial route features and the alternative route features; generate similarity based on the vector distance between the vectorized initial route features and the vectorized alternative route features; if the similarity is higher than the target similarity threshold, mark the vectorized alternative route features as target route features; and mark the alternative freight route corresponding to the target route features as the target freight route.
[0211] In one embodiment, the device 120 also includes an optimization and adjustment module, which is used to obtain historical freight cost data of multiple historical freight routes and current freight energy consumption unit prices; update the historical freight cost data according to the current freight energy consumption unit prices to obtain target freight cost data corresponding to the target freight route.
[0212] Each module in the above-mentioned freight route planning device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0213] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.13As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as freight history records. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a freight route planning method is implemented.
[0214] Those skilled in the art will understand that Fig.13 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 those shown in the figure, or combine certain components, or have a different arrangement of components.
[0215] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0216] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0217] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0218] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed 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. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. 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). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0219] The technical features of the above embodiments may 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.
[0220] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A freight route planning method, It is characterized in that The method comprises: Obtaining freight demand information, and generating initial route characteristics according to the freight demand information; According to the freight demand information, a plurality of alternative freight routes are obtained, wherein the receiving place and the dispatching place corresponding to the alternative freight routes are the same as the receiving place and the dispatching place specified in the freight demand information; Extracting alternative route features corresponding to the alternative freight routes, wherein the alternative route features are used to characterize freight cost influencing factors corresponding to each alternative freight route; The initial route feature is matched with the candidate route feature in similarity, and a target freight route having a similarity with the initial route feature higher than a target similarity threshold is output from the plurality of candidate freight routes.
2. The method according to claim 1, It is characterized in that The acquiring of a plurality of alternative freight routes according to the freight demand information comprises: According to the freight demand information, a plurality of historical freight routes are obtained, wherein the receiving place and the dispatching place corresponding to the historical freight routes are the same as the receiving place and the dispatching place specified in the freight demand information; Obtaining a predicted freight volume of each historical freight route within a target time period, wherein the target time period is used to represent a time period specified in the freight demand information; If the predicted freight volume is not less than the target freight volume, the historical freight route is marked as the alternative freight route.
3. The method according to claim 2, It is characterized in that The method for generating the predicted freight volume of each historical freight route within the target time period includes: Obtain the average daily freight volume data for each historical freight route; Extracting the time characteristics of the daily average freight volume data to obtain timestamp characteristic information and time series value characteristic information; The timestamp feature information and the time series value feature information are used as sample data, and the average daily freight volume data is used as a sample label, and are input into the prediction model to be trained for training; The trained forecasting model is used to generate the forecasted freight volume for each historical freight route within the target time period.
4. The method according to claim 3, It is characterized in that The method for extracting the time series value feature information includes: Performing time series decomposition on the daily average freight volume data to obtain freight volume change trend information, freight volume change cycle information, and holiday freight volume information; The time series value characteristic information is generated according to the time series corresponding to the freight volume change trend information, the freight volume change cycle information, and the holiday freight volume information.
5. The method according to claim 3, It is characterized in that The prediction model includes a machine learning model and a deep learning model; The generating of the predicted freight volume of each historical freight route in the target time period by the trained prediction model includes: Predicting the first freight volume of the historical freight route within the target time period by using the trained machine learning model; Predicting a second freight volume of the historical freight route within the target time period by using the trained deep learning model; The route freight volume corresponding to the historical freight route is generated according to the first freight volume, the second freight volume, and the model prediction errors corresponding to the machine learning model and the deep learning model respectively.
6. The method according to claim 1, It is characterized in that The extracting the alternative route features corresponding to the alternative freight route comprises: Acquire historical freight cost data corresponding to the candidate freight routes, and freight cost influencing factors corresponding to the historical freight cost data; Discretization is performed according to the freight cost influencing factors to obtain discrete features; Based on the correlation coefficient of the degree of association between the discrete characteristics and the historical freight cost data, candidate route characteristics corresponding to a plurality of historical freight routes are screened from the discrete characteristics.
7. The method according to claim 1, It is characterized in that The similarity matching of the initial route feature with the candidate route feature and outputting a target freight route from the plurality of candidate freight routes whose similarity to the initial route feature is higher than a target similarity threshold comprises: Performing vectorization processing on the initial line features and the candidate line features respectively; generating the similarity according to a vector distance between the initial route feature after vectorization and the candidate route feature after vectorization; If the similarity is higher than the target similarity threshold, marking the candidate route feature after vectorization as the target route feature; The candidate freight route corresponding to the target route characteristic is marked as the target freight route.
8. The method according to any one of claims 1 to 7, It is characterized in that The method further comprises: Obtaining historical freight cost data of the alternative freight route and current freight energy consumption unit price; The historical freight cost data is updated according to the current freight energy consumption unit price to obtain the target freight cost data corresponding to the target freight route.
9. A freight route planning device, It is characterized in that The device comprises: A demand analysis module, used to obtain freight demand information, and generate an initial freight route and initial route features corresponding to the initial freight route according to the freight demand information; A route screening module, used for acquiring a plurality of alternative freight routes according to the freight demand information, wherein the receiving place and the dispatching place corresponding to the alternative freight routes are the same as the receiving place and the dispatching place specified in the freight demand information; A feature engineering module, used for extracting alternative route features corresponding to the alternative freight routes, wherein the alternative route features are used for characterizing the freight cost influencing factors corresponding to each alternative freight route; The comparison and screening module is used to perform similarity matching between the initial route characteristics and the candidate route characteristics, and output a target freight route from the plurality of candidate freight routes whose similarity with the initial route characteristics is higher than a target similarity threshold.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.