Inter-city railway freight order prediction method and system based on graph neural network
Through a graph neural network-based method, a railway topology network is built and combined with node attributes and historical freight volume to predict inter-city railway freight orders, solving the problem of insufficient prediction accuracy in the existing technology and achieving higher prediction accuracy and dynamicity.
Patent Information
- Application Number
- CN202510157639.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-02-13
AI Technical Summary
The existing technology is difficult to accurately predict the dynamic changes in railway freight connections between cities, and lacks in-depth exploration of railway network topology and node attributes, resulting in limited accuracy and practicality of prediction results.
Using a graph neural network-based method, a railway topology network is constructed and node attributes and historical freight volume is combined. Through a link prediction model combined with GraphSAGE and GRU models, the existence of inter-city railway freight orders is predicted.
It improves the accuracy of forecasting of freight connections between cities in the railway network, can identify potential new freight connections in the railway network, and makes up for the shortcomings of existing models in dynamics, spatial correlations and practical applications.
Smart Images

Figure CN119623778B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for predicting inter-city railway freight orders based on a graph neural network. Background Art
[0002] With the development of modern logistics networks and the growth of railway transportation demand, inter-city freight connections have become increasingly important. However, the complexity and dynamics of railway freight networks pose challenges to the accurate prediction of inter-city freight connections. Current research mainly focuses on railway network planning and static analysis, with less research on dynamic changes. Existing methods are mostly based on traditional statistical models or linear optimization, ignoring the dynamic impact of railway network topology and node attributes on freight connections, lacking in-depth mining of time series characteristics and spatial correlation characteristics, resulting in limited accuracy and practicality of prediction results. In addition, existing research lacks an order prediction model that combines the topology of the railway network with the dynamic characteristics of freight, and insufficient mining of the spatiotemporal evolution of inter-city freight connections. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for predicting inter-city railway freight orders 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 method for predicting inter-city railway freight orders based on a graph neural network, comprising:
[0005] Obtain railway network data and city center point data, associate the railway network data with the city center point data with the city center point as a node to generate a railway topology network as a full graph, and obtain the attribute characteristics of each node in the full graph in turn;
[0006] Take any two target nodes in the entire graph as the departure and destination, and obtain whether there is a railway freight order between the two target nodes;
[0007] Extract the subgraph of the two target nodes from the full graph, and obtain all the nodes contained in the subgraph as well as the attribute characteristics and historical freight volume of the nodes;
[0008] The dataset is constructed by taking whether there is a railway freight order between two target nodes as the output label and the attribute characteristics and historical freight volume of all neighbor nodes in the subgraph as the input labels.
[0009] Building a link prediction model based on graph neural network and recurrent neural network, and using the data set to train and test the link prediction model to predict whether there is a freight order between two target nodes;
[0010] When the prediction accuracy of the link prediction model is greater than the preset threshold, the link prediction model training is completed and a railway freight order prediction model is generated.
[0011] In a second aspect, the present application also provides an inter-city railway freight order prediction system based on a graph neural network, comprising:
[0012] Association module: obtain railway network data and city center data, associate the railway network data with the city center data with the city center data as the node to generate a railway topology network as the full map, and obtain the attribute characteristics of each node in the full map in turn;
[0013] Acquisition module: Take any two target nodes in the whole graph as the departure point and destination, and obtain whether there is a railway freight order between the two target nodes;
[0014] Extraction module: extract the subgraph of two target nodes from the full graph, and obtain all nodes contained in the subgraph as well as the attribute characteristics and historical freight volume of the nodes;
[0015] Dataset construction module: The dataset is constructed by taking whether there is a railway freight order between two target nodes as the output label, and the attribute characteristics and historical freight volume of all neighbor nodes in the subgraph as the input labels;
[0016] Training module: building a link prediction model based on graph neural network and recurrent neural network, and using the data set to train and test the link prediction model to predict whether there is a freight order between two target nodes;
[0017] Judgment module: When the prediction accuracy of the link prediction model is greater than the preset threshold, the link prediction model training is completed and the railway freight order prediction model is generated.
[0018] In a third aspect, the present application also provides an inter-city railway freight order prediction device based on a graph neural network, comprising:
[0019] Memory for storing computer programs;
[0020] A processor is used to implement the steps of the inter-city railway freight order prediction method based on graph neural network when executing the computer program.
[0021] In a fourth aspect, the present application also provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned inter-city railway freight order prediction method based on graph neural network are implemented.
[0022] The beneficial effects of the present invention are:
[0023] 1. The present invention quickly extracts the railway network topology based on the railway network, combines the railway network topology, node attributes and its time dynamic characteristics, reveals the spatiotemporal evolution law of inter-city freight connections, identifies potential new freight connections in the railway network, and realizes dynamic link prediction of railway freight connections, which makes up for the shortcomings of existing railway freight connection prediction models in dynamics, spatial correlation and practical application, and provides technical support and decision-making basis for the optimization of actual railway transportation networks and the accurate matching of freight demand.
[0024] 2. The graph neural network model constructed by the present invention can effectively improve the accuracy of inter-city freight connection prediction in the railway network. Compared with traditional machine learning methods (such as decision trees, support vector machines, etc.), the GraphSAGE and GRU models proposed in the present invention combine the railway network topology structure with deep feature extraction of time series data, and show superior performance in link prediction tasks, especially in short-term and long-term predictions, showing significantly higher accuracy than traditional methods.
[0025] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] 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.
[0027] Figure 1 It is a schematic diagram of the flow of the method for predicting inter-city railway freight orders based on graph neural network described in an embodiment of the present invention;
[0028] Figure 2 Schematic diagram of node attributes of a railway network described in an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of a target node described in an embodiment of the present invention;
[0030] Figure 4 is a schematic diagram of a local closed subgraph described in an embodiment of the present invention;
[0031] Figure 5 is a schematic diagram of a link prediction model described in an embodiment of the present invention;
[0032] Figure 6It is a schematic diagram of the structure of the inter-city railway freight order prediction system based on graph neural network described in an embodiment of the present invention;
[0033] Figure 7 This is a schematic diagram of the structure of an inter-city railway freight order prediction device based on a graph neural network described in an embodiment of the present invention.
[0034] Markings in the figure:
[0035] 800. Inter-city railway freight order prediction device based on graph neural network; 801. Processor; 802. Memory; 803. Multimedia component; 804. I / O interface; 805. Communication component. DETAILED DESCRIPTION
[0036] 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.
[0037] 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.
[0038] Embodiment 1:
[0039] This embodiment provides a method for predicting inter-city railway freight orders based on graph neural network;
[0040] See also Figure 1 , the figure shows that the method includes:
[0041] S1. Obtain railway network data and city center data, associate the railway network data with the city center data with the city center data to generate a railway topology network as the full map, and sequentially obtain the attribute characteristics of each node in the full map;
[0042] Specifically, the step S1 includes:
[0043] S11. Obtaining station data and edge data of the railway network, wherein the edge data includes the starting and ending point information of the connecting station;
[0044] Specifically, the site data includes the unique identifier of the site and its location, and the edge data includes fields such as length and level. The city center data includes the city ID and coordinates.
[0045] S12. Through spatial analysis, the city center is mapped to the nearest station in the railway network, and a mapping relationship between cities and railway stations is established to ensure that each city corresponds to the actual location of the railway network;
[0046] S13. A network dataset is constructed from the station data and edge data of the railway network, and the path cost is used as the analysis weight. Specifically, the path cost includes the shortest distance or the shortest time;
[0047] S14. Calculate the shortest path costs between all city pairs using the network dataset to generate an initial OD cost matrix;
[0048] S15. Add barrier costs to each station on the railway network, repeatedly calculate the shortest path costs between all city pairs, and generate an OD cost matrix after adding barriers;
[0049] S16. Compare the difference between the initial OD cost matrix and the OD cost matrix after adding barriers, determine whether each pair of cities is adjacent, and generate an adjacency table based on the judgment result:
[0050] Specifically, if the difference between the two is equal to the two barrier costs, it means that the current city pair is directly adjacent;
[0051] S17. Constructing a railway topology network as a full graph based on the adjacency table;
[0052] Specifically, initialize the adjacency matrix size to N×N (N is the number of cities), and initialize all elements to 0;
[0053] For each pair of directly adjacent cities, in the adjacency matrix, the elements of the rows and columns corresponding to the pair of cities are updated to 1, indicating that there is a direct railway connection between the pair of cities. After completing the update of all directly adjacent city pairs, the final adjacency matrix is output.
[0054] Specifically, the step S1 further includes:
[0055] S18. Use principal component analysis to extract transportation organization, social economy, distribution and transportation, and development potential as the principal component factors of nodes;
[0056] Specifically, railway transportation both serves and is constrained by the development of the regional economy. Generally speaking, economically developed cities usually have more railway freight channels, and cities with superior transportation location conditions often have a higher density of freight network nodes. Logistics hubs with high freight demand and outstanding railway transportation efficiency can attract more freight orders and resource aggregation. In other words, the socio-economic characteristics, transportation conditions and related attributes of the nodes (cities) have an important impact on the evolution of the railway freight network. Therefore, the transportation organization, socio-economy, distribution and transportation, and development potential of the nodes (cities) are taken as the main component factors of the nodes, such as Figure 3 As shown;
[0057] Specifically, the transport organization includes five basic indicators, namely, the volume of cargo departures, the volume of cargo arrivals, the number of inter-city freight trains, the number of intra-city freight trains, and the number of stations within the jurisdiction;
[0058] The social economy includes five basic indicators, namely, urban GDP, output value of the primary industry, output value of the secondary industry, output value of the tertiary industry and the number of permanent residents in the city;
[0059] The distribution and transshipment includes five basic indicators, namely, the average annual freight volume of highways, the average annual freight volume of water transport, the average annual freight volume of aviation, the number of ports and the number of airports;
[0060] The development potential includes three basic indicators, namely, the growth rate of freight volume in the past three years, the grade of railway stations and the number of connected cities;
[0061] In summary, this embodiment collects a total of 18 indicators around urban economy and railway network attributes to comprehensively measure node attributes.
[0062] S19. Hierarchical clustering is performed on each node using the principal component factor to obtain six categories with similarity within the category and significant differences between categories, which are:
[0063] Category 1: Cities including Beijing and Shanghai, as regional economic centers and logistics hubs, have strong freight demand and dense railway transportation channels. Cities in Category 1 have significant economic radiation effects in the region, are important nodes connecting different regions, and undertake large-scale cargo distribution and transportation tasks.
[0064] The second category: Cities including Shenyang and Harbin are usually regional economic and transportation hubs, located at important nodes of the regional railway network. Their freight demand is relatively stable, but they have strong logistics distribution functions in the region, especially playing a key role in cross-regional freight flows. The railway transportation channels are relatively dense, but the overall freight demand is not as strong as the first category of nodes.
[0065] The third category: Cities including Xiamen and Qingdao are usually regional central cities or coastal logistics hubs, with relatively stable freight demand, and are an important part of the regional freight network. They play a supporting role in the region, especially for inter-provincial or coastal freight transportation.
[0066] The fourth category: including Zhengzhou, Wuhan and other cities, most of which are logistics hubs in inland areas, play an important role in railway transportation connection. Their freight demand is growing rapidly, especially with the rapid development of regional economy, the demand for railway transportation is gradually increasing. The railway network and infrastructure of these cities play a key role in supporting regional economic growth, and they usually have a good railway hub status and strong distribution function.
[0067] The fifth category: Cities including Guiyang and Nanchang are relatively small logistics hubs with slow growth in freight demand, but they have unique advantages in certain industries or fields. The layout of the railway network is not as dense as the first three types of nodes, but as regional secondary hubs, these cities play an important role in supporting the local regional economy and its logistics needs. They may play an important role in certain specific seasons or time periods, especially for the transportation of specific commodities or resources.
[0068] The sixth category: includes some emerging cities or relatively small urban nodes, such as Hefei and Kunming. These cities have low freight demand, relatively lagging railway network construction, and relatively scattered transportation channels. They usually play a role in a relatively narrow area and may only have a certain function in local regional logistics. Although the role of railway hubs in these cities is relatively weak, with the development of regional economy and the gradual expansion of railway network, their role may gradually increase and become potential logistics distribution points in the future;
[0069] The six categories are added to the node attributes as six indicators in the form of six-dimensional 01 coding. The value of a city in its category is 1, and it is represented as 0 in other categories.
[0070] S110. The category to which the node cluster belongs and the principal component factors contained therein are used as attribute features of the node;
[0071] Specifically, this embodiment obtains 24 attribute features of the node, such as Figure 3 As shown, they are:
[0072] Six categories : Describes the hub category of the city in the railway network;
[0073] Transport organization : Describe the level of railway transportation organization in the city (such as the number of train pairs running and the amount of cargo arriving and departing);
[0074] Social Economy : Describe the economic attributes of the city (such as GDP, population, output value of primary, secondary and tertiary industries, and degree of industrial agglomeration);
[0075] Distribution and transportation : Describe the city's railway freight distribution and transshipment capabilities (such as road transportation capacity, number of regional ports, etc.);
[0076] Development potential : Describe the city’s freight growth potential (such as recent freight volume growth rate and number of connected cities).
[0077] like Figure 3 As shown, based on the above embodiment, the method further includes:
[0078] S2. Add any two target nodes in the whole graph as the departure and destination, and obtain whether there is a railway freight order between the two target nodes;
[0079] Based on the above embodiments, the method further includes:
[0080] S3. extracting a subgraph of two target nodes from the full graph, and obtaining all nodes contained in the subgraph as well as attribute characteristics and historical freight volumes of the nodes;
[0081] Specifically, step S3 includes:
[0082] S31. Find neighbor nodes of the two target nodes in the whole graph, and form a local closed subgraph by all the neighbor nodes found and the two target nodes;
[0083] In this embodiment, For the whole picture, ,in, For the city collection, A collection of railway connections between cities; find nodes The adjacent nodes and The adjacent nodes of The adjacent nodes and The adjacent nodes of ,like Figure 4 As shown;
[0084] S32. constructing the local closed subgraph into a sub-adjacency matrix to obtain a subgraph of two target nodes;
[0085] Specifically, the step S32 includes:
[0086] S321. Create a × The all-zero matrix ,in, for The total number of nodes in ;
[0087] S322. Fill all zero matrix ,matrix Elements in Represents a node in a subgraph and nodes Is there a direct rail connection between them? If so, ,otherwise ;
[0088] S323. Matrix after filling Get the sub-adjacency matrix .
[0089] S33. Obtain each node contained in the subgraph, and extract the attribute features of each city node from the entire graph in turn;
[0090] S34. Obtain the historical freight volume of each node from the freight information database in turn.
[0091] Based on the above embodiments, the method further includes:
[0092] S4. Construct a dataset by taking whether there is a railway freight order between two target nodes as the output label and the attribute characteristics and historical freight volume of all neighbor nodes in the subgraph as the input labels;
[0093] In this embodiment, if there is a railway freight order between the two target nodes, it is 1, otherwise it is 0.
[0094] like Figure 5 As shown, based on the above embodiment, the method further includes:
[0095] S5. Building a link prediction model based on the graph neural network and the recurrent neural network, and using the data set to train and test the link prediction model to predict whether there is a freight order between two target nodes;
[0096] Specifically, step S5 includes:
[0097] S5. Build a link prediction model by the first GraphSAGE layer, the second GraphSAGE layer, the GRU network layer, the fully connected layer and the pooling layer;
[0098] S51. Take the historical freight volume of all nodes in the subgraph as time series features The GRU network layer is input. The GRU network layer learns to extract key time series features and then inputs them into the first GraphSAGE layer. The first GraphSAGE layer generates the time series feature embedding results.
[0099] Specifically, the GRU network layer is composed of two gating units, an update gate and a reset gate, which helps to control the flow of information and enables the network to better handle long-term dependency issues.
[0100] The update gate is used to control how the input of the current time step is 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 previous hidden state 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.
[0101] The reset gate is used to determine how to consider past hidden states. It decides whether to ignore the previous hidden state and combine the input of the current time step with the previous state to produce the output of the current time step.
[0102] The learning process of the GRU model is as follows:
[0103] ; (1)
[0104] In the formula, represents the previous hidden state, represents the update gate, represents the weight matrix of the update gate; Represents the reset gate, represents the weight matrix of the reset gate; represents the candidate hidden state, A weight matrix representing candidate hidden states; Represents the current hidden state. The activation functions are all s-shaped functions, which enable the model to forget and update information through a gating mechanism. represents the hidden state passed in from the previous time step, Represents the time series feature input of the node city passed in from the current time step. On the one hand, the reset gate controls how much information from the previous hidden state can be input into the candidate hidden state On the other hand, the update gate controls and In the final output Through the above method, GRU can retain useful time information as the input of the next network layer.
[0105] This embodiment enables GRU to learn long-term dependencies more effectively by controlling the update gate and reset gate, while avoiding the gradient vanishing and explosion problems of traditional RNN. After updating the nodes in the subgraph, the refined node city time series features will be passed to the GraphSAGE layer for fusing the information of the graph structure and updating the graph embedding.
[0106] S53. Take the attribute features of all nodes in the subgraph as external features Input the second GraphSAGE layer, which extracts external features to generate structural feature embedding results;
[0107] Specifically, step S53 includes:
[0108] S531. Extract the attribute features of each node in the subgraph in turn to generate initial embedding features;
[0109] Specifically, for any node in the graph , whose initial embedding feature is its feature vector, that is, the external indicator extracted by node attributes, namely:
[0110] ;
[0111] In the formula, Representation Node The initial embedding features of Represents the feature dimension.
[0112] S532. Construct a neighbor node set of any node, aggregate the initial embedded features in the neighbor node set to generate an aggregate feature vector;
[0113] Specifically, randomly select nodes A part of neighbor nodes to get the neighbor set :
[0114] ; (2)
[0115] In the formula, represents a subgraph, represents all neighbors of node v;
[0116] In this embodiment, the initial embedding features in the neighbor node set can be aggregated in the following two ways:
[0117] 1) Mean Aggregator: Mean Aggregator is defined as follows:
[0118] ; (3)
[0119] In the formula, Representation Node The average aggregation result of the neighbor node features of Represents neighbor nodes, Represents neighbor nodes No. Layer embedding features;
[0120] 2) Pooling Aggregator: For each neighbor, a nonlinear transformation is performed to use a pooling operation (such as maximum pooling). The pooling aggregation is defined as follows:
[0121] ; (4)
[0122] In the formula, Representation Node The pooling aggregation result of neighbor node features, is the activation function, Weight matrix, is the bias vector;
[0123] S533. Update the node's embedded features using the node's initial embedded features and the aggregated feature vector of its neighbor node set:
[0124] ; (5)
[0125] In the formula, For Node In the The embedding features of the layer, Representation Node In the The embedding features of the layer, For the The learnable weight matrix of the layer, is the vector concatenation operation, is the activation function (such as ReLU), Represents the aggregation result.
[0126] Preferably, in order to prevent the embedding value from being too large, the embedding feature can be normalized after updating, as follows:
[0127] ; (6)
[0128] In the formula, Represents the normalized Layer embedding features, express The norm of .
[0129] S534. When the embedding feature of the node is updated a preset number of iterations, the final embedding feature of each node is obtained;
[0130] Specifically, through After the layer is updated, the nodes in the subgraph The final embedding feature is .
[0131] S535. Generate the structural feature embedding result of the subgraph based on the final embedding features of all nodes.
[0132] The above is an explanation of the method for generating the structural feature embedding result. In this embodiment, the temporal feature embedding result can be generated using steps S531 to S535, which will not be repeated here.
[0133] S546. Input the temporal feature embedding result and the structural feature embedding result into the fully connected layer and the pooling layer for fusion and pooling, and obtain the prediction result of whether there is a railway freight order between the two target nodes corresponding to the current subgraph;
[0134] Preferably, this embodiment also includes:
[0135] During the training process, a loss function is used to compare the output of the model with whether there is a freight order between the actual departure and destination, and binary cross entropy is used as the loss function L for link prediction:
[0136] ; (7)
[0137] In the formula, is the set of all target node pairs in the training set, is the target node pair The true label of (1 means there is a freight order, 0 means there is no freight order), Represents the prediction result.
[0138] Based on the above embodiments, the method further includes:
[0139] S6. When the prediction accuracy of the link prediction model is greater than the preset threshold, the link prediction model training is completed and a railway freight order prediction model is generated.
[0140] In summary, the railway freight order prediction model of the present invention not only has a good application effect in the railway network, but also has strong scalability and is suitable for railway transportation networks of different sizes. Through the flexibility of the model, the planning and operation efficiency of the freight network can be optimized for different city groups and transportation needs, providing railway companies with efficient network prediction and decision support tools.
[0141] Embodiment 2:
[0142] like Figure 6As shown, this embodiment provides an inter-city railway freight order prediction system based on graph neural network, and the system includes:
[0143] Association module: obtain railway network data and city center data, associate the railway network data with the city center data with the city center data as the node to generate a railway topology network as the full map, and obtain the attribute characteristics of each node in the full map in turn;
[0144] Acquisition module: Take any two target nodes in the whole graph as the departure point and destination, and obtain whether there is a railway freight order between the two target nodes;
[0145] Extraction module: extract the subgraph of two target nodes from the full graph, and obtain all nodes contained in the subgraph as well as the attribute characteristics and historical freight volume of the nodes;
[0146] Dataset construction module: The dataset is constructed by taking whether there is a railway freight order between two target nodes as the output label, and the attribute characteristics and historical freight volume of all neighbor nodes in the subgraph as the input labels;
[0147] Training module: building a link prediction model based on graph neural network and recurrent neural network, and using the data set to train and test the link prediction model to predict whether there is a freight order between two target nodes;
[0148] Judgment module: When the prediction accuracy of the link prediction model is greater than the preset threshold, the link prediction model training is completed and the railway freight order prediction model is generated.
[0149] Based on the above embodiment, the association module includes:
[0150] A first acquisition unit: acquires station data and edge data of a railway network, wherein the edge data includes start and end point information of a connection node;
[0151] Mapping unit: Through spatial analysis, the city center is mapped to the nearest station in the railway network, and the mapping relationship between the city and the railway station is established;
[0152] The first construction unit: construct a network dataset from the station data and edge data of the railway network, and use the path cost as the analysis weight;
[0153] Calculation unit: using the network data set to calculate the shortest path costs between all city pairs and generate an initial OD cost matrix;
[0154] Adding units: Add barrier costs to each station on the railway network, repeatedly calculate the shortest path costs between all city pairs, and generate the OD cost matrix after adding barriers;
[0155] Comparison unit: compares the difference between the initial OD cost matrix and the OD cost matrix after adding barriers, determines whether each pair of cities is adjacent, and generates an adjacency table based on the judgment results;
[0156] The second construction unit: constructs a railway topology network as a full graph based on the adjacency list.
[0157] Based on the above embodiment, the association module further includes:
[0158] The first extraction unit: principal component analysis is used to extract transportation organization, social economy, distribution and transportation, and development potential as the principal component factors of the nodes;
[0159] Clustering unit: hierarchically clustering each node using the principal component factor to obtain multiple categories with similarity within the category and significant differences between categories;
[0160] Select unit: The category to which the node cluster belongs and the principal component factors it contains are used as the attribute features of the node.
[0161] Based on the above embodiment, the extraction module includes:
[0162] Search unit: Search for neighbor nodes of two target nodes in the entire graph, and all the neighbor nodes found and the two target nodes form a local closed subgraph;
[0163] Construction unit: constructing the local closed subgraph into a sub-adjacency matrix to obtain a subgraph of two target city nodes;
[0164] The second acquisition unit: acquires each node contained in the subgraph, and extracts attribute features of each node from the whole graph in turn;
[0165] The third acquisition unit: acquires the historical freight volume of each node from the freight information database in turn.
[0166] Based on the above embodiment, the training module includes:
[0167] Model building unit: The link prediction model is built by the first GraphSAGE layer, the second GraphSAGE layer, the GRU network layer, the fully connected layer and the pooling layer;
[0168] Second extraction unit: the historical freight volume of all nodes in the subgraph is input into the GRU network layer as the time series feature. The GRU network layer learns to extract the key time series features and then inputs them into the first GraphSAGE layer. The first GraphSAGE layer generates the time series feature embedding result.
[0169] The third extraction unit: inputs the attribute features of all nodes in the subgraph as external features into the second GraphSAGE layer, and the second GraphSAGE layer extracts the external features to generate structural feature embedding results;
[0170] Input unit: The temporal feature embedding results and the structural feature embedding results are input into the fully connected layer and the pooling layer for fusion and pooling to obtain the prediction result of whether there is a railway freight order between the two target nodes corresponding to the current subgraph.
[0171] Based on the above embodiment, the third extraction unit includes:
[0172] The fourth extraction unit: extracts the attribute features of each node in the subgraph in turn to generate initial embedding features;
[0173] Aggregation unit: constructs a set of neighbor nodes for any node, aggregates the initial embedded features in the node set to generate an aggregate feature vector;
[0174] Update unit: updates the node's embedded features using the node's initial embedded features and the aggregated feature vector of its neighboring node set;
[0175] Judgment unit: when the embedding feature of the node is updated for a preset number of iterations, the final embedding feature of each node is obtained;
[0176] Generation unit: Generates the structural feature embedding result of the subgraph from the final embedding features of all nodes.
[0177] It should be noted that, regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0178] Embodiment 3:
[0179] Corresponding to the above method embodiment, this embodiment also provides an inter-city railway freight order prediction device based on a graph neural network. The inter-city railway freight order prediction device based on a graph neural network described below and the inter-city railway freight order prediction method based on a graph neural network described above can be referenced to each other.
[0180] Figure 7 is a block diagram of an inter-city railway freight order prediction device 800 based on a graph neural network according to an exemplary embodiment. Figure 7As shown, the inter-city railway freight order prediction device 800 based on graph neural network may include: a processor 801, a memory 802. The inter-city railway freight order prediction 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.
[0181] The processor 801 is used to control the overall operation of the inter-city railway freight order prediction device 800 based on the graph neural network to complete all or part of the steps in the above-mentioned inter-city railway freight order prediction method based on the graph neural network. The memory 802 is used to store various types of data to support the operation of the inter-city railway freight order prediction device 800 based on the graph neural network, and these data may include, for example, instructions for any application or method operating on the inter-city railway freight order prediction 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 inter-city railway freight order prediction device 800 based on 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.
[0182] In an exemplary embodiment, the inter-city railway freight order prediction 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 Processor, 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 inter-city railway freight order prediction method based on graph neural network.
[0183] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned inter-city railway freight order prediction method based on a graph neural network are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above-mentioned program instructions can be executed by the processor 801 of the inter-city railway freight order prediction device 800 based on a graph neural network to complete the above-mentioned inter-city railway freight order prediction method based on a graph neural network.
[0184] Embodiment 4:
[0185] Corresponding to the above method embodiment, a readable storage medium is also provided in this embodiment. The readable storage medium described below and the inter-city railway freight order prediction method based on graph neural network described above can be referenced to each other.
[0186] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for predicting inter-city railway freight orders based on a graph neural network in the above-mentioned method embodiment.
[0187] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0188] 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.
[0189] 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 method for predicting inter-city railway freight orders based on graph neural network, characterized in that: include: Obtain railway network data and city center data, take the city center as the node, associate the railway network data with the city center data to generate a railway topology network as the full map, and obtain the attribute characteristics of each node in the full map in turn, including: Acquire station data and edge data of the railway network, wherein the edge data includes start and end point information of the connection nodes; Through spatial analysis, the city center is mapped to the nearest station in the railway network, and the mapping relationship between the city and the railway station is established; A network dataset is constructed from the station data and edge data of the railway network, and the path cost is used as the analysis weight; Using the network dataset, the shortest path costs between all city pairs are calculated to generate an initial OD cost matrix; Add barrier costs to each station on the railway network, repeatedly calculate the shortest path costs between all city pairs, and generate an OD cost matrix after adding barriers; Compare the difference between the initial OD cost matrix and the OD cost matrix after adding barriers, determine whether each pair of cities is adjacent, and generate an adjacency table based on the judgment results; constructing a railway topology network as a full graph based on the adjacency table; Take any two target nodes in the entire graph as the departure and destination, and obtain whether there is a railway freight order between the two target nodes; Extract the subgraph of the two target nodes from the full graph, and obtain all the nodes contained in the subgraph as well as the attribute characteristics and historical freight volume of the nodes; The dataset is constructed by taking whether there is a railway freight order between two target nodes as the output label and the attribute characteristics and historical freight volume of all neighbor nodes in the subgraph as the input labels. A link prediction model is built based on graph neural network and recurrent neural network, and the link prediction model is trained and tested using the data set to predict whether there is a freight order between two target nodes, including: The link prediction model is built by the first GraphSAGE layer, the second GraphSAGE layer, the GRU network layer, the fully connected layer, and the pooling layer; The historical freight volumes of all nodes in the subgraph are input into the GRU network layer as time series features. The GRU network layer learns to extract key time series features and then inputs them into the first GraphSAGE layer, which generates the time series feature embedding results. The attribute features of all nodes in the subgraph are input into the second GraphSAGE layer as external features, and the second GraphSAGE layer extracts the external features to generate the structural feature embedding results; The temporal feature embedding results and the structural feature embedding results are input into the fully connected layer and the pooling layer for fusion and pooling to obtain the prediction result of whether there is a railway freight order between the two target nodes corresponding to the current subgraph; When the prediction accuracy of the link prediction model is greater than the preset threshold, the link prediction model training is completed and a railway freight order prediction model is generated.
2. The inter-city railway freight order prediction method based on graph neural network according to claim 1 is characterized in that: Get the attribute characteristics of each node in the entire graph, including: The principal component analysis method is used to extract transportation organization, social economy, distribution and transportation, and development potential as the principal component factors of the nodes; Using the principal component factors to perform hierarchical clustering on each node, a plurality of categories with similarity within the category and significant differences between categories are obtained; The category to which the node cluster belongs and the principal component factors it contains are used as the attribute features of the node.
3. The inter-city railway freight order prediction method based on graph neural network according to claim 1 is characterized in that: Extract the subgraph of the two target nodes from the full graph, and obtain all the nodes contained in the subgraph as well as the attribute characteristics and historical freight volume of the nodes, including: Find the neighbor nodes of the two target nodes in the whole graph, and form a local closed subgraph by all the neighbor nodes found and the two target nodes; Constructing the local closed subgraph into a sub-adjacency matrix to obtain a subgraph of two target nodes; Get each node contained in the subgraph, and extract the attribute features of each node from the whole graph in turn; The historical freight volume of each node is obtained from the freight information database in turn.
4. An inter-city railway freight order prediction system based on graph neural network, characterized in that: include: Association module: obtain railway network data and city center data, associate the railway network data with the city center data with the city center data as the node to generate a railway topology network as the full map, and obtain the attribute characteristics of each node in the full map in turn; Wherein, the association module includes: A first acquisition unit: acquires station data and edge data of a railway network, wherein the edge data includes start and end point information of a connection node; Mapping unit: Through spatial analysis, the city center is mapped to the nearest station in the railway network, and the mapping relationship between the city and the railway station is established; The first construction unit: construct a network dataset from the station data and edge data of the railway network, and use the path cost as the analysis weight; Calculation unit: using the network data set to calculate the shortest path costs between all city pairs and generate an initial OD cost matrix; Adding units: Add barrier costs to each station on the railway network, repeatedly calculate the shortest path costs between all city pairs, and generate the OD cost matrix after adding barriers; Comparison unit: compares the difference between the initial OD cost matrix and the OD cost matrix after adding barriers, determines whether each pair of cities is adjacent, and generates an adjacency table based on the judgment results; A second construction unit: constructing a railway topology network as a full graph based on the adjacency table; Acquisition module: Take any two target nodes in the whole graph as the departure point and destination, and obtain whether there is a railway freight order between the two target nodes; Extraction module: extract the subgraph of two target nodes from the full graph, and obtain all nodes contained in the subgraph as well as the attribute characteristics and historical freight volume of the nodes; Dataset construction module: The dataset is constructed by taking whether there is a railway freight order between two target nodes as the output label, and the attribute characteristics and historical freight volume of all neighbor nodes in the subgraph as the input labels; Training module: building a link prediction model based on graph neural network and recurrent neural network, and using the data set to train and test the link prediction model to predict whether there is a freight order between two target nodes; Wherein, the training module includes: Model building unit: The link prediction model is built by the first GraphSAGE layer, the second GraphSAGE layer, the GRU network layer, the fully connected layer and the pooling layer; Second extraction unit: the historical freight volume of all nodes in the subgraph is input into the GRU network layer as the time series feature. The GRU network layer learns to extract the key time series features and then inputs them into the first GraphSAGE layer. The first GraphSAGE layer generates the time series feature embedding result. The third extraction unit: inputs the attribute features of all nodes in the subgraph as external features into the second GraphSAGE layer, and the second GraphSAGE layer extracts the external features to generate structural feature embedding results; Input unit: Input the temporal feature embedding results and the structural feature embedding results into the fully connected layer and the pooling layer for fusion and pooling to obtain the prediction result of whether there is a railway freight order between the two target nodes corresponding to the current subgraph; Judgment module: When the prediction accuracy of the link prediction model is greater than the preset threshold, the link prediction model training is completed and the railway freight order prediction model is generated.
5. The inter-city railway freight order prediction system based on graph neural network according to claim 4 is characterized in that: The association module also includes: The first extraction unit: principal component analysis is used to extract transportation organization, social economy, distribution and transportation, and development potential as the principal component factors of the nodes; Clustering unit: hierarchically clustering each node using the principal component factor to obtain multiple categories with similarity within the category and significant differences between categories; Select unit: The category to which the node cluster belongs and the principal component factors it contains are used as the attribute features of the node.
6. The inter-city railway freight order prediction system based on graph neural network according to claim 4 is characterized in that: The extraction module comprises: Search unit: Search for neighbor nodes of two target nodes in the entire graph, and all the neighbor nodes found and the two target nodes form a local closed subgraph; Construction unit: constructing the local closed subgraph into a sub-adjacency matrix to obtain a subgraph of two target city nodes; The second acquisition unit: acquires each node contained in the subgraph, and extracts attribute features of each node from the whole graph in turn; The third acquisition unit: acquires the historical freight volume of each node from the freight information database in turn.
Citation Information
Patent Citations
A method for selecting a hub node of an integrated traffic network
CN109377048A
Multi-element traffic flow urban space organization pattern recognition method fused with map data
CN115098798A