A method, system, device and readable storage medium for determining the number of turnover boxes
Through the combination of deep reinforcement learning and multi-objective genetic algorithms, the problems of insufficient real-time data utilization and difficulty in multi-objective optimization in the traditional turnover box quantity determination method are solved, real-time optimization of turnover box requirements and significant improvement in logistics management efficiency are achieved.
Patent Information
- Application Number
- CN202411556602.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-04
AI Technical Summary
The traditional method of determining the quantity of turnover boxes lacks full utilization of real-time data, and cannot promptly reflect changes in order status and delivery status, resulting in lag and inaccurate prediction results, and it is difficult to find the best balance point in multi-objective optimization.
By collecting information related to turnover boxes, preprocessing data, defining order status and delivery status, using deep reinforcement learning algorithms to build a turnover box prediction model, outputting the initial turnover box adjustment plan, and using a multi-objective genetic algorithm to generate a variety of turnover box allocation plans. Combining transportation costs, distribution time and turnover box utilization, the optimal turnover box adjustment plan is selected.
Real-time and accurate prediction and optimization of the demand for turnover boxes is achieved, and the best balance point is found in multi-objective optimization, which significantly improves the efficiency and resource utilization of logistics management.
Smart Images

Figure CN119047956B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of logistics management, and in particular to a method, system, device and readable storage medium for determining the number of turnover boxes. Background Art
[0002] In modern logistics management, the determination of the number of turnover boxes is a key issue, which directly affects transportation costs, distribution efficiency and resource utilization. The traditional method of determining the number of turnover boxes mainly relies on experience judgment and simple statistical analysis. This method seems to be inadequate in the face of complex and changing logistics environments. In recent years, with the development of big data and artificial intelligence technology, more and more research and applications have begun to try to use advanced algorithms and technologies to optimize the determination of the number of turnover boxes. For example, statistical models based on historical data, linear programming methods and heuristic algorithms have improved the accuracy and efficiency of the determination of the number of turnover boxes to a certain extent. However, these methods still have some limitations, especially when dealing with large-scale and highly dynamic logistics scenarios. It is difficult to accurately predict and optimize the demand for turnover boxes in real time;
[0003] The existing methods for determining the number of turnover boxes mainly face the following problems: First, traditional methods lack full utilization of real-time data and cannot reflect changes in order status and delivery status in a timely manner, resulting in delayed and inaccurate prediction results. Second, existing methods usually only consider a single goal, such as minimizing transportation costs or maximizing turnover box utilization, while ignoring the importance of multi-objective optimization, which may lead to resource waste or inefficient distribution in practical applications. In addition, traditional optimization methods often rely on static data and fixed parameters and cannot adapt to the dynamically changing logistics environment, resulting in poor robustness and generalization of the model. These problems limit the application effect of existing methods in actual logistics management. There is an urgent need for a smarter and more flexible method to solve the problem of determining the number of turnover boxes. Summary of the invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a method, system, device and readable storage medium for determining the number of turnover boxes to solve the problem that traditional methods lack full utilization of real-time data, cannot timely reflect changes in order status and delivery status, and lead to lag and inaccuracy in prediction results.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention provides a method for determining the number of turnover boxes, which comprises:
[0008] Collect information related to turnover boxes and pre-process the collected data;
[0009] Based on the preprocessed data, define the order status and delivery status, perform feature extraction based on the order status and delivery status, and obtain the order status vector and delivery status vector;
[0010] Build a turnover box prediction model based on deep reinforcement learning algorithm, input the order state vector and delivery state vector into the turnover box prediction model, and output the initial turnover box adjustment plan;
[0011] Based on the initial turnover box adjustment plan, a multi-objective genetic algorithm is used to randomly generate multiple turnover box allocation plans, and the optimal turnover box adjustment plan is screened out by combining transportation cost, delivery time and turnover box utilization rate.
[0012] As a preferred solution of the method for determining the number of turnover boxes of the present invention, the collection of turnover box related information includes:
[0013] Collect customer order information through the order platform;
[0014] Obtain real-time traffic data and weather data through API interface;
[0015] Obtain information about the type of turnover boxes and the number of currently available turnover boxes from the distribution center;
[0016] Store the collected information in a NoSQL database.
[0017] As a preferred solution of the method for determining the number of turnover boxes of the present invention, wherein: the order status and delivery status are defined based on the pre-processed data, and the specific steps are:
[0018] Use SQL query statements to extract the quantity, type, creation time, estimated delivery time, and delivery address of each order from the order database to obtain order features;
[0019] Combine all order features into an order status vector;
[0020] Obtain the current road congestion, traffic flow, estimated travel time, temperature, humidity, and rainfall probability to obtain delivery characteristics;
[0021] Combine all delivery features into a delivery state vector.
[0022] As a preferred solution of the method for determining the number of turnover boxes of the present invention, the turnover box prediction model is constructed based on the deep reinforcement learning algorithm, specifically,
[0023] Assume that there are N types of turnover boxes and M number of turnover boxes of each type. Integrate the action space according to the types of turnover boxes and the number of each type. A ;
[0024] The deep Q network DQN is selected as the turnover box prediction model architecture, which includes an input layer, a hidden layer, and an output layer;
[0025] The input layer receives the order state vector and the delivery state vector;
[0026] The hidden layer uses a multi-layer fully connected neural network and uses ReLU as the activation function;
[0027] The output layer outputs the value function of each action.
[0028] As a preferred solution of the method for determining the number of turnover boxes of the present invention, wherein: the order state vector and the delivery state vector are input into the turnover box prediction model, and the initial turnover box adjustment plan is output, the specific steps are:
[0029] The order status vector S o and the delivery state vector S d As the input of the turnover box prediction model, the output action value function Q ( S o ,S d ,A ), the expression is:
[0030]
[0031] in, S o represents the order status vector, S d represents the delivery state vector, d o represents the number of order status features, A represents the action space, q,u and l Represents an index variable, Φ q ( S o ) represents the order status vector S o No. q features, exp represents the exponential function, α represents the attenuation factor, h q Indicates q The value of the time feature, dd represents the number of delivery status features, Ψ u ( S d ) indicates the delivery status S d No. u features, log represents the natural logarithmic function, γ represents the weight of the delivery status feature, p u Indicates the delivery status u Sub-characteristics, R represents the number of action space features, g l ( A ) indicates an action A No. l Features
[0032] When the order status vector S o and the delivery state vector S d After input into the turnover box prediction model, the turnover box prediction model will output multiple actions according to the current state A , each action represents a turnover box adjustment plan.
[0033] As a preferred solution of the method for determining the number of turnover boxes of the present invention, wherein: the method randomly generates multiple turnover box allocation plans using a multi-objective genetic algorithm according to the initial turnover box adjustment plan, and the specific steps are as follows:
[0034] Adjust the initial turnover box plan A * as part of the initial population;
[0035] Use a multi-objective genetic algorithm to randomly generate multiple turnover box allocation schemes, each of which is represented by a vector A;
[0036] Obtain the unit transportation cost of each type of turnover box from the distribution center. According to each turnover box allocation plan A, calculate the number of each type of turnover boxes multiplied by the corresponding unit transportation cost, and then sum them up to obtain the total transportation cost;
[0037] Get the average delivery time of each type of turnover box from real-time traffic data and historical data. For each turnover box allocation plan, calculate the number of each type of turnover box multiplied by the corresponding average delivery time, and then sum them up to get the total delivery time.
[0038] Obtain the utilization rate of each type of turnover box from historical data. For each turnover box allocation plan A, calculate the number of each type of turnover boxes multiplied by the corresponding utilization rate, then sum them up and divide them by the total number of turnover boxes to obtain the overall turnover box utilization rate.
[0039] As a preferred solution of the method for determining the number of turnover boxes of the present invention, the optimal turnover box adjustment solution is selected by combining transportation cost, delivery time and turnover box utilization rate. The specific steps are as follows:
[0040] Standardize transportation costs, delivery times, and box utilization;
[0041] According to actual needs, set the weights of transportation cost, delivery time and turnover box utilization rate, add the transportation cost, delivery time and turnover box utilization rate according to the weights, and get the comprehensive fitness value of each plan;
[0042] According to the comprehensive fitness value, the roulette wheel selection method is used to select some individuals, the fitness value of each individual is calculated, the fitness value of all individuals is normalized, the probability of each individual being selected is obtained, and some individuals are randomly selected to enter the next generation according to the probability;
[0043] Perform crossover operation on the selected individuals to generate new individuals;
[0044] Perform mutation operations on the newly generated individuals;
[0045] Set a maximum number of iterations;
[0046] Calculate the fitness value of each individual in the final population, and select the individual with the highest fitness value as the optimal turnover box adjustment plan.
[0047] In a second aspect, the present invention provides a system for determining the number of turnover boxes, including a collection module, a feature extraction module, a prediction module, an optimization module and an application module.
[0048] The collection module is responsible for collecting and preprocessing all data related to the turnover box;
[0049] The feature extraction module is responsible for defining the order status and delivery status based on the preprocessed data and extracting relevant features;
[0050] The prediction module is responsible for building a turnover box prediction model based on the deep reinforcement learning algorithm and outputting the initial turnover box adjustment plan;
[0051] The optimization module is responsible for generating multiple turnover box allocation plans using a multi-objective genetic algorithm, and screening out the optimal turnover box adjustment plan based on transportation cost, delivery time and turnover box utilization rate;
[0052] The application module is responsible for outputting the optimal turnover box adjustment plan and applying it to actual logistics operations.
[0053] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the method for determining the number of turnover boxes as described in the first aspect of the present invention is implemented.
[0054] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the method for determining the number of turnover boxes as described in the first aspect of the present invention is implemented.
[0055] The beneficial effects of the present invention are as follows: the present invention collects and pre-processes information related to turnover boxes, defines order status and delivery status, and then uses a deep reinforcement learning algorithm to build a turnover box prediction model, outputs an initial turnover box adjustment plan, and on this basis, uses a multi-objective genetic algorithm to generate a variety of turnover box allocation plans, and combines transportation costs, delivery time and turnover box utilization to screen out the optimal turnover box adjustment plan. The present invention can not only accurately predict and optimize the demand for turnover boxes in real time, but also find the best balance point in multi-objective optimization, significantly improving the efficiency of logistics management and resource utilization. The present invention belongs to the field of logistics management and optimization technology, and is particularly suitable for large-scale, highly dynamic logistics scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0057] Figure 1 This is a flow chart of the method for determining the number of turnover boxes in Example 1.
[0058] Figure 2 This is a flow chart of the comprehensive status in Example 1. DETAILED DESCRIPTION
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0060] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0061] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0062] Example 1, reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, and provides a method for determining the number of turnover boxes, comprising the following steps:
[0063] S1 collects information related to turnover boxes and pre-processes the collected data;
[0064] Specifically, the order information of customers is collected through the order platform, and the order information includes but is not limited to: order quantity, item type, order time, delivery address and item weight;
[0065] Obtain real-time traffic data through API interfaces, including road congestion, traffic flow and estimated travel time;
[0066] Get real-time weather data including temperature, humidity and rainfall probability through API interface;
[0067] Obtain information about the types of turnover boxes from the distribution center, including the turnover boxes of different specifications and their maximum loads;
[0068] Obtain the current number of available containers from the distribution center, including the number of each type of container;
[0069] Store the collected turnover box information in the NoSQL database;
[0070] Furthermore, the collected data are preprocessed, including removing invalid data and standardizing them.
[0071] It should be noted that this step ensures the accuracy and effectiveness of subsequent modeling. The customer order information collected through the order platform is not limited to the order quantity, item type, order time, delivery address and item weight. This information provides a direct basis for the demand for turnover boxes. At the same time, the real-time traffic data and weather data obtained through the API interface are of great significance for predicting possible delays in the delivery process. In addition, obtaining the type information of turnover boxes and their maximum load, as well as the number of turnover boxes currently available from the distribution center, can ensure that the proposed turnover box allocation plan not only meets actual needs but is also feasible. The collected information is stored in the NoSQL database, which is convenient for efficient management and query of large amounts of unstructured data. Preprocessing the data, such as removing invalid data and standardizing it, can improve data quality and reduce the impact of noise on model training, thereby improving the accuracy and robustness of the prediction model.
[0072] S2 defines the order status and delivery status based on the preprocessed data, extracts features based on the order status and delivery status, and obtains the order status vector and delivery status vector;
[0073] Specifically, the preprocessed data is set as the original data, and all category data are extracted from the original data;
[0074] For categorical data without a sequential relationship, that is, the item type conversion and delivery address, one-hot encoding is used to create a binary column for each category, each category is converted into an independent binary column, the artificial sequential relationship is eliminated, the original data is converted into a one-hot encoding matrix, and the one-hot encoding matrix is merged with other features of the original data to form a new data set. The feature expression after one-hot encoding is:
[0075]
[0076] in:
[0077]
[0078] in, X ij Indicates i The sample in j One-hot encoded values on categories, X in Indicates i Samples n The coded values on the categories, X Represents the original categorical feature. The original categorical feature has n categories, which are c 1 ,c 2 ,...,c n, n Indicates the total number of categories of items and delivery addresses. X i Indicates i The category value of samples, c j Indicates j categories, i and j is the index variable;
[0079] For categorical data with a sequential relationship, i.e., order time, label encoding is used to assign a unique integer label to each category, convert each category into a unique integer label, retain the sequential relationship between categories, replace the category values in the original data with the corresponding integer labels, and merge the label-encoded data with other features of the original data to form a new data set. The feature expression after label encoding is:
[0080]
[0081] in, Y i Indicates i The label encoding value of each sample, f Represents a mapping function, which is used to transform categories c j Map to integer k;
[0082] Furthermore, SQL query statements are used to extract the quantity, type, creation time, estimated delivery time, and delivery address of each order from the order database to obtain order features;
[0083] Combine all order features into an order status vector, order status S o The expression is:
[0084]
[0085] Among them, Q 1 ,Q 2 ,...,Q m , represents the quantity of various items in each order, m Indicates the number of item types. X i1 , X i2 ,...,X in , represents the unique hot encoding value of the item type and delivery address, n Indicates the total number of categories of items and delivery addresses. Tcreate The tag encoding value indicating the creation time of the order. T delivery The label encoding value indicating the estimated delivery time of the order. A A one-hot encoded value representing the shipping address of the order, W 1 ,W 2 ,...,W p Indicates the weight of each item, p Indicates the number of item types;
[0086] It should be noted that the tag encoding value of the order creation time T create , the calculation formula is:
[0087]
[0088] in, f Represents a mapping function, which is used to transform categories c j Map to integer k;
[0089] The label code value of the estimated delivery time of the order T delivery , the calculation formula is:
[0090]
[0091] One-hot encoded value of the order's shipping address PS , the expression is:
[0092]
[0093] in, A q Indicates q Delivery address, q Indicates the number of categories of delivery addresses;
[0094] Then, the real-time traffic API provided by Baidu Map API, a map service provider, is used to obtain the current road congestion, traffic flow, estimated travel time, temperature, humidity, and rainfall probability to obtain the delivery characteristics;
[0095] All delivery features are combined into a delivery state vector, delivery state S d The expression is:
[0096]
[0097] in, C Indicates road congestion.F Indicates the traffic flow, T est , Indicates the estimated travel time. T temp , Indicates temperature, H Indicates humidity, R represents the probability of rainfall;
[0098] S3 builds a turnover box prediction model based on a deep reinforcement learning algorithm, inputs the order state vector and the delivery state vector into the deep reinforcement learning model, and outputs the initial turnover box adjustment plan;
[0099] Specifically, set the types of turnover boxes to N, the number of turnover boxes of each type to M, and integrate the action space according to the types of turnover boxes and the number of each type A , the expression is:
[0100]
[0101] in, a 1 ,a 2 ,...,a N Indicates the number of turnover boxes of each type, N Indicates the number of turnover box types;
[0102] The size of the action space is M N , because there are M options for the number of turnover boxes of each type;
[0103] The deep Q network DQN is selected as the turnover box prediction model architecture, which includes an input layer, a hidden layer, and an output layer;
[0104] The input layer receives the order state vector and the delivery state vector;
[0105] The hidden layer uses a multi-layer fully connected neural network with 3 hidden layers. ReLU is used as the activation function. The number of neurons in each layer can be adjusted according to the actual situation.
[0106] The output layer outputs the value function of each action;
[0107] The order status vector S o and the delivery state vector S d As the input of the turnover box prediction model, the output action value function Q ( S o ,Sd ,A ), the expression is:
[0108]
[0109] in, S o represents the order status vector, S d represents the delivery state vector, d o represents the number of order status features, A represents the action space, q,u and l Represents an index variable, Φ q ( S o ) represents the order status vector S o No. q features, exp represents the exponential function, α represents the attenuation factor, h q Indicates q The value of the time feature, d d represents the number of delivery status features, Ψ u ( S d ) indicates the delivery status S d No. u features, log represents the natural logarithmic function, γ represents the weight of the delivery status feature, p u Indicates the delivery status u Sub-characteristics, R represents the number of action space features, g l ( A ) indicates an action A No. l Features
[0110] Furthermore, according to the action value function Q ( S o ,S d ,A ), select the action A* with the highest value as the initial turnover box adjustment plan, the expression is:
[0111]
[0112] in,A * represents the optimal action, i.e. the initial turnover box adjustment plan, represents the action that finds the maximum value in the action space
[0113] When the order status vector S o and the delivery state vector S d After input into the turnover box prediction model, the turnover box prediction model will output multiple actions according to the current state A , each action represents a turnover box adjustment plan;
[0114] It should be noted that in the process of generating the turnover box adjustment plan, the present invention uses reasonable action space definition, order state vector S o and the delivery state vector S d The construction of the action value function and the selection of the optimal action effectively solve the problems existing in the traditional methods and improve the flexibility, adaptability, decision-making accuracy and efficiency of the model. The application of these technologies not only improves the intelligent level of turnover box adjustment, but also provides important technical support for achieving efficient logistics distribution.
[0115] S4 uses a multi-objective genetic algorithm to randomly generate multiple turnover box allocation plans based on the initial turnover box adjustment plan, and selects the optimal turnover box adjustment plan based on transportation cost, delivery time and turnover box utilization rate;
[0116] Specifically, the initial turnover box adjustment plan A * As part of the initial population, the initial solution is obtained by maximizing the action value function, that is, choosing Q ( S o ,S d ,A ) action A with the largest value;
[0117] Use a multi-objective genetic algorithm to randomly generate multiple turnover box allocation schemes, each of which is represented by a vector A;
[0118] Obtain the unit transportation cost of each type of turnover box from the distribution center. According to each turnover box allocation plan A, calculate the number of each type of turnover boxes multiplied by the corresponding unit transportation cost, and then sum them up to obtain the total transportation cost;
[0119] Get the average delivery time of each type of turnover box from real-time traffic data and historical data. For each turnover box allocation plan, calculate the number of each type of turnover box multiplied by the corresponding average delivery time, and then sum them up to get the total delivery time.
[0120] Obtain the utilization rate of each type of turnover box from historical data. For each turnover box allocation plan A, calculate the number of each type of turnover boxes multiplied by the corresponding utilization rate, then sum them up and divide them by the total number of turnover boxes to obtain the overall turnover box utilization rate.
[0121] The three indicators of transportation cost, delivery time and turnover box utilization rate are converted to the same scale using minimum-maximum standardization. After standardization, for transportation cost and delivery time, the standardized value is subtracted from 1;
[0122] According to actual needs, the weights of transportation cost, delivery time and turnover box utilization are set, recorded as β1, β2 and β3 respectively, and the transportation cost, delivery time and turnover box utilization are added according to the weights to obtain the comprehensive fitness value of each plan;
[0123] Furthermore, a roulette wheel selection method is used to select some individuals according to the comprehensive fitness value, the fitness value of each individual is calculated, the fitness values of all individuals are normalized, the probability of each individual being selected is obtained, and some individuals are randomly selected to enter the next generation according to the probability. Individuals with higher fitness values have a greater probability of being selected.
[0124] Perform a crossover operation on the selected individuals to generate new individuals. The crossover operation can be achieved through single-point crossover or multi-point crossover;
[0125] Perform mutation operations on newly generated individuals to increase the diversity of the population. The mutation operation can be achieved by randomly changing the values of certain positions.
[0126] Set a maximum number of iterations;
[0127] After each iteration, check the change of fitness value. If the change of fitness value is very small after several consecutive iterations, it is considered that the fitness value has converged and the algorithm can be terminated early.
[0128] Finally, the fitness value of each individual in the final population is calculated, and the individual with the highest fitness value is selected as the optimal turnover box adjustment plan;
[0129] The present invention has significant innovation and practicality in multi-objective optimization, population selection, crossover and mutation operations. These key steps not only solve the limitations of traditional single-objective optimization methods, but also achieve the optimization of turnover box allocation through the effective combination of multi-objective genetic algorithm and deep reinforcement learning, thereby significantly improving the efficiency and economy of the logistics system.
[0130] This embodiment also provides a turnover box quantity determination system, including: a collection module, a feature extraction module, a prediction module, an optimization module and an application module.
[0131] The collection module is responsible for collecting and preprocessing all data related to the turnover box;
[0132] The feature extraction module is responsible for defining the order status and delivery status based on the preprocessed data and extracting relevant features;
[0133] The prediction module is responsible for building a turnover box prediction model based on the deep reinforcement learning algorithm and outputting the initial turnover box adjustment plan;
[0134] The optimization module is responsible for generating multiple turnover box allocation plans using a multi-objective genetic algorithm, and screening out the optimal turnover box adjustment plan based on transportation cost, delivery time and turnover box utilization rate;
[0135] The application module is responsible for outputting the optimal turnover box adjustment plan and applying it to actual logistics operations.
[0136] This embodiment also provides a computer device, which is applicable to the method for determining the number of turnover boxes, and includes: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the method for determining the number of turnover boxes proposed in the above embodiment.
[0137] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0138] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for determining the number of turnover boxes proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination of them, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0139] In summary, the present invention collects and preprocesses information related to turnover boxes, defines order status and delivery status, and then uses a deep reinforcement learning algorithm to build a turnover box prediction model, outputs an initial turnover box adjustment plan, and on this basis, uses a multi-objective genetic algorithm to generate a variety of turnover box allocation plans, and combines transportation costs, delivery time and turnover box utilization to screen out the optimal turnover box adjustment plan. The present invention can not only accurately predict and optimize the demand for turnover boxes in real time, but also find the best balance point in multi-objective optimization, which significantly improves the efficiency of logistics management and resource utilization. The present invention belongs to the field of logistics management and optimization technology, and is particularly suitable for large-scale, highly dynamic logistics scenarios.
[0140] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for determining the number of turnover boxes, characterized in that: include, Collect information related to turnover boxes and pre-process the collected data; Based on the preprocessed data, define the order status and delivery status, perform feature extraction based on the order status and delivery status, and obtain the order status vector and delivery status vector; Build a turnover box prediction model based on deep reinforcement learning algorithm, input the order state vector and delivery state vector into the turnover box prediction model, and output the initial turnover box adjustment plan; Based on the initial turnover box adjustment plan, a multi-objective genetic algorithm is used to randomly generate multiple turnover box allocation plans, and the optimal turnover box adjustment plan is screened out by combining transportation cost, delivery time and turnover box utilization rate; The collection of relevant information about turnover boxes includes: Collect customer order information through the order platform; Obtain real-time traffic data and weather data through API interface; Obtain information about the type of turnover boxes and the number of currently available turnover boxes from the distribution center; Store the collected information in a NoSQL database; The order state vector and the delivery state vector are input into the turnover box prediction model, and the initial turnover box adjustment plan is output. The specific steps are: The order status vector S o and the delivery state vector S d As the input of the turnover box prediction model, the output action value function Q (S o, S d, A) , the expression is: in, S o represents the order status vector, S d represents the delivery state vector, d o represents the number of order status features, A represents the action space, q、u and l Represents an index variable, Φ q ( S o ) represents the order status vector S o No. q features, exp represents the exponential function, α represents the attenuation factor, h q Indicates q The value of the time feature, d d represents the number of delivery status features, Ψ u ( S d ) indicates the delivery status S d No. u features, log represents the natural logarithmic function, γ represents the weight of the delivery status feature, p u Indicates the delivery status u Sub-characteristics, R represents the number of action space features, g l ( A ) indicates an action A No. l Features When the order status vector S o and the delivery state vector S d After input into the turnover box prediction model, the turnover box prediction model will output multiple actions according to the current state A , each action represents a turnover box adjustment plan.
2. The method for determining the number of turnover boxes according to claim 1, characterized in that: The order status and delivery status are defined based on the pre-processed data. The specific steps are: Use SQL query statements to extract the quantity, type, creation time, estimated delivery time, and delivery address of each order from the order database to obtain order features; Combine all order features into an order status vector; Obtain the current road congestion, traffic flow, estimated travel time, temperature, humidity, and rainfall probability to obtain delivery characteristics; Combine all delivery features into a delivery state vector.
3. The method for determining the number of turnover boxes according to claim 2, characterized in that: The turnover box prediction model is constructed based on the deep reinforcement learning algorithm, specifically, Assume that there are N types of turnover boxes and M number of turnover boxes of each type. Integrate the action space according to the types of turnover boxes and the number of each type. A ; The deep Q network DQN is selected as the turnover box prediction model architecture, which includes an input layer, a hidden layer, and an output layer; The input layer receives the order state vector and the delivery state vector; The hidden layer uses a multi-layer fully connected neural network and uses ReLU as the activation function; The output layer outputs the value function of each action.
4. The method for determining the number of turnover boxes according to claim 3, characterized in that: The method uses a multi-objective genetic algorithm to randomly generate multiple turnover box allocation plans based on the initial turnover box adjustment plan, and the specific steps are: Adjust the initial turnover box plan A * As part of the initial population; Use a multi-objective genetic algorithm to randomly generate multiple turnover box allocation schemes, each of which is represented by a vector A; Obtain the unit transportation cost of each type of turnover box from the distribution center. According to each turnover box allocation plan A, calculate the number of each type of turnover boxes multiplied by the corresponding unit transportation cost, and then sum them up to obtain the total transportation cost; The average delivery time of each type of turnover box is obtained from real-time traffic data and historical data. For each turnover box allocation plan, the number of each type of turnover box is calculated and multiplied by the corresponding average delivery time, and then the sum is calculated to obtain the total delivery time; The utilization rate of each type of turnover box is obtained from historical data. For each turnover box allocation plan A, the number of each type of turnover boxes is calculated and multiplied by the corresponding utilization rate. Then the sum is calculated and divided by the total number of turnover boxes to obtain the overall turnover box utilization rate.
5. The method for determining the number of turnover boxes according to claim 4, characterized in that: The optimal turnover box adjustment plan is screened out by combining transportation cost, delivery time, turnover box utilization rate, and the specific steps are: Standardize transportation costs, delivery times, and box utilization; According to actual needs, set the weights of transportation cost, delivery time and turnover box utilization rate, add the transportation cost, delivery time and turnover box utilization rate according to the weights, and get the comprehensive fitness value of each plan; According to the comprehensive fitness value, the roulette wheel selection method is used to select some individuals, the fitness value of each individual is calculated, the fitness value of all individuals is normalized, the probability of each individual being selected is obtained, and some individuals are randomly selected to enter the next generation according to the probability; Perform crossover operation on the selected individuals to generate new individuals; Perform mutation operations on the newly generated individuals; Set a maximum number of iterations; Calculate the fitness value of each individual in the final population, and select the individual with the highest fitness value as the optimal turnover box adjustment plan.
6. A system for determining the number of turnover boxes, based on the method for determining the number of turnover boxes according to any one of claims 1 to 5, characterized in that: Including collection module, feature extraction module, prediction module, optimization module and application module, The collection module is responsible for collecting and preprocessing all data related to the turnover box; The feature extraction module is responsible for defining the order status and delivery status based on the preprocessed data and extracting relevant features; The prediction module is responsible for building a turnover box prediction model based on the deep reinforcement learning algorithm and outputting the initial turnover box adjustment plan; The optimization module is responsible for generating multiple turnover box allocation plans using a multi-objective genetic algorithm, and screening out the optimal turnover box adjustment plan based on transportation cost, delivery time and turnover box utilization rate; The application module is responsible for outputting the optimal turnover box adjustment plan and applying it to actual logistics operations.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for determining the number of turnover boxes described in any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for determining the number of turnover boxes described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Transfer box configuration method and system
CN109902977A
Logistics order analysis method, apparatus and device, and storage medium
CN117952397A