A railway transportation pricing method, device and equipment based on graph neural network
Through the railway transportation pricing method based on graph neural network, combined with genetic algorithms and volume prediction models, the problem of insufficient static and linearity of pricing models in the existing technology is solved, and dynamic optimization of railway freight pricing is achieved to maximize the overall benefits of railway freight business.
Patent Information
- Application Number
- CN202411845333.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The existing technology mainly relies on qualitative research and static linear or power function models in terms of railway transportation pricing, ignoring the time and space correlation of demand, resulting in the optimization results that do not meet actual market demand and cannot maximize the overall benefits of railway freight business.
The railway transportation pricing method based on graph neural network is adopted, and the population of the genetic algorithm is initialized by obtaining historical freight time series data, and combining the preset freight prediction model and objective function, the fitness of each individual is calculated and iteratively optimized until a target pricing plan that meets the set conditions is found.
The precise fit of the dynamic demand function between railway freight pricing and freight volume is achieved, and a global optimization solution model is designed to obtain the optimal railway pricing strategy, maximize the overall benefits of railway freight business, and have strong adaptability and flexibility.
Smart Images

Figure CN119313245B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis technology, and in particular to a railway transportation pricing method, device and equipment based on graph neural network. Background Art
[0002] At present, the research on railway freight rates is mainly based on qualitative research. Combined with the price policies issued by the state, it aims at the existing problems of railway freight rates and provides suggestions for the transition of railway freight from price comparison pricing, floating pricing and other guiding pricing to market-oriented pricing. However, there are few quantitative studies, and most of them are based on annual or quarterly release indicators. From a data-driven perspective, there are few studies based on actual operating data after the railway market reform. Most of the research on railway express pricing is based on the interests of railway transportation enterprises or the overall interests, and an optimization model is established for solution. The model usually assumes that the relationship between railway freight demand and price is in the form of static linear, power function or logit function, ignoring the possible temporal and spatial correlation of demand, which may not be consistent with the actual railway freight transportation market. The final optimization result may not necessarily achieve the maximization of the target interest. Summary of the invention
[0003] The purpose of the present invention is to provide a railway transportation pricing method, device and equipment based on graph neural network to improve the above problems. In order to achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0004] In a first aspect, the present application provides a railway transportation pricing method based on a graph neural network, comprising:
[0005] Obtaining freight rate time series data within a historical time period, and initializing a population of a genetic algorithm based on the freight rate time series data to obtain an initial population, wherein each individual in the population is used to represent a pricing scheme, and the pricing scheme is composed of a plurality of position parameters, and the position parameters correspond to the transportation price at each time node in the pricing scheme;
[0006] Inputting the initial population into a preset traffic volume prediction model to obtain predicted traffic volume;
[0007] Based on the predicted transport volume and in combination with a preset objective function and constraint function, the fitness of each individual in the population is calculated to obtain a plurality of fitness values;
[0008] The initial population is iterated based on multiple fitness values and the genetic operation of the genetic algorithm, and the iterated population is repeatedly input into the traffic prediction model until a target individual that meets the set conditions exists in the initial population, and the position parameter corresponding to the target individual is used as the target pricing scheme.
[0009] In a second aspect, the present application also provides a railway transportation pricing device based on a graph neural network, comprising:
[0010] A first acquisition unit is used to acquire freight rate time series data within a historical time period, and initialize a population of a genetic algorithm based on the freight rate time series data to obtain an initial population, wherein each individual in the population is used to represent a pricing scheme, and the pricing scheme is composed of a plurality of position parameters, and the position parameters correspond to the transportation price at each time node in the pricing scheme;
[0011] A first input unit, used for inputting the initial population into a preset traffic volume prediction model to obtain a predicted traffic volume;
[0012] A first calculation unit, configured to calculate the fitness of each individual in the population based on the predicted transport volume and in combination with a preset objective function and a constraint function, to obtain a plurality of fitness values;
[0013] An iteration unit is used to iterate the initial population based on multiple fitness values and the genetic operation of the genetic algorithm, and repeatedly input the iterated population into the traffic prediction model until a target individual that meets the set conditions exists in the initial population, and the position parameter corresponding to the target individual is used as a target pricing scheme.
[0014] In a third aspect, the present application also provides a railway transportation pricing device based on a graph neural network, comprising:
[0015] Memory for storing computer programs;
[0016] A processor is used to implement the steps of the railway transportation pricing method based on graph neural network when executing the computer program.
[0017] The beneficial effects of the present invention are:
[0018] The present invention accurately fits the dynamic demand function between railway freight pricing and freight volume based on graph neural network, and designs a global optimization solution model in combination with genetic algorithm. Through the solution of this model, the optimal railway pricing strategy can be obtained, thereby maximizing the overall revenue of railway freight business. This method can not only effectively capture the nonlinear changes in market demand, but also has strong adaptability and can be flexibly adjusted under different market conditions.
[0019] Other features and advantages of the present invention will be set forth in the following description, and in part will become apparent from the description, or may be understood by practicing embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 It is a schematic diagram of the flow of the railway transportation pricing method based on graph neural network described in an embodiment of the present invention;
[0022] Figure 2 A schematic diagram of topological structure transformation described in an embodiment of the present invention;
[0023] Figure 3 Schematic diagram of adjacency matrix transformation described in an embodiment of the present invention;
[0024] Figure 4 Schematic diagram of the overall structure of the traffic volume prediction model described in an embodiment of the present invention;
[0025] Figure 5 It is a schematic diagram of the overall process of the railway transportation pricing method based on graph neural network described in an embodiment of the present invention;
[0026] Figure 6 It is a schematic diagram of the structure of a railway transportation pricing device based on a graph neural network described in an embodiment of the present invention;
[0027] Figure 7 It is a schematic diagram of the structure of the railway transportation pricing equipment based on graph neural network described in an embodiment of the present invention.
[0028] Markings in the figure: 10, first acquisition unit; 20, first input unit; 30, first calculation unit; 40, iteration unit; 800, railway transportation pricing equipment based on graph neural network; 801, processor; 802, memory; 803, multimedia component; 804, I / O interface; 805, communication component. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0030] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0031] Embodiment 1:
[0032] This embodiment provides a railway transportation pricing method based on graph neural network.
[0033] See also Figure 1 , the figure shows that the method includes step S10, step S20, step S30 and step S40.
[0034] Step S10. Obtain the freight time series data within the historical time period, and initialize the population of the genetic algorithm based on the freight time series data to obtain an initial population, where each individual in the population is used to represent a pricing scheme, which is composed of multiple position parameters, and the position parameters correspond to the transportation prices at each time node in the pricing scheme;
[0035] Specifically, the population is initialized, and a group of initial individuals are randomly generated as the starting point of the genetic algorithm. The size of the population and the encoding method of the individuals will affect the performance and convergence speed of the algorithm. Real number encoding is used in this application. For example, assuming that the solution is the transportation price of 9 transportation routes in 12 months in 2024, an individual is a 9*12 matrix, and a population of n is an n*9*12 matrix. Usually, the population size is set between 20 and 100.
[0036] In this application, the position of the population individuals corresponds to the transportation price. The transportation price needs to be within the range of the pre-set price upper and lower limits to ensure the rationality of the price and the competitiveness of the market, and to ensure that the pricing plan is within an acceptable range, which can not only ensure the profitability of the transportation company, but also maintain adaptability to market demand.
[0037] Step S20. Input the initial population into a preset traffic volume prediction model to obtain a predicted traffic volume;
[0038] Specifically, considering that the volume of transportation on different railway lines may be affected by various factors, in order to improve the accuracy of the prediction, it is necessary to effectively integrate time series data and external feature data. At the same time, the spatial characteristics of the adjacency relationship of the transportation line also need to be considered to reflect the complex relationship of the existing line network topology. The present invention integrates the existing line network topology based on the graph neural network model to construct a railway volume prediction model. In order to reasonably process the relevant data, the main railway transportation lines are considered as spatial objects, and the express waybill data is summarized in months to reduce the noise and dimension of the time series data.
[0039] Specifically, step S20 specifically includes step S21, step S22, step S23, step S24, step S25, step S26, step S27 and step S28:
[0040] Step S21. Obtain railway transport route data, and construct an adjacency matrix based on the railway transport route data, where the adjacency matrix is used to characterize the connection relationship between railway transport nodes and transport routes;
[0041] Specifically, the transportation volume on any transportation route within a certain period of time is limited, so it is a more reasonable choice to set the prediction target, that is, the transportation route, as an edge. Therefore, it is considered to perform point-to-line conversion on the topological structure corresponding to the railway transportation route data. The point-to-line conversion includes mapping edges to nodes and mapping points to edges to meet the needs of specific prediction targets.
[0042] Specifically, step S21 specifically includes step S211, step S212, step S213, step S214 and step S215:
[0043] Step S211. Map the railway transportation route data into a topological structure to obtain a first connection graph, where the nodes in the first connection graph are transportation nodes, and the edges in the first connection graph are transportation routes;
[0044] Step S212: sequentially number the nodes and edges in the first connection graph to obtain a second connection graph, and record the adjacency of each edge;
[0045] Step S213. Add virtual edges between transport nodes in the second connection graph that are not connected by existing transport routes, and number the virtual edges to obtain a second connection graph;
[0046] Step S214. Determine the shortest route between two transport nodes corresponding to each virtual edge based on a breadth-first search algorithm, and use the transport route through which the shortest route passes as the adjacency of the virtual edge;
[0047] Step S215. Construct an adjacency matrix based on the adjacency situation;
[0048] Specifically, firstly, the railway transportation line data is mapped into a topological structure, in which the nodes in the topological structure are the cities in the railway transportation line data, and the edges in the topological structure are the railway transportation lines. Then determine whether there is a transportation line connection between any two nodes. If there is a transportation line, record the edge corresponding to the transportation line and number it; if there is no transportation line directly connecting any two nodes, establish a new virtual edge and number it. Finally, according to the edge number and the connection between the edges, construct the adjacency matrix between the edges. The non-virtual edge obtains the adjacency by judging whether there are the same nodes between the original two edges. The virtual edge first obtains the path corresponding to the shortest real transportation line in the actual situation through the path search algorithm, and then obtains the edge connection inside and outside the path respectively. The connection inside the path is the real edge that the virtual edge needs to pass through, and the connection outside the path is the same as the non-virtual edge. It should be noted that the virtual edge does not affect the adjacency of other edges. The method of constructing its adjacency matrix refers to the unidirectional graph (that is, the graph with directional edges between nodes). As Figure 2 As shown in FIG. 1 , it is a schematic diagram of the topological structure corresponding to nodes and edges being converted into the topological structure of the connection relationship between edges, such as Figure 3 As shown, Figure 2 The adjacency matrices corresponding to the topological structures in .
[0049] Specifically, building a volume prediction model requires consideration of time series data and city node static data. The time series data mainly includes freight rate time series data, volume time series data and logistics economic index. The logistics economic index includes railway freight rate index, industrial product futures price comprehensive index and logistics prosperity index. Taking into account the high sparsity of freight rate time series data and volume time series data of transportation routes, the previous value filling strategy can be adopted for the missing parts, that is, the missing value is filled with the previous valid value at the location of the missing value; the volume and freight of some non-main transportation routes but the main edges of the network construction nodes are filled with the average value of the entire time period.
[0050] The static data of city nodes are used to characterize indicators related to city economy and scale, mainly including the population of the city at the end of the year, the land area of the administrative area (square kilometers), the GDP (10,000 yuan), the number of large-scale enterprises, etc. Since the topological structure of the original railway transportation line data has been transformed from points to lines, the nodes at this time are the original edges, and an edge connects two nodes, that is, cities. Therefore, the static data part of a node should also include the static data of the city nodes of the two cities on the edge.
[0051] Step S22. Construct a graph neural network based on the adjacency matrix, where the graph neural network includes a gated recurrent unit layer, multiple autoregressive sliding average graph neural network layers, and a fully connected layer;
[0052] Step S23. Obtain time series data and city node static data within a historical time period, where the time series data includes freight rate time series data, freight volume time series data, and logistics economic index, and the city node static data is used to characterize city economy and scale-related indicators;
[0053] Step S24: Input the time series data into the gated recurrent unit layer to extract and aggregate the time features to obtain the time features;
[0054] Step S25. Input the time features and the city node static data into the first autoregressive moving average graph neural network layer and the second autoregressive moving average graph neural network layer respectively for feature aggregation, and obtain the first aggregated features and the second aggregated features respectively;
[0055] Specifically, the actual role played by the above-mentioned GRU (gated recurrent unit layer) and ARMAGNN (autoregressive moving average graph neural network layer) in the traffic volume prediction model constructed in this application is described as follows:
[0056] 1.GRU:
[0057] The Gated Recurrent Unit (GRU) layer contains two gating units: Update Gate and Reset Gate, which are used to control the flow of feature information and enable the network to better handle long-term dependency issues.
[0058] Update gate: controls how the input of the current time step should be integrated into the hidden state of the previous time step. The output of the update gate varies between 0 and 1, which determines the degree to which the hidden state of the previous time step is retained. When the output of the update gate is close to 0, the network ignores the previous hidden state and relies more on the input of the current time step.
[0059] Reset gate: determines how past hidden states should be considered, decides whether to ignore the previous hidden state, and combines the input of the current time step with the previous state to produce the output of the current time step.
[0060] The update gate is expressed as:
[0061] ;
[0062] in, To update the door; is the activation function of the update gate; is the weight matrix of the update gate; is the hidden state of the previous time step; is the input for the current time step.
[0063] The reset gate is represented as:
[0064] ;
[0065] in, To reset the gate; is the activation function of the reset gate; is the weight matrix of the reset gate; is the hidden state of the previous time step; is the input for the current time step.
[0066] The hidden state after the update gate is:
[0067] ;
[0068] ;
[0069] in, is the hidden state of the current time step; is the candidate hidden state of the current time step; is the weight matrix of the candidate hidden state; To reset the gate; is the hidden state of the previous time step; is the input of the current time step; For updating the door.
[0070] The activation functions of the update gate and the reset gate are both s-shaped functions, which allows the model to forget and update information through a gating mechanism. The reset gate is used to control how much information from the previous hidden state can be input into the candidate hidden state, and the update gate is used to control the ratio of the candidate hidden state of the current time step and the hidden state of the previous time step in the final hidden state at the current time step, thereby retaining useful time information as the input of the next layer. Through the control of the update gate and the reset gate, GRU can learn long-term dependencies more effectively while avoiding the gradient disappearance and explosion problems of traditional RNNs.
[0071] 2. ARMAGNN
[0072] ARMAGNN is a hybrid model that combines ARMA (autoregressive moving average model) and GNN (graph neural network), which enables the graph neural network layer to consider the time series information between features and prediction targets during the calculation process, and can capture more comprehensive global structures and longer-term time dependencies.
[0073] The spatial representation of ARMAGNN is:
[0074] (1);
[0075] in, is the output feature matrix; is the identity matrix; and are model parameters; is the Laplacian matrix of the graph; is the neighborhood order; is the input feature matrix;
[0076] The neighborhood order determines how far away the model gets information from neighboring nodes. and are model parameters related to the weights controlling high-order neighborhood aggregation and feature propagation, respectively.
[0077] Furthermore, the above formula (1) can be transformed into the following form:
[0078] (2);
[0079] in, is the output feature matrix; is the identity matrix; and are model parameters; is the Laplacian matrix of the graph; is the neighborhood order; is the input feature matrix;
[0080] The left side of the above formula (2) is equivalent to the MA (moving average) term, and the right side of the equation is equivalent to the AR (autoregressive) term. The introduction of the AR term makes the model robust to noise because Relying on multi-step propagation of node features is crucial for capturing long-term dependencies and global structures.
[0081] Furthermore, formula (1) is rewritten as a recursive fitting formula:
[0082] (3);
[0083] ;
[0084] in, For the The output feature matrix of time steps; and is the fitting coefficient; is the adjustment coefficient of the Laplace matrix of the graph; For the The output feature matrix of time steps; is the input feature matrix; is the upper limit of the eigenvalues of the Laplacian matrix of the graph; is the lower bound of the eigenvalues of the Laplacian matrix of the graph; is the identity matrix; is the Laplacian matrix of the graph.
[0085] By analyzing the convergence properties of the above formula, formula (1) can be further transformed into formula (4):
[0086] (4);
[0087] in, is the output feature matrix; and is the fitting coefficient; is the Laplace matrix adjustment coefficient of the graph; is the output feature matrix of the initial time step; is the input feature matrix; is the time step.
[0088] and have the same eigenvectors, but The eigenvalues of ,in, for Eigenvalues after Laplace matrix eigenvalue transformation; is the eigenvalue of the Laplacian matrix of the graph; is the upper limit of the eigenvalues of the Laplacian matrix of the graph; is the lower bound of the eigenvalues of the Laplacian matrix of the graph.
[0089] The first term in formula (4) is It converges to 0 when , and the latter term is a series, which converges to ,in, and is the fitting coefficient; for Eigenvalues after Laplace matrix eigenvalue transformation.
[0090] The approximate form of the ARMA filter is ,in, is the frequency response of the spectral filter; and is the fitting coefficient; for The eigenvalue after Laplace matrix eigenvalue transformation. Perform Laplace decomposition to obtain the spectrum analysis form of the ARMA filter as shown in formula (5):
[0091] (5);
[0092] in, is the eigenvector of the Laplacian matrix of the graph; is the transpose of the eigenvectors of the Laplacian matrix of the graph; is the output feature matrix; and For the The fitting coefficients of the neighborhood; is the input feature matrix; is the maximum time step; is the neighborhood order.
[0093] Furthermore, the graph convolution form of ARMA is expressed as formula (6):
[0094] (6);
[0095] in, For the The output feature matrix of time steps; is the activation function; is the modified Laplace matrix; is the input feature matrix; For the The output feature matrix of time steps; and is the weight matrix of the model.
[0096] The first The ARMA of the layer is denoted as ARMAK, and formula (1) can finally be expressed as formula (7):
[0097] (7);
[0098] in, is the output feature matrix; is the neighborhood order; is the maximum time step; is the output of the model.
[0099] Step S26. Input the first aggregated feature and the second aggregated feature into the third autoregressive sliding average graph neural network layer for feature fusion to obtain the target feature;
[0100] Step S27: Input the target feature into the fully connected layer for linear transformation and output the traffic volume prediction value;
[0101] Step S28. Calculate the loss function based on the predicted traffic volume and the actual traffic volume in the traffic volume time series data, and adjust the parameters of each layer in the graph neural network based on the calculated value of the loss function until the loss function meets the first set threshold, thereby obtaining a traffic volume prediction model;
[0102] Specifically, the overall structure of the traffic volume prediction model constructed in this application is as follows: Figure 4 As shown in the figure, first, the time series data is aggregated through the GRU (Gated Recurrent Unit) unit to aggregate the time features; then two ARMAGNN (Autoregressive Moving Average Graph Neural Network) layers are used to aggregate the static data of the city nodes and the time-related features learned by the GRU; finally, the outputs of the two ARMAGNNs are connected and input into the ARMAGNN and liner (Linear Fully Connected Layer) in turn, and the output is reshaped through the activation function to match the node railway express freight volume at the predicted time. During the training process, the loss function is used to compare the output of the model with the actual data to obtain the loss error, and the model parameters are updated through the error propagation mechanism.
[0103] Step S30. Based on the predicted transport volume and in combination with the preset objective function and constraint function, the fitness of each individual in the population is calculated to obtain multiple fitness values;
[0104] Specifically, the dynamic demand function based on graph neural network is established as follows:
[0105] ;
[0106] in, For the Transport lines in The transportation price at the time; For the Transport lines in The transport volume at the time, is the dynamic demand function; For the adjacent situation.
[0107] Specifically, step S30 specifically includes step S31, step S32, step S33, step S34 and step S35:
[0108] Step S31. Calculate the transport revenue function based on the predicted transport volume and the location parameters of the initial population;
[0109] Specifically, the transportation revenue function is:
[0110] ;
[0111] in, is the transportation revenue function; For the Transport lines in The transportation price at the time; For the Transport lines in The transport volume at the time; is a collection of transport routes, ; For the transport cycle set, .
[0112] Step S32. Calculate the transportation cost function based on the transportation route length corresponding to the predicted transportation volume, the preset unit railway variable cost, the preset unit railway fixed cost and the predicted transportation volume;
[0113] Specifically, the transportation cost function is:
[0114] ;
[0115] in, is the transportation cost function; is the unit railway variable cost; For the Length of transport routes; For the Transport lines in The transport volume at the time; is the unit railway fixed cost; is a collection of transport routes, ; For the transport cycle set, .
[0116] Step S33. Construct a penalty function based on the operational capacity of the transport nodes and transport routes corresponding to the predicted transport volume;
[0117] Specifically, step S33 specifically includes step S331, step S332, step S333 and step S334:
[0118] Step S331. Calculate the difference between the predicted transportation volume of each transportation route and the preset loading and unloading capacity to obtain multiple first functions;
[0119] Step S332. Sum the first functions corresponding to all transport routes associated with each transport node to obtain a plurality of second functions;
[0120] Step S333. Sum the second function corresponding to each transport node to obtain a third function;
[0121] Step S334. Calculate the product of the second set threshold and the third function to obtain a penalty function;
[0122] Specifically, the penalty function is:
[0123] ;
[0124] in, is the penalty function; For the node Related The operational capacity of the transport routes; For Node operational capabilities; is a node set, ; is a collection of transport routes, .
[0125] The penalty function mainly constrains the nodes that appear in multiple transportation routes. The more the node operating capacity is exceeded, the greater the corresponding penalty function value.
[0126] Step S34. Constructing a fitness function based on the transportation revenue function, the transportation cost function and the penalty function;
[0127] Step S35. Bring the predicted transport volume and the location parameters of the initial population into the fitness function for calculation to obtain the fitness value;
[0128] Specifically, the fitness function is:
[0129] ;
[0130] in, is the transportation revenue function; For the Transport lines in The transportation price at the time; For the Transport lines in The transport volume at the time; is a collection of transport routes, ; For the transport cycle set, ; is the transportation cost function; is the unit railway variable cost; For the Length of transport routes; is the unit railway fixed cost; is the penalty function.
[0131] By combining the predicted volume, transportation revenue, transportation cost and penalty function, a comprehensive fitness function is constructed, which provides an effective evaluation mechanism for optimizing railway transportation pricing. By inputting the location parameters of the initial population and the predicted volume into the fitness function, the economic benefits of different pricing schemes can be accurately evaluated, the balance between transportation revenue and cost can be optimized, and the overall transportation efficiency can be improved under the premise of meeting the operational constraints, ultimately providing valuable decision support for the pricing strategy of railway transportation enterprises.
[0132] Step S40. Iterate the initial population based on multiple fitness values and genetic operations of the genetic algorithm, and repeatedly input the iterated population into the traffic volume prediction model until a target individual that meets the set conditions exists in the initial population, and the position parameter corresponding to the target individual is used as the target pricing scheme;
[0133] Specifically, Figure 5 As shown, this is a flow chart of the present application combining graph neural network and genetic algorithm. The position parameters of the initial population correspond to different transportation pricing schemes, and each individual represents a possible pricing scheme. First, the corresponding transportation volume is predicted according to the pricing scheme of each individual through the volume prediction model; then, the pricing scheme of each individual is substituted into the fitness function to calculate its corresponding fitness value. The fitness value reflects the pros and cons of the pricing scheme. A higher fitness value means that the pricing scheme performs better in terms of increasing transportation revenue, reducing transportation costs and satisfying constraints; finally, according to the fitness value, a selection operation (such as roulette selection, tournament selection, etc.) is used to select better individuals from the current population as parent individuals to enter the next genetic operation, which helps to retain pricing schemes with higher fitness and ensure that the quality of each generation of population gradually improves. When there are individuals in the population that meet the termination conditions, the genetic algorithm stops iterating and outputs the best individual in the current population as the target pricing scheme.
[0134] Embodiment 2:
[0135] like Figure 6 As shown, this embodiment provides a railway transportation pricing device based on a graph neural network, and the device includes:
[0136] The first acquisition unit 10 is used to acquire the freight time series data in the historical time period, and initialize the population of the genetic algorithm based on the freight time series data to obtain an initial population, each individual in the population is used to represent a pricing scheme, the pricing scheme is composed of multiple position parameters, and the position parameters correspond to the transportation price of each time node in the pricing scheme;
[0137] A first input unit 20 is used to input the initial population into a preset traffic volume prediction model to obtain a predicted traffic volume;
[0138] A first calculation unit 30 is used to calculate the fitness of each individual in the population based on the predicted transport volume and in combination with a preset objective function and constraint function to obtain a plurality of fitness values;
[0139] The iteration unit 40 is used to iterate the initial population based on multiple fitness values and genetic operations of the genetic algorithm, and repeatedly input the iterated population into the traffic prediction model until a target individual that meets the set conditions exists in the initial population, and the position parameter corresponding to the target individual is used as the target pricing scheme.
[0140] In a specific implementation disclosed in the present application, the first input unit 20 includes:
[0141] A second acquisition unit is used to acquire railway transportation line data and construct an adjacency matrix based on the railway transportation line data, wherein the adjacency matrix is used to characterize the connection relationship between railway transportation nodes and transportation lines;
[0142] A first construction unit is used to construct a graph neural network based on an adjacency matrix, wherein the graph neural network includes a gated recurrent unit layer, multiple autoregressive sliding average graph neural network layers, and a fully connected layer;
[0143] The third acquisition unit is used to acquire time series data and city node static data within a historical period. The time series data includes freight rate time series data, freight volume time series data and logistics economic index. The city node static data is used to characterize city economy and scale-related indicators.
[0144] Aggregation unit, used to input time series data into the gated recurrent unit layer for time feature extraction and aggregation to obtain time features;
[0145] The second input unit is used to input the time feature and the city node static data into the first autoregressive moving average graph neural network layer and the second autoregressive moving average graph neural network layer for feature aggregation, and obtain the first aggregated feature and the second aggregated feature respectively;
[0146] A third input unit is used to input the first aggregated feature and the second aggregated feature into a third autoregressive sliding average graph neural network layer for feature fusion to obtain a target feature;
[0147] The linear change unit is used to input the target features into the fully connected layer for linear change and output the traffic volume prediction value;
[0148] The second calculation unit is used to calculate the loss function based on the traffic volume prediction value and the actual traffic volume value in the traffic volume time series data, and adjust the parameters of each layer in the graph neural network based on the loss function calculation value until the loss function meets the first set threshold value to obtain the traffic volume prediction model.
[0149] In a specific implementation disclosed in the present application, the first calculation unit 30 includes:
[0150] A third calculation unit is used to calculate a transportation revenue function based on the predicted transportation volume and the location parameters of the initial population;
[0151] A fourth calculation unit, configured to calculate a transportation cost function based on a transportation route length corresponding to the predicted transportation volume, a preset unit railway variable cost, a preset unit railway fixed cost, and the predicted transportation volume;
[0152] The second construction unit is used to construct a penalty function based on the operation capacity of the transportation nodes and transportation routes corresponding to the predicted transportation volume;
[0153] A third construction unit is used to construct a fitness function based on the transportation income function, the transportation cost function and the penalty function;
[0154] The input unit is used to input the predicted volume and the location parameters of the initial population into the fitness function for calculation to obtain the fitness value.
[0155] In a specific embodiment disclosed in the present application, the second building block includes:
[0156] A fifth calculation unit is used to calculate the difference between the predicted transportation volume of each transportation route and the preset loading and unloading operation capacity to obtain a plurality of first functions;
[0157] a sixth calculation unit, configured to sum and calculate the first functions corresponding to all transportation routes related to each transportation node to obtain a plurality of second functions;
[0158] a seventh calculation unit, configured to sum the second function corresponding to each transport node to obtain a third function;
[0159] The eighth calculation unit is used to calculate the product of the second set threshold and the third function to obtain a penalty function.
[0160] In a specific implementation manner disclosed in the present application, the second acquisition unit includes:
[0161] A mapping unit, used to map the railway transportation line data into a topological structure to obtain a first connection graph, wherein the nodes in the first connection graph are transportation nodes, and the edges in the first connection graph are transportation lines;
[0162] The encoding unit is used to sequentially number the nodes and edges in the first connection graph to obtain a second connection graph, and record the adjacency of each edge;
[0163] An adding unit, used for adding virtual edges between transport nodes in the second connection graph that are not connected by existing transport routes, and numbering the virtual edges to obtain a second connection graph;
[0164] As a unit, it is used to determine the shortest route between two transportation nodes corresponding to each virtual edge based on the breadth-first search algorithm, and the transportation route passed by the shortest route is used as the adjacency of the virtual edge;
[0165] The fourth construction unit is used to construct an adjacency matrix based on the adjacency situation.
[0166] It should be noted that, regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0167] Embodiment 3:
[0168] Corresponding to the above method embodiment, a railway transportation pricing device based on a graph neural network is also provided in this embodiment. The railway transportation pricing device based on a graph neural network described below and the railway transportation pricing method based on a graph neural network described above can be referred to each other.
[0169] Figure 7 is a block diagram of a railway transportation pricing device 800 based on a graph neural network according to an exemplary embodiment. Figure 3 As shown, the railway transportation pricing device 800 based on graph neural network may include: a processor 801, a memory 802. The railway transportation pricing device 800 based on graph neural network may also include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.
[0170] The processor 801 is used to control the overall operation of the railway transportation pricing device 800 based on the graph neural network to complete all or part of the steps in the railway transportation pricing method based on the graph neural network. The memory 802 is used to store various types of data to support the operation of the railway transportation pricing device 800 based on the graph neural network. These data may include, for example, instructions for any application or method operating on the railway transportation pricing device 800 based on the graph neural network, as well as application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 802 or sent via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules can be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the railway transportation pricing device 800 based on the graph neural network and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include: Wi-Fi module, Bluetooth module, NFC module.
[0171] In an exemplary embodiment, the railway transportation pricing device 800 based on graph neural network can be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), digital signal processors (Digital Signal Processing Device, referred to as DSP), digital signal processing devices (Digital Signal Processing Device, referred to as DSPD), programmable logic devices (Programmable Logic Device, referred to as PLD), field programmable gate arrays (Field Programmable Gate Array, referred to as FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned railway transportation pricing method based on graph neural network.
[0172] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0173] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A railway transportation pricing method based on graph neural network, characterized in that: include: Obtaining freight rate time series data within a historical time period, and initializing a population of a genetic algorithm based on the freight rate time series data to obtain an initial population, wherein each individual in the population is used to represent a pricing scheme, and the pricing scheme is composed of a plurality of position parameters, and the position parameters correspond to the transportation price at each time node in the pricing scheme; Inputting the initial population into a preset traffic volume prediction model to obtain predicted traffic volume; Based on the predicted transport volume and in combination with a preset objective function and constraint function, the fitness of each individual in the population is calculated to obtain a plurality of fitness values; Iterating the initial population based on multiple fitness values and the genetic operation of the genetic algorithm, repeatedly inputting the iterated population into the traffic volume prediction model until a target individual that meets the set conditions exists in the initial population, and using the position parameter corresponding to the target individual as a target pricing scheme; The initial population is input into a preset traffic volume prediction model to obtain the predicted traffic volume, including: Acquire railway transport route data, and construct an adjacency matrix based on the railway transport route data, wherein the adjacency matrix is used to characterize the connection relationship between railway transport nodes and transport routes; Constructing a graph neural network based on the adjacency matrix, wherein the graph neural network includes a gated recurrent unit layer, a plurality of autoregressive sliding average graph neural network layers and a fully connected layer; Obtaining time series data and city node static data within a historical time period, wherein the time series data includes freight rate time series data, freight volume time series data, and logistics economic index, and the city node static data is used to characterize city economy and scale-related indicators; Inputting the time series data into the gated recurrent unit layer to extract and aggregate time features to obtain time features; Inputting the time feature and the city node static data into the first autoregressive moving average graph neural network layer and the second autoregressive moving average graph neural network layer respectively for feature aggregation, and obtaining the first aggregated feature and the second aggregated feature respectively; Inputting the first aggregated features and the second aggregated features into a third autoregressive sliding average graph neural network layer for feature fusion to obtain target features; Input the target feature into the fully connected layer for linear transformation, and output the traffic volume prediction value; A loss function is calculated based on the predicted traffic volume and the actual traffic volume value in the traffic volume time series data, and the parameters of each layer in the graph neural network are adjusted based on the calculated value of the loss function until the loss function meets a first set threshold, thereby obtaining the traffic volume prediction model.
2. The railway transportation pricing method based on graph neural network according to claim 1 is characterized in that Based on the predicted transport volume and in combination with the preset objective function and constraint function, the fitness of each individual in the population is calculated to obtain multiple fitness values, including: Calculate a transportation revenue function based on the predicted transportation volume and the location parameters of the initial population; Calculate a transportation cost function based on the transportation route length corresponding to the predicted transportation volume, the preset unit railway variable cost, the preset unit railway fixed cost and the predicted transportation volume; Constructing a penalty function based on the loading and unloading operation capacity of the transport nodes and transport routes corresponding to the predicted transport volume; Constructing a fitness function based on the transportation revenue function, the transportation cost function and the penalty function; The predicted traffic volume and the location parameters of the initial population are brought into the fitness function for calculation to obtain the fitness value.
3. The railway transportation pricing method based on graph neural network according to claim 2 is characterized in that ,Based on the loading and unloading capacity of the transport nodes and transport routes corresponding to the predicted transport volume, a penalty function is constructed, including: Calculate the difference between the predicted transportation volume of each transportation route and the preset loading and unloading operation capacity to obtain multiple first functions; Summing up the first functions corresponding to all transportation routes related to each transportation node to obtain a plurality of second functions; The second function corresponding to each transport node is summed up to obtain a third function; The product of the second set threshold and the third function is calculated to obtain the penalty function.
4. The railway transportation pricing method based on graph neural network according to claim 1 is characterized in that , obtain railway transportation line data, and construct an adjacency matrix based on the railway transportation line data, wherein the adjacency matrix is used to characterize the connection relationship between railway transportation nodes and transportation lines, including: Mapping the railway transportation route data into a topological structure to obtain a first connection graph, wherein nodes in the first connection graph are transportation nodes, and edges in the first connection graph are transportation routes; Sequentially numbering the nodes and edges in the first connection graph to obtain a second connection graph, and recording the adjacency of each edge; Adding virtual edges between transport nodes in the second connection graph that are not connected by existing transport routes, and numbering the virtual edges to obtain a second connection graph; Determine the shortest route between two transport nodes corresponding to each virtual edge based on a breadth-first search algorithm, and use the transport route through which the shortest route passes as the adjacency of the virtual edge; The adjacency matrix is constructed based on the adjacency situation.
5. A railway transportation pricing device based on graph neural network, characterized in that: include: A first acquisition unit is used to acquire freight rate time series data within a historical time period, and initialize a population of a genetic algorithm based on the freight rate time series data to obtain an initial population, wherein each individual in the population is used to represent a pricing scheme, and the pricing scheme is composed of a plurality of position parameters, and the position parameters correspond to the transportation price at each time node in the pricing scheme; A first input unit, used for inputting the initial population into a preset traffic volume prediction model to obtain a predicted traffic volume; A first calculation unit, configured to calculate the fitness of each individual in the population based on the predicted transport volume and in combination with a preset objective function and a constraint function, to obtain a plurality of fitness values; an iterative unit, configured to iterate the initial population based on a plurality of fitness values and the genetic operation of the genetic algorithm, and repeatedly input the iterated population into the traffic volume prediction model until a target individual that meets the set conditions exists in the initial population, and the position parameter corresponding to the target individual is used as a target pricing scheme; Wherein, the first input unit comprises: A second acquisition unit is used to acquire railway transportation route data and construct an adjacency matrix based on the railway transportation route data, wherein the adjacency matrix is used to characterize the connection relationship between railway transportation nodes and transportation routes; A first construction unit is used to construct a graph neural network based on the adjacency matrix, wherein the graph neural network includes a gated recurrent unit layer, a plurality of autoregressive sliding average graph neural network layers and a fully connected layer; A third acquisition unit is used to acquire time series data and city node static data within a historical time period, wherein the time series data includes freight rate time series data, freight volume time series data and logistics economic index, and the city node static data is used to characterize city economy and scale-related indicators; An aggregation unit, used for inputting the time series data into the gated recurrent unit layer to perform time feature extraction and aggregation to obtain time features; A second input unit is used to input the time feature and the city node static data into the first autoregressive moving average graph neural network layer and the second autoregressive moving average graph neural network layer for feature aggregation, so as to obtain a first aggregated feature and a second aggregated feature respectively; A third input unit is used to input the first aggregated feature and the second aggregated feature into a third autoregressive sliding average graph neural network layer for feature fusion to obtain a target feature; A linear change unit, used to input the target feature into the fully connected layer for linear change, and output a traffic volume prediction value; The second calculation unit is used to calculate the loss function based on the traffic volume prediction value and the actual traffic volume value in the traffic volume time series data, and adjust the parameters of each layer in the graph neural network based on the loss function calculation value until the loss function meets the first set threshold, so as to obtain the traffic volume prediction model.
6. The railway transportation pricing device based on graph neural network according to claim 5 is characterized in that: The first computing unit comprises: A third calculation unit, configured to calculate a transportation revenue function based on the predicted transportation volume and the location parameters of the initial population; A fourth calculation unit, configured to calculate a transportation cost function based on a transportation route length corresponding to the predicted transportation volume, a preset unit railway variable cost, a preset unit railway fixed cost, and the predicted transportation volume; A second construction unit is used to construct a penalty function based on the operation capacity of the transportation nodes and transportation routes corresponding to the predicted transportation volume; A third construction unit, configured to construct a fitness function based on the transportation revenue function, the transportation cost function and the penalty function; The input unit is used to input the predicted traffic volume and the position parameters of the initial population into the fitness function for calculation to obtain the fitness value.
7. The railway transportation pricing device based on graph neural network according to claim 6 is characterized in that: The second building block comprises: A fifth calculation unit is used to calculate the difference between the predicted transportation volume of each transportation route and the preset loading and unloading operation capacity to obtain a plurality of first functions; a sixth calculation unit, configured to sum and calculate the first functions corresponding to all transportation routes related to each transportation node to obtain a plurality of second functions; a seventh calculation unit, configured to sum the second function corresponding to each transport node to obtain a third function; The eighth calculation unit is used to calculate the product of the second set threshold and the third function to obtain the penalty function.
8. A railway transportation pricing device based on graph neural network, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the railway transportation pricing method based on graph neural network as claimed in any one of claims 1 to 4 when executing the computer program.
Citation Information
Patent Citations
Genetic algorithm-based electricity price optimization method and device
CN116012078A