A method and system for optimizing cargo transportation of combined fleet based on data processing
Through the graph neural network model and improved genetic algorithm, the problem of difficult to comprehensively consider cargo characteristics, ship capacity and complex transportation constraints in the prior art is solved, and a more efficient and low-cost cargo matching and distribution scheme optimization is achieved.
Patent Information
- Application Number
- CN202510099576.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2045-01-22
AI Technical Summary
The existing technology is difficult to comprehensively consider cargo characteristics, ship capacity and complex transportation constraints, resulting in unreasonable resource allocation and high cost.
A combined fleet cargo transportation optimization method based on data processing is adopted to construct a cargo-ship matching prediction model through a graph neural network model, and the allocation scheme is optimized using improved genetic algorithms.
It improves the accuracy and applicability of the prediction of matching goods and ships, effectively prevents the genetic algorithm from falling into local optimization in the early stage, significantly enhances the global search capability of the optimization algorithm, and reduces transportation costs.
Smart Images

Figure CN119539656B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of cargo transportation optimization, and in particular relates to a combined fleet cargo transportation optimization method and system based on data processing. Background Art
[0002] With the rapid development of global trade and the growing demand for shipping, fleet cargo transportation has become an important part of international logistics. However, the current problems in fleet transportation management, such as inefficiency, waste of resources and high costs, have seriously restricted the development of the industry. Specifically, in complex transportation scenarios where multiple types of goods (such as cold chain goods, dangerous goods and ordinary bulk cargoes) are combined with multiple types of ships (such as large container ships, cold chain transport ships, and multi-purpose ships), the traditional method of allocating goods and ships is difficult to meet the requirements of modern logistics for high efficiency, low cost and green environmental protection.
[0003] The existing transportation scheduling system mainly relies on manual experience or simple rule algorithms to match goods with ships. This approach has obvious shortcomings: first, it cannot comprehensively consider the characteristics of various goods and the differences in ship capacity, resulting in irrational resource allocation and increased transportation costs, such as the demand for temperature control of cold chain goods or the special safety requirements of dangerous goods; second, in the face of complex transportation constraints (such as port berth restrictions, weather changes, etc.) and dynamic demand changes, traditional methods lack real-time adjustment capabilities and are difficult to respond to emergencies in a timely manner. Summary of the invention
[0004] The present invention provides a combined fleet cargo transportation optimization method and system based on data processing, which solves the technical problem that the related technology cannot comprehensively consider cargo characteristics, ship capacity and complex transportation constraints, resulting in unreasonable resource allocation and high costs.
[0005] The present invention provides a combined fleet cargo transportation optimization method and system based on data processing, comprising the following steps:
[0006] S101, collecting cargo characteristic data of M types of cargo and ship characteristic data of N types of ships, and representing them through first characteristic data and second characteristic data respectively, wherein the cargo characteristic data includes: cargo type, cargo volume, target distance and transportation time limit, and the ship characteristic data includes: cargo hold volume, unit operating cost and maximum speed, wherein M and N are custom parameters;
[0007] S102, preprocessing the first feature data and the second feature data to obtain third feature data, fourth feature data and fifth feature data;
[0008] S103, constructing a matching degree prediction model according to the improved graph neural network model, wherein the input of the matching degree prediction model is a cargo-vessel bipartite graph, and the output is the matching degree of M types of cargo for N types of vessels;
[0009] The cargo-vessel bipartite graph structure includes: cargo nodes, vessel nodes, edges, initial features of cargo nodes, initial features of vessel nodes, and initial features of edges; wherein the edges represent the initial relationship between cargo and vessel, the initial features of edges are the fifth feature data, and the initial features of cargo nodes and vessel nodes are represented by the third feature data and the fourth feature data, respectively;
[0010] S104, optimizing the allocation plan according to the improved genetic algorithm to obtain the optimal allocation plan, wherein the objective function of the improved genetic algorithm is constructed according to the matching degree prediction model, and the allocation plan represents allocating M types of cargo to N types of ships.
[0011] Furthermore, cargo types include ordinary cargo and special cargo. The cargo type is represented by binary coding, that is, ordinary cargo is represented by 0 and special cargo is represented by 1, and the coding representation of the cargo type is used as the priority representation of the cargo. The destination port is represented by a one-hot coding, and the unit operating cost represents the operating cost of the ship per unit distance. The operating cost of the ship is the product of the unit operating cost and the target distance.
[0012] Further, the first characteristic data and the second characteristic data are preprocessed to obtain the third characteristic data, the fourth characteristic data and the fifth characteristic data, and the specific steps include:
[0013] S201, through 3 The principle detects outliers in the first feature data and the second feature data, and replaces the outliers with the average value;
[0014] S202, using a maximum-minimum normalization method to normalize the processed first feature data and the second feature data to obtain third feature data and fourth feature data;
[0015] S203, extracting a volume matching feature according to the third feature data and the fourth feature data, and the calculation formula of the volume matching feature is:
[0016] ,in, represents the volume matching feature, Indicates the volume of cargo. Indicates the cargo hold volume, represents the overload penalty weight coefficient, represents the maximum value function, represents the redundancy utilization weight coefficient;
[0017] S204, extracting the transport time adaptability feature according to the third feature data and the fourth feature data, the transport time adaptability feature is calculated as:
[0018] ,in, represents the transport time adaptation characteristic, represents the time deviation coefficient, Indicates the target distance, Indicates the maximum speed. Indicates the transportation time limit. and Respectively represent the weather impact weight coefficient and the port impact weight coefficient, and They represent weather influence coefficient and port influence coefficient respectively, and c represents overtime penalty index;
[0019] S205, extracting a cost and efficiency balance feature according to the third feature data and the fourth feature data, wherein the calculation formula of the cost and efficiency balance feature is:
[0020] ,in, Represents the cost and efficiency balance characteristics, represents the unit operating cost, Represents the electricity efficiency benchmark coefficient, Indicates the influence coefficient of ship speed on power efficiency, Indicates the cargo priority weight coefficient, A scalar indicating the priority of the cargo. represents the port busyness weight coefficient, represents the port busyness coefficient, b represents the nonlinear adjustment index, Indicates the remaining volume of the vessel. represents the time and distance penalty weight coefficient, Represents a positive value from 0 to 1;
[0021] S206, concatenating the volume matching feature, the transportation time adaptation feature, and the cost and efficiency balance feature, and normalizing the concatenated features to obtain fifth feature data.
[0022] Furthermore, the structure of the matching degree prediction model includes an input layer, a first processing layer, a second processing layer, a third processing layer and an output layer;
[0023] The input layer is used to input the cargo-vessel bipartite graph, wherein the node features of the cargo-vessel bipartite graph include: the third feature data and the fourth feature data, and the edge feature is the fifth feature data;
[0024] The first processing layer is used to update the edge according to the initial features of the two end nodes of the edge and the initial features of the edge to obtain a first updated edge feature;
[0025] The second processing layer is used to update the node according to the first updated edge feature and the initial feature of the node to obtain a second updated node feature;
[0026] The third processing layer is used for updating the edge according to the second updated node features of the two end nodes of the edge and the first updated edge features of the edge to obtain a third updated edge feature;
[0027] The output layer is used to map the third updated edge feature to the matching degree, thereby obtaining the matching degree of M types of cargo for N types of ships;
[0028] The above nodes include: cargo nodes and ship nodes.
[0029] Furthermore, the calculation formula of the first processing layer is:
[0030] ,in, represents the first updated edge feature, represents the linear transformation weight coefficient of the edge, Represents the initial feature of the edge, that is, the fifth feature data, and Respectively represent the initial features of the nodes at both ends of the edge, namely the third feature data and the fourth feature data, represents the first weight matrix, represents the second weight parameter, express Activation function, || represents the concatenation operation, represents point-wise multiplication;
[0031] The calculation formula for the second processing layer is:
[0032] ,in, represents the second updated node feature, represents the linear transformation weight coefficient of the node, represents the initial features of node i, represents the second weight matrix, represents the first updated edge feature of the edge between node i and its neighbor node k, represents the neighbor node set of node i, k represents the index of the neighbor node set of node i, represents the initial features of the neighboring nodes of node i, represents the second bias parameter;
[0033] The calculation formula for the third processing layer is:
[0034] ,in, represents the third updated edge feature, represents the second linear transformation weight coefficient of the edge, represents the third weight matrix, represents the second updated node feature of node j, represents the third bias parameter;
[0035] The above nodes include: cargo nodes and ship nodes.
[0036] Furthermore, the mean square error function is used as the loss function of the matching prediction model built based on the graph neural network model.
[0037] Furthermore, the allocation scheme is optimized according to the improved genetic algorithm to obtain the optimal allocation scheme. The specific steps include:
[0038] S301, generating an initialization population that meets the constraint conditions based on reverse learning and heuristic rules, the initialization population including P individuals, where P is a custom parameter;
[0039] S302, constructing an objective function according to the matching degree prediction model;
[0040] S303, calculating the fitness value of the individuals in the population according to the objective function;
[0041] S304, preliminarily screen out the first U individuals according to the fitness values of the individuals in the population, and randomly select two individuals from the U individuals as parents;
[0042] S305, randomly selecting an allocation row in the allocation matrix of the individual, and exchanging the element values of any two ships therein to satisfy the constraint conditions;
[0043] S306, updating the individuals in the population based on the Cauchy perturbation mutation strategy;
[0044] S307, judging whether the current number of iterations is greater than or equal to the maximum number of iterations, taking the individual with the largest fitness value in the population as the optimal allocation scheme, otherwise returning to S303, where the maximum number of iterations is a custom parameter.
[0045] Furthermore, an initialization population satisfying the constraint conditions is generated based on reverse learning and heuristic rules. The specific steps include:
[0046] S401, randomly generating heuristic individuals based on heuristic rules, the heuristic rules including: giving priority to allocating goods of special goods type; allocating goods based on the transportation cost optimal rule;
[0047] S402, generating a reverse individual for each heuristic individual according to a reverse learning formula;
[0048] S403, combining the heuristic individuals and their reverse individuals to obtain an initialized population.
[0049] Furthermore, the calculation formula of the objective function is:
[0050] ;
[0051] in, represents the fitness value of the individual, M and N represent the number of types of cargo and ships, respectively, and m and n represent the indexes of the types of cargo and ships, respectively. It represents the matching degree between the m-th cargo and the n-th ship obtained by the matching degree prediction model. Represents the indicator function. Specifically, when the value of the element in the mth row and nth column of the allocation matrix is greater than 0, the value of the indicator function is 1, otherwise the value of the indicator function is 0. Represents the element value of the mth row and nth column of the allocation matrix.
[0052] The present invention provides a combined fleet cargo transportation optimization system based on data processing, comprising:
[0053] A data collection module, used to collect cargo characteristic data of M types of cargo and ship characteristic data of N types of ships, and respectively represent them through first characteristic data and second characteristic data, wherein the cargo characteristic data includes: cargo type, cargo volume, target distance and transportation time limit, and the ship characteristic data includes: cargo hold volume, unit operating cost and maximum speed, wherein M and N are custom parameters;
[0054] A preprocessing module, used for preprocessing the first characteristic data and the second characteristic data to obtain third characteristic data, fourth characteristic data and fifth characteristic data;
[0055] A matching degree prediction module is used to construct a matching degree prediction model based on the improved graph neural network model. The input of the matching degree prediction model is a cargo-vessel bipartite graph, and the output is the matching degree of M types of cargo for N types of vessels.
[0056] The cargo-vessel bipartite graph structure includes: cargo nodes, vessel nodes, edges, initial features of cargo nodes, initial features of vessel nodes, and initial features of edges; wherein the edges represent the initial relationship between cargo and vessel, the initial features of edges are the fifth feature data, and the initial features of cargo nodes and vessel nodes are represented by the third feature data and the fourth feature data, respectively;
[0057] The allocation scheme optimization module is used to optimize the allocation scheme according to the improved genetic algorithm to obtain the optimal allocation scheme, wherein the objective function of the improved genetic algorithm is constructed according to the matching degree prediction model, and the allocation scheme represents allocating M types of cargo to N types of ships.
[0058] The beneficial effects of the present invention are as follows: Based on the improved graph neural network model, the present invention constructs a cargo-vessel bipartite graph structure, which fully captures the high-order interactive relationship between edges and nodes. The model dynamically updates the matching degree by processing the features of edges and nodes in multiple layers, thereby improving the accuracy and applicability of cargo-vessel matching prediction;
[0059] The genetic algorithm of the present invention generates symmetric solutions through reverse learning, and constructs high-quality individuals in combination with heuristic rules. The initial population covers a wider search space, effectively avoiding the genetic algorithm from falling into local optimality in the early stage, and providing more possible solutions for complex scenarios.
[0060] The genetic algorithm of the present invention utilizes the long-tail characteristic of the Cauchy distribution, combines mutation operation with a constraint repair mechanism, generates mutation solutions with larger disturbance values, improves population diversity, escapes from local optimality, and significantly enhances the global search capability of the optimization algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a flow chart of a combined fleet cargo transportation optimization method based on data processing of the present invention. DETAILED DESCRIPTION
[0062] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the contents of this specification. Each example may omit, replace or add various processes or components as needed. In addition, the features described relative to some examples may also be combined in other examples.
[0063] like Figure 1 As shown, a combined fleet cargo transportation optimization method based on data processing includes the following steps:
[0064] S101, collecting cargo characteristic data of M types of cargo and ship characteristic data of N types of ships, and representing them through first characteristic data and second characteristic data respectively, wherein the cargo characteristic data includes: cargo type, cargo volume, target distance and transportation time limit, and the ship characteristic data includes: cargo hold volume, unit operating cost and maximum speed, wherein M and N are custom parameters;
[0065] S102, preprocessing the first feature data and the second feature data to obtain third feature data, fourth feature data and fifth feature data;
[0066] S103, constructing a matching degree prediction model according to the improved graph neural network model, wherein the input of the matching degree prediction model is a cargo-vessel bipartite graph, and the output is the matching degree of M types of cargo for N types of vessels, wherein the matching degree represents a numerical quantitative indicator for measuring the degree of adaptation or matching relationship between cargo and vessel, and reflects the ability of specific cargo and specific vessel to efficiently collaborate to complete the transportation task under constraints such as transportation time limit, transportation cost, and cargo hold volume;
[0067] The cargo-vessel bipartite graph structure includes: cargo nodes, vessel nodes, edges, initial features of cargo nodes, initial features of vessel nodes, and initial features of edges; wherein the edges represent the initial relationship between cargo and vessel, the initial features of edges are the fifth feature data, and the initial features of cargo nodes and vessel nodes are represented by the third feature data and the fourth feature data, respectively;
[0068] S104, optimizing the allocation plan according to the improved genetic algorithm to obtain the optimal allocation plan, wherein the objective function of the improved genetic algorithm is constructed according to the matching degree prediction model, and the allocation plan represents allocating M types of cargo to N types of ships.
[0069] In one embodiment of the present invention, the cargo types include ordinary cargo and special cargo. For example, cold chain cargo, dangerous goods and other cargo are special cargo. The cargo type is represented by binary coding, that is, ordinary cargo is represented by 0 and special cargo is represented by 1. The coding representation of the cargo type is used as the priority representation of the cargo. The destination port is represented by a unique hot coding. The unit operating cost represents the operating cost of the ship per unit distance. For example, using nautical miles as the unit of measurement, the unit operating cost represents the operating cost required for the ship to travel each nautical mile. The operating cost of the ship is the product of the unit operating cost and the target distance.
[0070] In one embodiment of the present invention, the first feature data and the second feature data are preprocessed to obtain the third feature data, the fourth feature data and the fifth feature data. The specific steps include:
[0071] S201, through 3 The principle is to detect the outliers in the first feature data and the second feature data, and replace the outliers with the average value. Specifically, the mean and standard deviation of the features in the first feature data and the second feature data are calculated, and the normal data range is determined as: , detect outliers outside the range, replace the detected outliers with the average value to ensure the stability and accuracy of the data, where is the mean, is the standard deviation;
[0072] S202, using a maximum-minimum normalization method to normalize the processed first feature data and the second feature data to obtain third feature data and fourth feature data;
[0073] S203, extracting a volume matching feature according to the third feature data and the fourth feature data, and the calculation formula of the volume matching feature is:
[0074] ,in, represents the volume matching feature, Indicates the volume of cargo. Indicates the cargo hold volume, represents the overload penalty weight coefficient, represents the maximum value function, represents the redundancy utilization weight coefficient;
[0075] S204, extracting the transport time adaptability feature according to the third feature data and the fourth feature data, the transport time adaptability feature is calculated as:
[0076] ,in, represents the transport time adaptation characteristic, represents the time deviation coefficient, Indicates the target distance, Indicates the maximum speed. Indicates the transportation time limit. and Respectively represent the weather impact weight coefficient and the port impact weight coefficient, and They represent the weather impact coefficient and the port impact coefficient respectively. The weather impact coefficient indicates the degree of obstruction of transportation by storms and bad weather. The port impact coefficient indicates the impact of port congestion or unloading efficiency on time. c represents the overtime penalty index, which is used to adjust the penalty intensity.
[0077] S205, extracting a cost and efficiency balance feature according to the third feature data and the fourth feature data, wherein the calculation formula of the cost and efficiency balance feature is:
[0078] ,in, Represents the cost and efficiency balance characteristics, represents the unit operating cost, Represents the electricity efficiency benchmark coefficient, Indicates the influence coefficient of ship speed on power efficiency, Indicates the cargo priority weight coefficient. The priority of special cargo such as cold chain cargo and dangerous goods will increase this weight. Indicates the cargo priority scalar, 0 for normal cargo and 1 for special cargo. represents the port busyness weight coefficient, represents the port busyness coefficient, b represents the nonlinear adjustment index, Indicates the remaining volume of the vessel. represents the time and distance penalty weight coefficient, Represents a positive value between 0 and 1, usually ;
[0079] S206, concatenating the volume matching feature, the transportation time adaptation feature, and the cost and efficiency balance feature, and normalizing the concatenated features to obtain fifth feature data.
[0080] In one embodiment of the present invention, the structure of the matching degree prediction model includes an input layer, a first processing layer, a second processing layer, a third processing layer and an output layer;
[0081] The input layer is used to input the cargo-vessel bipartite graph, wherein the node features of the cargo-vessel bipartite graph include: the third feature data and the fourth feature data, and the edge feature is the fifth feature data;
[0082] The first processing layer is used to update the edge according to the initial features of the two end nodes of the edge and the initial features of the edge to obtain a first updated edge feature;
[0083] The second processing layer is used to update the node according to the first updated edge feature and the initial feature of the node to obtain a second updated node feature;
[0084] The third processing layer is used for updating the edge according to the second updated node features of the two end nodes of the edge and the first updated edge features of the edge to obtain a third updated edge feature;
[0085] The output layer is used to map the third update edge feature to the matching degree, so as to obtain the matching degree of M kinds of cargo for N kinds of ships. Specifically, the third update edge feature is normalized to obtain the matching degree;
[0086] The above nodes include: cargo nodes and ship nodes.
[0087] The matching prediction model fully captures the high-order interaction relationship between edges and nodes through three processes: first updating the edges, then updating the nodes, and finally updating the edges again. When the edges are updated for the first time, the direct relationship between cargo and ships is captured. After the nodes are updated, the neighborhood and global information are integrated. Finally, the edge features are updated again, which can dynamically adjust the matching degree or assign weights on the edges, thereby improving the accuracy and flexibility of the prediction.
[0088] In one embodiment of the present invention, the calculation formula of the first processing layer is:
[0089] ,in, represents the first updated edge feature, represents the linear transformation weight coefficient of the edge, Represents the initial feature of the edge, that is, the fifth feature data, and Respectively represent the initial features of the nodes at both ends of the edge, namely the third feature data and the fourth feature data, represents the first weight matrix, represents the second weight parameter, express Activation function, || represents the concatenation operation, represents point-wise multiplication;
[0090] The calculation formula for the second processing layer is:
[0091] ,in, represents the second updated node feature, represents the linear transformation weight coefficient of the node, represents the initial features of node i, represents the second weight matrix, represents the first updated edge feature of the edge between node i and its neighbor node k, represents the neighbor node set of node i, k represents the index of the neighbor node set of node i, represents the initial features of the neighboring nodes of node i, represents the second bias parameter;
[0092] The calculation formula for the third processing layer is:
[0093] ,in, represents the third updated edge feature, represents the second linear transformation weight coefficient of the edge, represents the third weight matrix, represents the second updated node feature of node j, represents the third bias parameter;
[0094] The above nodes include: cargo nodes and ship nodes.
[0095] In one embodiment of the present invention, a mean square error function is used as a loss function of a matching prediction model constructed based on a graph neural network model, and training samples and sample labels of the matching prediction model are manually annotated by experts.
[0096] In one embodiment of the present invention, the allocation scheme is optimized according to the improved genetic algorithm to obtain the optimal allocation scheme, and the specific steps include:
[0097] S301, generating an initialization population that meets the constraint conditions based on reverse learning and heuristic rules, the initialization population including P individuals, where P is a custom parameter;
[0098] The individuals in the initialized population represent the allocation scheme, and the individuals are encoded by the allocation matrix, which is expressed as: ,in They represent the quantity of cargo from the 1st cargo to the Mth cargo assigned to the 1st vessel, They represent the quantity of cargo of the first type of cargo allocated to the first type of ship to the Nth type of ship, respectively. It represents the quantity of cargo of the Mth cargo assigned to the Nth cargo ship. The element value of the allocation matrix represents the quantity of cargo of this cargo assigned to this cargo ship. For example, , indicating that the quantity of the third type of cargo assigned to the fourth type of ship is 5, , indicating that the third type of cargo is not allocated to the fifth type of vessel;
[0099] The constraints include:
[0100] Cargo category restrictions: certain goods can only be transported by certain vessels, for example, cold chain goods can only be transported by refrigerated vessels;
[0101] Cargo allocation restriction constraint: Each cargo can only be transported by three types of ships at most;
[0102] Total cargo constraint: The sum of the quantity of each cargo assigned to each ship is equal to the quantity of that cargo. For the allocation matrix, The sum of the element values is equal to the quantity of the first type of goods;
[0103] S302, constructing an objective function according to the matching degree prediction model;
[0104] S303, calculating the fitness value of the individuals in the population according to the objective function;
[0105] S304, preliminarily screen out the first U individuals according to the fitness values of the individuals in the population, and randomly select two individuals from the U individuals as parents, preferably, U is set to 15;
[0106] S305, randomly selecting an allocation row in the allocation matrix of the individual, and exchanging the element values of any two ships therein to satisfy the constraint conditions;
[0107] S306, updating the individuals in the population based on the Cauchy perturbation mutation strategy. Specifically, randomly selecting V individuals in the population, updating any element in each row of the V individuals based on the Cauchy perturbation strategy, and then repairing the individuals according to the constraints. More specifically, the calculation formula for the update is: ,in, represents the updated value of the element in the rth row and sth column of the individual's allocation matrix, Represents the value of the element in the rth row and sth column of the individual's allocation matrix, represents the disturbance coefficient, represents the standard Cauchy distribution, Represents the disturbance value; repairing the individual according to the constraint conditions means that after updating the individual, if the updated individual does not meet the constraint conditions, the individual needs to be repaired. The repair strategy is: based on the constraint conditions, adjust the other elements of each row in the allocation matrix with the same disturbance value to rebalance the total amount in the row to ensure that the constraint conditions are met. For example, for the total amount of goods constraint, it is necessary to ensure that the sum of the elements in each row of the matrix remains unchanged;
[0108] This update method based on the Cauchy perturbation mutation strategy has the significant advantage of enhancing global search capabilities. Due to the long-tail characteristics of the Cauchy distribution, the mutation operation can generate a large perturbation value, thereby guiding the population out of the local optimum. At the same time, combined with the constraint repair mechanism, it ensures that the generated solution meets the feasibility requirements of the problem. By randomly selecting individuals and updating local perturbations, the population diversity is further improved, providing more exploration directions and higher-quality initial conditions for subsequent optimization;
[0109] S307, judging that the current number of iterations is greater than or equal to the maximum number of iterations, taking the individual with the largest fitness value in the population as the optimal allocation scheme, otherwise returning to S303, wherein the maximum number of iterations is a custom parameter, preferably, the maximum number of iterations is set to 200.
[0110] In one embodiment of the present invention, an initialization population satisfying constraint conditions is generated based on reverse learning and heuristic rules, and the specific steps include:
[0111] S401, randomly generate heuristic individuals based on heuristic rules, the heuristic rules include: preferentially allocating cargoes of special cargo type; allocating cargoes based on the optimal transportation cost rule, specifically, calculating the unit transportation cost according to the unit operating cost and the target distance, and for each cargo, preferentially selecting the vessel with the lowest unit transportation cost, and the calculation formula of the unit transportation cost is: ,in, represents the unit transportation cost;
[0112] S402, for each heuristic individual, a reverse individual is generated according to a reverse learning formula, where the reverse learning formula is: ,in, The reverse value of the element in the dth row and fth column of the allocation matrix encoding of the individual, represents the quantity of the dth type of goods, The value of the element in the dth row and fth column of the allocation matrix encoding the individual;
[0113] S403, combining the heuristic individuals and their reverse individuals to obtain an initialized population.
[0114] In one embodiment of the present invention, by combining reverse learning and heuristic rules, the population initialization not only includes high-quality heuristic individuals, but also generates symmetric individuals through reverse learning, which further expands the search space of individuals. The diversified population structure can effectively prevent the genetic algorithm from falling into local optimality in the early stage, and provide more exploration directions for subsequent iterations.
[0115] In one embodiment of the present invention, the calculation formula of the objective function is:
[0116] ;
[0117] in, represents the fitness value of the individual, M and N represent the number of types of cargo and ships, respectively, and m and n represent the indexes of the types of cargo and ships, respectively. It represents the matching degree between the m-th cargo and the n-th ship obtained by the matching degree prediction model. Represents the indicator function. Specifically, when the value of the element in the mth row and nth column of the allocation matrix is greater than 0, the value of the indicator function is 1, otherwise the value of the indicator function is 0. Represents the element value of the mth row and nth column of the allocation matrix.
[0118] In one embodiment of the present invention, a combined fleet cargo transportation optimization system based on data processing is also provided, comprising:
[0119] A preprocessing module, used for preprocessing the first characteristic data and the second characteristic data to obtain third characteristic data, fourth characteristic data and fifth characteristic data;
[0120] The matching degree prediction module is used to construct a matching degree prediction model based on the improved graph neural network model. The input of the matching degree prediction model is the cargo-vessel bipartite graph, and the output is the matching degree of M types of cargo for N types of ships. The matching degree is a numerical quantitative indicator that measures the degree of adaptation or matching relationship between cargo and ship, and reflects the ability of specific cargo and specific ship to efficiently collaborate to complete the transportation task under the constraints of transportation time limit, transportation cost, cargo hold volume, etc.
[0121] The cargo-vessel bipartite graph structure includes: cargo nodes, vessel nodes, edges, initial features of cargo nodes, initial features of vessel nodes, and initial features of edges; wherein the edges represent the initial relationship between cargo and vessel, the initial features of edges are the fifth feature data, and the initial features of cargo nodes and vessel nodes are represented by the third feature data and the fourth feature data, respectively;
[0122] The allocation scheme optimization module is used to optimize the allocation scheme according to the improved genetic algorithm to obtain the optimal allocation scheme, wherein the objective function of the improved genetic algorithm is constructed according to the matching degree prediction model, and the allocation scheme represents allocating M types of cargo to N types of ships.
[0123] The above describes an embodiment of the present embodiment, but the present embodiment is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present embodiment, ordinary technicians in this field can also make many forms, all of which are within the protection of the present embodiment.
Claims
1. A method for optimizing cargo transportation of a combined fleet based on data processing, characterized in that: The following steps are involved: S101, collecting cargo characteristic data of M types of cargo and ship characteristic data of N types of ships, and representing them through first characteristic data and second characteristic data respectively, wherein the cargo characteristic data includes: cargo type, cargo volume, target distance and transportation time limit, and the ship characteristic data includes: cargo hold volume, unit operating cost and maximum speed, wherein M and N are custom parameters; S102, preprocessing the first feature data and the second feature data to obtain third feature data, fourth feature data and fifth feature data; S103, constructing a matching degree prediction model according to the improved graph neural network model, wherein the input of the matching degree prediction model is a cargo-vessel bipartite graph, and the output is the matching degree of M types of cargo for N types of vessels; The cargo-vessel bipartite graph structure includes: cargo nodes, vessel nodes, edges, initial features of cargo nodes, initial features of vessel nodes, and initial features of edges; wherein the edges represent the initial relationship between cargo and vessel, the initial features of edges are the fifth feature data, and the initial features of cargo nodes and vessel nodes are represented by the third feature data and the fourth feature data, respectively; S104, optimizing the allocation plan according to the improved genetic algorithm to obtain the optimal allocation plan, wherein the objective function of the improved genetic algorithm is constructed according to the matching degree prediction model, and the allocation plan represents allocating M types of cargo to N types of ships.
2. The method for optimizing combined fleet cargo transportation based on data processing according to claim 1 is characterized in that: Cargo types include ordinary cargo and special cargo. The cargo type is represented by binary code, that is, ordinary cargo is represented by 0 and special cargo is represented by 1. The coding representation of the cargo type is used as the priority representation of the cargo. The destination port is represented by one-hot coding. The unit operating cost represents the operating cost of the ship per unit distance. The operating cost of the ship is the product of the unit operating cost and the target distance.
3. The method for optimizing combined fleet cargo transportation based on data processing according to claim 1, characterized in that: Preprocessing the first characteristic data and the second characteristic data to obtain the third characteristic data, the fourth characteristic data and the fifth characteristic data includes: S201, through 3 The principle detects outliers in the first feature data and the second feature data, and replaces the outliers with the average value; S202, using a maximum-minimum normalization method to normalize the processed first feature data and the second feature data to obtain third feature data and fourth feature data; S203, extracting a volume matching feature according to the third feature data and the fourth feature data, and the calculation formula of the volume matching feature is: ,in, represents the volume matching feature, Indicates the volume of cargo. Indicates the cargo hold volume, represents the overload penalty weight coefficient, represents the maximum value function, represents the redundancy utilization weight coefficient; S204, extracting the transport time adaptability feature according to the third feature data and the fourth feature data, the calculation formula of the transport time adaptability feature is: ,in, represents the transport time adaptation characteristic, represents the time deviation coefficient, Indicates the target distance, Indicates the maximum speed. Indicates the transportation time limit. and Respectively represent the weather impact weight coefficient and the port impact weight coefficient, and They represent weather influence coefficient and port influence coefficient respectively, and c represents overtime penalty index; S205, extracting a cost and efficiency balance feature according to the third feature data and the fourth feature data, wherein the calculation formula of the cost and efficiency balance feature is: ,in, Represents the cost and efficiency balance characteristics, represents the unit operating cost, Represents the electricity efficiency benchmark coefficient, Indicates the influence coefficient of ship speed on power efficiency, Indicates the cargo priority weight coefficient, A scalar indicating the priority of the cargo. represents the port busyness weight coefficient, represents the port busyness coefficient, b represents the nonlinear adjustment index, Indicates the remaining volume of the vessel. represents the time and distance penalty weight coefficient, Represents a positive value between 0 and 1; S206, concatenating the volume matching feature, the transportation time adaptation feature, and the cost and efficiency balance feature, and normalizing the concatenated features to obtain fifth feature data.
4. The method for optimizing combined fleet cargo transportation based on data processing according to claim 1, characterized in that: The structure of the matching prediction model includes an input layer, a first processing layer, a second processing layer, a third processing layer and an output layer; The input layer is used to input the cargo-vessel bipartite graph, wherein the node features of the cargo-vessel bipartite graph include: the third feature data and the fourth feature data, and the edge feature is the fifth feature data; The first processing layer is used to update the edge according to the initial features of the two end nodes of the edge and the initial features of the edge to obtain a first updated edge feature; The second processing layer is used to update the node according to the first updated edge feature and the initial feature of the node to obtain a second updated node feature; The third processing layer is used for updating the edge according to the second updated node features of the two end nodes of the edge and the first updated edge features of the edge to obtain a third updated edge feature; The output layer is used to map the third updated edge feature to the matching degree, thereby obtaining the matching degree of M types of cargo for N types of ships; The above nodes include: cargo nodes and ship nodes.
5. The method for optimizing combined fleet cargo transportation based on data processing according to claim 4 is characterized in that: The calculation formula for the first processing layer is: ,in, represents the first updated edge feature, represents the linear transformation weight coefficient of the edge, Represents the initial feature of the edge, that is, the fifth feature data, and Respectively represent the initial features of the nodes at both ends of the edge, namely the third feature data and the fourth feature data, represents the first weight matrix, represents the second weight parameter, express Activation function, || represents the concatenation operation, represents point-wise multiplication; The calculation formula for the second processing layer is: ,in, represents the second updated node feature, represents the linear transformation weight coefficient of the node, represents the initial features of node i, represents the second weight matrix, represents the first updated edge feature of the edge between node i and its neighbor node k, represents the neighbor node set of node i, k represents the index of the neighbor node set of node i, represents the initial features of the neighboring nodes of node i, represents the second bias parameter; The calculation formula for the third processing layer is: ,in, represents the third updated edge feature, represents the second linear transformation weight coefficient of the edge, represents the third weight matrix, represents the second updated node feature of node j, represents the third bias parameter; The above nodes include: cargo nodes and ship nodes.
6. The method for optimizing cargo transportation of a combined fleet based on data processing according to claim 1, characterized in that: The mean square error function is used as the loss function of the matching degree prediction model built based on the graph neural network model.
7. The method for optimizing combined fleet cargo transportation based on data processing according to claim 1 is characterized in that: The allocation scheme is optimized according to the improved genetic algorithm to obtain the optimal allocation scheme. The specific steps include: S301, generating an initialization population that meets the constraint conditions based on reverse learning and heuristic rules, the initialization population including P individuals, where P is a custom parameter; S302, constructing an objective function according to the matching degree prediction model; S303, calculating the fitness value of the individuals in the population according to the objective function; S304, preliminarily screen out the first U individuals according to the fitness values of the individuals in the population, and randomly select two individuals from the U individuals as parents; S305, randomly selecting an allocation row in the allocation matrix of the individual, and exchanging the element values of any two ships therein to satisfy the constraint conditions; S306, updating the individuals in the population based on the Cauchy perturbation mutation strategy; S307, judging whether the current number of iterations is greater than or equal to the maximum number of iterations, taking the individual with the largest fitness value in the population as the optimal allocation scheme, otherwise returning to S303, where the maximum number of iterations is a custom parameter.
8. The method for optimizing combined fleet cargo transportation based on data processing according to claim 7 is characterized in that: Generate an initial population that meets the constraints based on reverse learning and heuristic rules. The specific steps include: S401, randomly generating heuristic individuals based on heuristic rules, the heuristic rules including: giving priority to allocating goods of special goods type; allocating goods based on the transportation cost optimal rule; S402, generating a reverse individual for each heuristic individual according to a reverse learning formula; S403, combining the heuristic individuals and their reverse individuals to obtain an initialized population.
9. The method for optimizing cargo transportation of a combined fleet based on data processing according to claim 7, characterized in that: The calculation formula of the objective function is: ; in, represents the fitness value of the individual, M and N represent the number of types of cargo and ships, respectively, and m and n represent the indexes of the types of cargo and ships, respectively. It represents the matching degree between the mth cargo and the nth ship obtained by the matching degree prediction model. Represents the indicator function. Specifically, when the value of the element in the mth row and nth column of the allocation matrix is greater than 0, the value of the indicator function is 1, otherwise the value of the indicator function is 0. Represents the element value of the mth row and nth column of the allocation matrix.
10. A combined fleet cargo transportation optimization system based on data processing, characterized in that: A method for optimizing combined fleet cargo transportation based on data processing as claimed in any one of claims 1 to 9 is adopted, comprising: A data collection module, used to collect cargo characteristic data of M types of cargo and ship characteristic data of N types of ships, and respectively represent them through first characteristic data and second characteristic data, wherein the cargo characteristic data includes: cargo type, cargo volume, target distance and transportation time limit, and the ship characteristic data includes: cargo hold volume, unit operating cost and maximum speed, wherein M and N are custom parameters; A preprocessing module, used for preprocessing the first characteristic data and the second characteristic data to obtain third characteristic data, fourth characteristic data and fifth characteristic data; A matching degree prediction module is used to construct a matching degree prediction model based on the improved graph neural network model. The input of the matching degree prediction model is a cargo-vessel bipartite graph, and the output is the matching degree of M types of cargo for N types of vessels. The cargo-vessel bipartite graph structure includes: cargo nodes, vessel nodes, edges, initial features of cargo nodes, initial features of vessel nodes, and initial features of edges; wherein the edges represent the initial relationship between cargo and vessel, the initial features of edges are the fifth feature data, and the initial features of cargo nodes and vessel nodes are represented by the third feature data and the fourth feature data, respectively; The allocation scheme optimization module is used to optimize the allocation scheme according to the improved genetic algorithm to obtain the optimal allocation scheme, wherein the objective function of the improved genetic algorithm is constructed according to the matching degree prediction model, and the allocation scheme represents allocating M types of cargo to N types of ships.
Citation Information
Patent Citations
Ship and cargo bilateral matching method based on improved HFW-AGA algorithm
CN116703267A
Intelligent logistics transportation vehicle scheduling method and system
CN117541026A