CN113807560A - Logistics cost prediction method and device, electronic equipment and storage medium - Google Patents

Logistics cost prediction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113807560A
CN113807560A CN202110067539.9A CN202110067539A CN113807560A CN 113807560 A CN113807560 A CN 113807560A CN 202110067539 A CN202110067539 A CN 202110067539A CN 113807560 A CN113807560 A CN 113807560A
Authority
CN
China
Prior art keywords
logistics
cost
line data
predicted
destination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110067539.9A
Other languages
Chinese (zh)
Other versions
CN113807560B (en
Inventor
耿晓亮
王继旭
顾佳婧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202110067539.9A priority Critical patent/CN113807560B/en
Publication of CN113807560A publication Critical patent/CN113807560A/en
Application granted granted Critical
Publication of CN113807560B publication Critical patent/CN113807560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0835Relationships between shipper or supplier and carriers
    • G06Q10/08355Routing methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0838Historical data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Data Mining & Analysis (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Game Theory and Decision Science (AREA)
  • Evolutionary Biology (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Probability & Statistics with Applications (AREA)

Abstract

The invention discloses a logistics cost prediction method, a logistics cost prediction device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a starting place and a destination of a logistics route to be predicted; obtaining a rated number of line data samples from a logistics historical record according to the departure place and the destination, and training according to the line data samples to obtain a volume prediction model; calculating the predicted amount of different vehicle types according to the departure place and the destination through the amount prediction model; and calculating the logistics cost of the logistics line with the cost to be predicted according to the prediction amount and unit prices corresponding to different vehicle types. The method and the device have the advantages that the method and the device train the square prediction model through the line data samples in the logistics historical records, and objectively calculate the logistics transportation cost according to the square prediction model, and are beneficial to solving the technical problem that the logistics transportation cost is evaluated in a manual mode in the prior art, so that the estimated logistics cost is inaccurate due to human subjective factors.

Description

Logistics cost prediction method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of logistics, and in particular, to a method and an apparatus for predicting logistics cost, an electronic device, and a storage medium.
Background
At present, the transportation link of logistics is usually carried out by means of tender purchasing, and tender purchasing is manually determined. Obviously, the method has more artificial subjective factors and sometimes depends on human experience to make judgment, but the judgment accuracy is low, and the cost is not reduced.
Therefore, a logistics cost prediction method is urgently needed, which can avoid artificial subjective factors, evaluate logistics cost in a relatively objective mode, and is helpful for solving the technical problem that the logistics cost evaluated is inaccurate due to the artificial subjective factors because logistics transportation cost is evaluated in a manual mode in the prior art.
Disclosure of Invention
The application provides a logistics cost prediction method, which aims to train a volume prediction model through line data samples in a logistics historical record, objectively calculate logistics transportation cost according to the volume prediction model, and help solve the technical problem that in the prior art, the logistics transportation cost is evaluated in a manual mode, so that the estimated logistics cost is inaccurate due to human subjective factors.
The method comprises the following steps:
receiving a starting place and a destination of a logistics route to be predicted;
obtaining a route data sample from a logistics history record according to the departure place and the destination, wherein the route data sample comprises logistics volume of different vehicle types in different time;
training according to the line data sample to obtain a square prediction model;
calculating the predicted amount of different vehicle types according to the departure place and the destination through the amount prediction model;
and calculating the logistics cost of the logistics line with the cost to be predicted according to the prediction amount and unit prices corresponding to different vehicle types.
In an optional embodiment, the training of the square prediction model according to the line data samples includes:
grouping the line data samples according to months to obtain grouped line data samples;
generating a daily volume time sequence for each group of line data samples according to different vehicle types;
clustering the square time sequence according to a preset clustering mode to obtain a clustered square time sequence group;
and respectively training the square quantity time sequence group of each cluster to obtain the square quantity prediction model.
In an optional embodiment, the calculating the predicted quantities of different vehicle types according to the departure place and the destination by the quantity prediction model includes:
selecting a quantity prediction model which best meets the clustering under the same condition according to the logistics route of the cost to be predicted;
and calculating the forecasting quantities of different vehicle types according to the logistics route of the cost to be forecasted by the selected quantity forecasting model.
In an optional embodiment, after the step of obtaining the route data sample from the logistics history according to the departure place and the destination, the method further comprises:
determining whether the number of line data samples meets a rated number,
if the number of line data samples meets the nominal number, performing the subsequent steps.
In an optional embodiment, the determining whether the number of line data samples satisfies a rated number further includes:
if the number of the line data samples does not meet the rated number, acquiring order data from the logistics history record, wherein the logistics history record comprises logistics data of different orders and the order data, and the order data comprises an order date of each order and unit price of each type of goods; classifying the orders in the order data according to the order dates and the goods types to obtain classified orders; dividing the classified orders into different grades according to the unit price of each type of goods and a preset price interval; calculating and generating a reference vector according to the orders classified in different grades; and acquiring a sample which meets a preset selection rule from the logistics history record according to the reference vector to serve as the line data sample or supplement the line data sample.
In an optional embodiment, the obtaining, as the line data sample or supplementing the line data sample, the line meeting a predetermined selection rule from the logistics history record according to the reference vector includes:
randomly selecting a clustering reference value, wherein the clustering reference value is not more than the total number of lines in the logistics history record;
clustering the classified samples in the logistics history record according to the clustering reference value, finishing clustering if the variance between the vectors which are the same as the reference vector in the samples is smaller than a preset threshold value, and increasing the clustering reference value for clustering if the variance between the vectors which are the same as the reference vector in the samples is larger than or equal to the preset threshold value until the variance between the vectors which are the same as the reference vector in the samples is smaller than the preset threshold value;
calculating an average vector of samples in each cluster;
using the sample in the closest cluster of the average vector and the reference vector as the line data sample or to supplement the line data sample.
In an alternative embodiment, the square prediction model is a ridge regression model.
In an alternative embodiment, the present application further provides a logistics cost prediction apparatus, including:
the receiving module is used for receiving a starting place and a destination of the logistics route with the cost to be predicted;
the acquisition module is used for acquiring a route data sample from a logistics historical record according to the departure place and the destination, wherein the route data sample comprises logistics volume of different vehicle types in different time;
the training module is used for training according to the line data sample to obtain a square prediction model;
the calculation module is used for calculating the predicted amount of the different vehicle types according to the departure place and the destination through the amount prediction model; and the logistics cost calculation module is also used for calculating the logistics cost of the logistics line with the cost to be predicted according to the predicted square amount and unit square amount unit prices corresponding to different vehicle types.
The present application further provides an electronic device, which includes: a processor and a memory;
the memory has stored therein an application program executable by the processor for causing the processor to perform the steps of the program test method as described.
The present application also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the program testing method.
As can be seen from the above, based on the above embodiments, the present application implements simultaneous and efficient testing of different programs to be tested by configuring the information interface and the flow logic relationship, so as to help solve the technical problem that the prior art cannot perform batch testing on different types of test programs.
Drawings
FIG. 1 is a schematic diagram of a process 100 of a logistics cost prediction method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a flow 200 of a logistics cost prediction method according to an embodiment of the invention;
FIG. 3 is a flow chart 300 illustrating a method for logistics cost prediction according to an embodiment of the present invention;
FIG. 4 is a flow chart 400 illustrating a method for logistics cost prediction according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating an architecture of a logistics cost prediction apparatus according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The inventor finds that currently, in the logistics transportation process, bidding purchase is generally performed on logistics companies, that is, the logistics companies quote unit prices of different vehicle type unit volumes for target lines, and the volume can be understood as the throughput of goods transportation. The bidding purchasing can judge the amount of different vehicle types according to experience, and finally the total operation cost is calculated according to the quotation, but the mode is mainly based on the experience of people, obviously adulterates subjective factors of people, so the deviation is easy to occur, the final cost prediction is inaccurate, and the correct lowest quotation cannot be selected.
Fig. 1 is a schematic flow chart 100 illustrating a logistics cost prediction method according to an embodiment of the invention. As shown in fig. 1, in an embodiment, the present application provides a logistics cost prediction method, including:
and S101, receiving a starting place and a destination of the cost logistics route to be predicted.
In this step, a specific step of receiving the departure place and the destination of the cost logistics route to be predicted is provided. When bidding, a specific departure place and a specific destination of logistics are given, and offers are given according to the specific departure place and the specific destination, for example, the departure place and the destination are respectively from beijing to shanghai, and in this step, the two places need to be acquired for subsequent prediction. When the departure place and the destination are determined, the route of the cost logistics route to be predicted is also determined.
S102, obtaining a rated number of route data samples from a logistics history record according to the departure place and the destination, wherein the route data samples comprise logistics volume of different vehicle types in different time.
In this step, a nominal number of route data samples are obtained from a logistics history record by means of the starting point and the destination which have already been determined, the route data samples having a route starting point and a route ending point, which correspond to the starting point and the destination of the logistics route to be predicted, respectively. In addition, the route data samples include logistics volume for different vehicle models.
And S103, training according to the line data sample to obtain a square prediction model.
In this step, a specific embodiment of training a scalar prediction model based on the line data samples is provided. It should be noted that in this step, data extraction may be performed according to different dates within one month, and a specific manner will be further explained later, and will not be described herein again. And finally, the square prediction model is the predicted square of different vehicle types.
And S104, calculating the predicted amount of the different vehicle types through the amount prediction model according to the departure place and the destination.
In this step, a step of calculating the amount of the party is provided. The quantity prediction model, which has been calculated for the routes of the departure place and the destination from the route data samples, can objectively calculate the quantities of different vehicle types using AI deep learning.
And S105, calculating the logistics cost of the logistics line with the cost to be predicted according to the predicted amount and unit prices corresponding to different vehicle types.
In this step, a predicted logistics cost of the logistics line with the cost to be predicted is calculated according to the predicted amount and the quoted price. It is sufficient to select the company with the lowest logistics cost among all the logistics companies.
In this embodiment, a specific implementation of the logistics cost prediction method is provided. First, a departure place and a destination of a cost distribution line to be predicted are received. The departure place and the destination are already confirmed in the bidding process, for example, the specific logistics transportation route specified in the bidding is from beijing to shanghai, namely, the departure place and the destination. Then, a nominal number of route data samples are obtained from the logistics history record according to the departure place and the destination, wherein the route data samples comprise logistics volume of different vehicle types. The logistics history records may store the route data samples, the route data samples are used for subsequent model training, and factors affecting the logistics volume are many, such as busy seasons, order conditions, weather conditions, road conditions, and the like, but at least the route starting point and the route ending point of a route, and the volume of different vehicle types can be identified by different route data samples. A certain number of the line data samples are required for training the model to be realized, so the line data samples need to have a nominal number. And then, training according to the line data sample to obtain a square prediction model. And then, calculating the predicted quantities of different vehicle types through the quantity prediction model according to the departure place and the destination, wherein the predicted quantities of different vehicle types can be predicted at the moment. And finally, calculating the logistics cost of the logistics line with the cost to be predicted according to the predicted amount and unit amount unit prices corresponding to different vehicle types, calculating the logistics cost in the step, and selecting the logistics company with the lowest logistics cost. The method and the device have the advantages that the method and the device train the square prediction model through the line data samples in the logistics historical records, and objectively calculate the logistics transportation cost according to the square prediction model, and are beneficial to solving the technical problem that the logistics transportation cost is evaluated in a manual mode in the prior art, so that the estimated logistics cost is inaccurate due to human subjective factors.
Fig. 2 is a schematic flow chart 200 illustrating a logistics cost prediction method according to an embodiment of the invention. In another alternative embodiment, as shown in fig. 2, the training of the square prediction model according to the line data samples includes:
s201, grouping the line data samples according to months to obtain grouped line data samples.
In this step, a specific step of grouping the line data samples by month is provided. Then, according to 12 months of the year, one group is assigned to each month, and the groups are labeled G1, G2, … and G12, and each group includes the line data sample of the month. It should be noted that the route data sample in this step includes logistics transportation dates and corresponding transportation volume of different vehicle types, for example, if the transportation throughput of the a-type vehicle in 2019 in 3, 24 and 24 days is 100, then the logistics transportation date in 2019 in 3, 24 and classified into a group of 3 months, and the transportation volume is 100.
And S202, generating a daily volume time sequence for each group of line data samples according to different vehicle types.
In this step, a daily schedule sequence is generated for each set of the line data samples according to different vehicle types. Said quantity of transport in the month group 3 of 24 is 100 according to the above example, then G is obtainedA 3=<50,80,…100,…,20>. This said vector is 100 at position 24 in the sequence. The lower corner mark 3 indicates 3 months, and a indicates type a.
And S203, clustering the square quantity time sequence according to a preset clustering mode to obtain a clustered square quantity time sequence group.
In this step, a clustering step is provided, and in this step, the clustering algorithm can be used to partition and cluster the formula-time sequence into k clusters, such as cluster1, cluster2, cluster3, …, cluster, etc. How k decides needs to be based on D (X, Y) < ═ r for each cluster, X, Y being any two sequence data inside the cluster, r being a given error.
And S204, respectively training the square quantity time sequence group of each cluster to obtain the square quantity prediction model.
In this step, a specific implementation manner is provided for obtaining the quantity prediction model by respectively training according to each cluster, so that the quantity prediction model in each cluster can be obtained, when the prediction quantity is calculated, which cluster belongs to is judged according to the data of the logistics route to be predicted, and then the quantity prediction model belonging to the cluster is used for prediction, so that more accuracy can be achieved.
In this embodiment, a specific implementation of the training of the vector prediction model is provided. Firstly, grouping the line data samples according to months to obtain grouped line data samples. It should be noted that the reason why the training is performed by means of month and date is that the corresponding amount of the formula needs to be drawn by a specific date, but the specific month and date are not involved after the training. And generating a daily square-quantity time sequence for each group of line data samples according to different vehicle types, wherein the square-quantity time sequence is also used for leading out the square quantity corresponding to the date for later training. And then, clustering the square time sequence according to a preset clustering mode to obtain a clustered square time sequence group. And clustering is to train the square quantity time sequence group of each cluster respectively to obtain the square quantity prediction model for more accurate later calculation.
Fig. 3 is a flow chart 300 illustrating a logistics cost prediction method according to an embodiment of the invention. In another alternative embodiment, as shown in fig. 3, the calculating the predicted quantities of different vehicle types according to the departure place and the destination by the quantity prediction model includes:
s301, selecting a quantity prediction model which best meets the clustering under the same condition according to the logistics route of the cost to be predicted.
In the step, a specific step of selecting the quantity prediction model which best meets the clustering under the same condition according to the logistics route with the cost to be predicted is provided.
And S302, calculating the prediction square amount of different vehicle types according to the logistics route of the cost to be predicted through the selected square amount prediction model.
In the step, a specific step of calculating the predicted amount of the different vehicle types through the selected amount prediction model is provided.
In this embodiment, a method for selecting the quantity prediction model that best meets the logistics route condition of the cost to be predicted from the plurality of clustered quantity prediction models is provided, so that more accurate quantity prediction can be obtained, and more accurate logistics cost can be obtained.
In another optional embodiment, after the step of obtaining a nominal number of route data samples from the logistics history according to the departure place and the destination, the method further comprises:
and judging whether the number of the line data samples meets the rated number or not, and if so, executing the subsequent steps.
In the present embodiment, a specific embodiment is provided when the nominal number of the route data samples can be acquired from the logistics history record according to the departure place and the destination.
The rated quantity is denoted as MinLineQuantity, for example, if the rated quantity is 1 ten thousand, 1 ten thousand of the line data samples are required to satisfy the following training, and when the data of the same departure place and the same destination can be taken from the logistics history, the subsequent steps can be directly performed.
In another optional embodiment, the determining whether the number of line data samples satisfies a rated number further comprises:
if the number of the line data samples does not meet the rated number, acquiring order data from the logistics history record, wherein the logistics history record comprises logistics data of different orders and the order data, and the order data comprises an order date of each order and unit price of each type of goods; classifying the orders in the order data according to the order dates and the goods types to obtain classified orders; dividing the classified orders into different grades according to the unit price of each type of goods and a preset price interval; calculating and generating a reference vector according to the orders classified in different grades; and acquiring a sample which meets a preset selection rule from the logistics history record according to the reference vector to serve as the line data sample or supplement the line data sample.
In the present embodiment, there is provided a method when MinLineQuantity, i.e., the rated number, cannot be satisfiedThe line data samples may be supplemented by taking additional samples from the logistics history. First, order data is stored in the logistics history, and since the line data sample is completed after subsequent logistics transportation is performed through a specific order, the line data sample is attached to the order data, the order data includes an order date and a unit price of each type of goods, the unit price of each type of goods is classified according to a predetermined price interval, for example, 0 to 500 yuan is a low grade, 500 to 2000 yuan is a medium grade, and 2000 yuan is a high grade, and the line data sample can be classified monthly through the order date, so that the reference vector, namely V, can be obtainedClass, month=<Grade and quantity>. Then, instead of obtaining samples from the logistics history according to the departure place and the destination as the basis, the samples within the allowable vector distance range corresponding to the reference vector and the samples are used as the route data samples or supplemented with the route data samples, for example, 8000 line data samples are needed for the same departure place and destination, but 2000 samples are also needed, and then 2000 samples can be obtained again as the route data samples in this way. The essence of the method is to omit the sending place and the destination, the sample in the logistics history record is mainly a line and is attached with a sample of the specific order, for example, 5000 pieces of sweaters are available in the logistics from Beijing to Shanghai, 3000 mobile phones are available, and the user starts to transport in 2019 and 24 months 3. So VClass, month=<Grade and quantity>The sample refers to a sample of 5000 sweaters and 3000 mobile phones transported in 3 months, and the sample also has a specific vehicle type and the like. Finally, the predetermined selection rule is to select a sample that also transports 5000 sweaters and 3000 cell phones in 3 months, but has ignored the origin and destination, i.e., Beijing to Shanghai.
Fig. 4 is a flow chart 400 illustrating a logistics cost prediction method according to an embodiment of the invention. As shown in fig. 4, in an alternative embodiment, the obtaining, as the line data sample or supplementing the line data sample, a line meeting a predetermined selection rule from the logistics history according to the reference vector includes:
s401, randomly selecting a clustering reference value, wherein the clustering reference value is not more than the total number of lines in the logistics history record.
In this step, a specific implementation of obtaining the clustering reference value is provided. For example, the clustering reference value is M, it is to be noted that if the clustering reference value is M, all the lines in the logistics history record need to be clustered, then the clustering reference value should be less than or equal to the total number of the lines in the logistics history record, otherwise, each line is clustered, and the clustering meaning is lost.
S402, clustering the classified samples in the logistics history record according to the clustering reference value, finishing clustering if the variance between the vectors same as the reference vector in the samples is smaller than a preset threshold value, and increasing the clustering reference value for clustering if the variance between the vectors same as the reference vector is larger than or equal to the preset threshold value until the variance between the vectors same as the reference vector in the samples is smaller than the preset threshold value.
A specific clustering step is provided in this step. Firstly, one of the predetermined thresholds, namely the variance, denoted as R, is preset, and the predetermined threshold is used for ensuring clustering through a kmeans algorithm. For example, in the logistics history record, the order number of the iphone in 3 months is 5000, the unit price of the iphone is 6000 yuan, and then V is from VClass, month=<Grade and quantity>Is a VApple Mobile phone, 3 months=<High, 5000 f>. In this way, all samples in the logistics history can be classified into a vector set, and then 5000 orders of the iphone can be classified into the vector set. In the 5000 orders, determining whether the vector R on each dimension is within the preset threshold value, if R is larger than R, indicating that the clustering is reasonable, finishing the clustering, otherwise, if R is smaller than or equal to R, indicating that the subdivision degree of the clustering is not enough, clustering the clustering with the clustering reference value of M +1,and repeating the process until R is larger than R, and finishing clustering.
And S403, calculating an average vector of the samples in each cluster.
In this step, a step of calculating an average vector for the samples in each cluster is provided.
S404, using the sample in the closest cluster of the average vector and the reference vector as the line data sample or supplement the line data sample.
In this step the line data samples are taken as or supplemented to the line data samples according to the samples in the cluster in which the average vector of the different clusters and the reference vector are closest.
In this embodiment, a specific implementation of supplementing the line data sample or supplementing the line data sample with the sample in the stream history is provided.
In another alternative embodiment, the square prediction model is a ridge regression model.
A specific manner of the vector prediction model is provided in this embodiment.
Fig. 5 is a schematic diagram illustrating an architecture of a logistics cost prediction apparatus according to an embodiment of the invention. In another alternative embodiment, as shown in fig. 5, the present application further provides a logistics cost prediction apparatus, comprising:
the receiving module 101 is used for receiving a starting place and a destination of the logistics route with the cost to be predicted;
an obtaining module 102, configured to obtain a route data sample from a logistics history according to the departure place and the destination, where the route data sample includes logistics volume of different vehicle types at different times;
the training module 103 is used for training according to the line data sample to obtain a square prediction model;
a calculating module 104, configured to calculate predicted quantities of different vehicle types according to the departure place and the destination through the quantity prediction model; and the logistics cost calculation module is also used for calculating the logistics cost of the logistics line with the cost to be predicted according to the predicted square amount and unit square amount unit prices corresponding to different vehicle types.
In another alternative embodiment, the present application further provides an electronic device comprising: a processor and a memory;
the memory has stored therein an application program executable by the processor for causing the processor to perform the steps of the program test method as described.
In a further alternative embodiment, a computer-readable storage medium, on which a computer program is stored, is characterized in that the program realizes the steps of the program testing method described when executed by a processor.
In addition, the method steps described in this application may be implemented by hardware, for example, logic gates, switches, Application Specific Integrated Circuits (ASICs), programmable logic controllers, embedded microcontrollers, and the like, in addition to data processing programs. Such hardware capable of implementing the methods described herein may also constitute the present application.
The flowchart and block diagrams in the figures of the present application illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments disclosed herein. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not explicitly recited in the present application. In particular, the features recited in the various embodiments and/or claims of the present application may be combined and/or coupled in various ways, all of which fall within the scope of the present disclosure, without departing from the spirit and teachings of the present application.
The principles and embodiments of the present invention are explained herein using specific examples, which are provided only to help understanding the method and the core idea of the present invention, and are not intended to limit the present application. It will be appreciated by those skilled in the art that changes may be made in this embodiment and its broader aspects and without departing from the principles, spirit and scope of the invention, and that all such modifications, equivalents, improvements and equivalents as may be included within the scope of the invention are intended to be protected by the claims.
In practical applications, the computer readable medium may be included in the apparatus/device/system described in the above embodiments, or may exist alone without being assembled into the apparatus/device/system. The computer readable storage medium carries one or more programs which, when executed, implement the described data sorting apparatus to perform a data sorting method.
According to embodiments disclosed herein, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example and without limitation: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing, without limiting the scope of the present disclosure. In the embodiments disclosed herein, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

Claims (10)

1. A logistics cost prediction method is characterized by comprising the following steps:
receiving a starting place and a destination of a logistics route to be predicted;
obtaining a nominal number of route data samples from a logistics history record according to the departure place and the destination, wherein the route data samples comprise logistics volume of different vehicle types;
training according to the line data sample to obtain a square prediction model;
calculating the predicted amount of different vehicle types according to the departure place and the destination through the amount prediction model;
and calculating the logistics cost of the logistics line with the cost to be predicted according to the prediction amount and unit prices corresponding to different vehicle types.
2. The method of predicting logistics cost according to claim 1, wherein the training of the square prediction model based on the line data samples comprises:
grouping the line data samples according to months to obtain grouped line data samples;
generating a daily volume time sequence for each group of line data samples according to different vehicle types;
clustering the square time sequence according to a preset clustering mode to obtain a clustered square time sequence group;
and respectively training the square quantity time sequence group of each cluster to obtain the square quantity prediction model.
3. The logistics cost prediction method of claim 2, wherein the calculating predicted quantities of different vehicle types from the departure place and the destination by the quantity prediction model comprises:
selecting a quantity prediction model which best meets the clustering under the same condition according to the logistics route of the cost to be predicted;
and calculating the forecasting quantities of different vehicle types according to the logistics route of the cost to be forecasted by the selected quantity forecasting model.
4. The logistics cost prediction method of claim 1 or 2, wherein after the step of obtaining route data samples from the logistics history according to the departure place and the destination, the method further comprises:
determining whether the number of line data samples meets the nominal number,
if the number of line data samples meets the nominal number, performing the subsequent steps.
5. The logistics cost prediction method of claim 3, wherein the determining whether the number of line data samples meets a rated number further comprises:
if the number of the line data samples does not meet the rated number, acquiring order data from the logistics history record, wherein the logistics history record comprises logistics data of different orders and the order data, and the order data comprises an order date of each order and unit price of each type of goods; classifying the orders in the order data according to the order dates and the goods types to obtain classified orders; dividing the classified orders into different grades according to the unit price of each type of goods and a preset price interval; calculating and generating a reference vector according to the orders classified in different grades; and acquiring a sample which meets a preset selection rule from the logistics history record according to the reference vector to serve as the line data sample or supplement the line data sample.
6. The logistics cost prediction method of claim 4, wherein the obtaining of the route from the logistics history record according to the reference vector, which meets a predetermined selection rule, as the route data sample or supplementing the route data sample comprises:
randomly selecting a clustering reference value, wherein the clustering reference value is not more than the total number of lines in the logistics history record;
clustering the classified samples in the logistics history record according to the clustering reference value, finishing clustering if the variance between the vectors which are the same as the reference vector in the samples is smaller than a preset threshold value, and increasing the clustering reference value for clustering if the variance between the vectors which are the same as the reference vector in the samples is larger than or equal to the preset threshold value until the variance between the vectors which are the same as the reference vector in the samples is smaller than the preset threshold value;
calculating an average vector of samples in each cluster;
using the sample in the closest cluster of the average vector and the reference vector as the line data sample or to supplement the line data sample.
7. The logistics cost prediction method is characterized in that the square prediction model is a ridge regression model.
8. A logistics cost prediction apparatus, comprising:
the receiving module is used for receiving a starting place and a destination of the logistics route with the cost to be predicted;
the acquisition module is used for acquiring a route data sample from a logistics historical record according to the departure place and the destination, wherein the route data sample comprises logistics volume of different vehicle types in different time;
the training module is used for training according to the line data sample to obtain a square prediction model;
the calculation module is used for calculating the predicted amount of the different vehicle types according to the departure place and the destination through the amount prediction model; and the logistics cost calculation module is also used for calculating the logistics cost of the logistics line with the cost to be predicted according to the predicted square amount and unit square amount unit prices corresponding to different vehicle types.
9. An electronic device, characterized in that the electronic device comprises: a processor and a memory;
the memory stores an application program executable by the processor for causing the processor to perform the steps of the logistics cost prediction method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the logistics cost prediction method of any one of claims 1 to 7.
CN202110067539.9A 2021-01-19 2021-01-19 Logistics cost prediction method and device, electronic equipment and storage medium Active CN113807560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110067539.9A CN113807560B (en) 2021-01-19 2021-01-19 Logistics cost prediction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110067539.9A CN113807560B (en) 2021-01-19 2021-01-19 Logistics cost prediction method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113807560A true CN113807560A (en) 2021-12-17
CN113807560B CN113807560B (en) 2023-11-07

Family

ID=78892889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110067539.9A Active CN113807560B (en) 2021-01-19 2021-01-19 Logistics cost prediction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113807560B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117670169A (en) * 2024-02-03 2024-03-08 北京中冷物流股份有限公司 Cold chain transportation intelligent management planning method and system based on internet of things data
CN117952566A (en) * 2024-03-25 2024-04-30 南京审计大学 Project cost prediction method and computer system based on ridge regression machine learning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140088865A1 (en) * 2012-09-27 2014-03-27 Siemens Industry, Inc. Apparatus and method for predicting arrival times in a transportation network
CN109978470A (en) * 2019-04-03 2019-07-05 深圳威狮物流网络科技有限公司 A kind of logistics information determines method, apparatus, equipment and medium
CN110309947A (en) * 2019-05-09 2019-10-08 上汽安吉物流股份有限公司 Complete vehicle logistics order forecast method and device, logistics system and computer-readable medium
CN110853349A (en) * 2019-10-24 2020-02-28 杭州飞步科技有限公司 Vehicle scheduling method, device and equipment
CN111401650A (en) * 2020-03-23 2020-07-10 深圳市海格物流股份有限公司 Client order access management method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140088865A1 (en) * 2012-09-27 2014-03-27 Siemens Industry, Inc. Apparatus and method for predicting arrival times in a transportation network
CN109978470A (en) * 2019-04-03 2019-07-05 深圳威狮物流网络科技有限公司 A kind of logistics information determines method, apparatus, equipment and medium
CN110309947A (en) * 2019-05-09 2019-10-08 上汽安吉物流股份有限公司 Complete vehicle logistics order forecast method and device, logistics system and computer-readable medium
CN110853349A (en) * 2019-10-24 2020-02-28 杭州飞步科技有限公司 Vehicle scheduling method, device and equipment
CN111401650A (en) * 2020-03-23 2020-07-10 深圳市海格物流股份有限公司 Client order access management method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
UDAY VENKATADRI; KASINADHUNI SHYAMA KRISHNA; M. ALI ÜLKÜ;: "On Physical Internet Logistics: Modeling the Impact of Consolidation on Transportation and Inventory Costs", IEEE TRANSACTIONS ON AUTOMATION SCIENCE AND ENGINEERING, pages 1517 *
方启稳;朱安定;傅培华;: "数据驱动的公路货运合同物流投标报价模型", 物流技术, no. 02, pages 53 - 59 *
方毅;: "标准法规车型分类差异对卡车客户需求特性的影响", 专用汽车, pages 39 - 45 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117670169A (en) * 2024-02-03 2024-03-08 北京中冷物流股份有限公司 Cold chain transportation intelligent management planning method and system based on internet of things data
CN117952566A (en) * 2024-03-25 2024-04-30 南京审计大学 Project cost prediction method and computer system based on ridge regression machine learning

Also Published As

Publication number Publication date
CN113807560B (en) 2023-11-07

Similar Documents

Publication Publication Date Title
US9726502B2 (en) Route planner for transportation systems
CN111507667B (en) Order distribution method and server applied to short-distance logistics
CN109543909B (en) Method and device for predicting number of vehicle cases and computer equipment
CN110738523B (en) Maintenance order quantity prediction method and device
CN105389975A (en) Chauffeured car scheduling method and apparatus
CN113807560A (en) Logistics cost prediction method and device, electronic equipment and storage medium
CN104599002B (en) Method and equipment for predicting order value
CN105117790A (en) Fare estimating method and apparatus
CN105632222A (en) Method and system for predicting station arrival time
CN109308538B (en) Method and device for predicting transaction conversion rate
CN111738484B (en) Method and device for selecting address of bus stop and computer readable storage medium
CN112418524A (en) Method, device, equipment and storage medium for predicting available state of charging station
CN114298559A (en) Battery swapping method of battery swapping station, battery swapping management platform and storage medium
CN114547128A (en) False order identification method, false order identification system, computer equipment and storage medium
CN111815096A (en) Shared automobile delivery method, electronic device and storage medium
CN108416619B (en) Consumption interval time prediction method and device and readable storage medium
CN105203120A (en) Navigation route detecting and evaluating method and device
CN111754147A (en) Road division method, system, device and computer readable storage medium
CN114036411A (en) Route planning method, device, equipment and medium
CN111383055B (en) Method, device and equipment for selecting car renting center bin and computer readable storage medium
CN115829237A (en) Method, device, equipment, medium and product for moving transportation means
CN105303246A (en) Multiline arrival time prediction for public transportation
CN115689245A (en) Method and device for determining rider&#39;s saddle bill quantity in different scenes
CN111489171B (en) Riding travel matching method and device based on two-dimensional code, electronic equipment and medium
CN111832599B (en) Gas station prediction method based on machine learning random forest

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant