A method and device for predicting train delay based on deep learning

Through a synchronous many-to-many recurrent neural network model based on deep learning, combined with the initial delay time and target station characteristic information, it solves the delay time problem that cannot be quantitatively evaluated in the existing technology, and achieves accurate prediction and prediction of high-speed rail train delay time. Accuracy improved.

CN113850413BActive Publication Date: 2024-10-15CHINA ACADEMY OF RAILWAY SCI CORP LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202110951026.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-18
Publication Date
2024-10-15
Estimated Expiration
2041-08-18

AI Technical Summary

Technical Problem

Existing technology cannot quantitatively assess the delay time of high-speed rail trains and can only make qualitative predictions.

Method used

Using a method based on deep learning, using a synchronous many-to-many recurrent neural network model, by obtaining the initial delay time and the characteristic information of the target station, a feature sequence is constructed to predict the delay time of the target train passing the target station, and predict the delay time between adjacent stations. Real-time reference to the delay time of the previous station to improve prediction accuracy.

Benefits of technology

It achieves quantitative prediction of high-speed rail train delays, improves the prediction accuracy, and can refer to the weights of different stations in real time, further improving the prediction ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850413B_ABST
    Figure CN113850413B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and medium for predicting the actual delay of a train based on deep learning, wherein the method comprises: obtaining the initial delay time and target feature information of the target station that the target train will pass through after the initial delay occurs according to the initial delay of the target train; constructing a feature sequence for the target station according to the initial delay time and the target feature information of the target station; inputting the feature sequence into a synchronous many-to-many recurrent neural network model, and outputting the predicted value of the actual delay time of the target train passing through the target station; wherein, for two adjacent stations, when outputting the predicted value of the actual delay time of the latter station, the initial delay time or the predicted value of the actual delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model. The method realizes the quantitative prediction of the delayed train time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for predicting train delays based on deep learning. Background Art

[0002] At present, the prediction method for high-speed train delays is artificial neural network. The training results show that the neural network model can effectively fit the impact of the running order of the front train group on the rear train and predict the delay level of the rear train. However, this method still has shortcomings: the prediction of the delay level is a qualitative prediction, and it is impossible to quantitatively evaluate the delay time. Summary of the invention

[0003] The present invention provides a method, device, equipment and medium for predicting train delay based on deep learning, which realizes quantitative prediction of delayed train time.

[0004] In the first aspect, the present invention provides a method for predicting the exact delay of a train based on deep learning, comprising: according to an initial delay of a target train, obtaining the initial delay time and target feature information of a target station that the target train will pass through after the initial delay occurs; constructing a feature sequence for the target station according to the initial delay time and the target feature information of the target station; inputting the feature sequence into a synchronous many-to-many recurrent neural network model, and outputting a predicted value of the exact delay time of the target train passing through the target station; wherein, for two adjacent stations, when outputting the predicted value of the exact delay time of the latter station, the initial delay time or the predicted value of the exact delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model.

[0005] According to a deep learning-based train delay prediction method provided by the present invention, the initial delay time includes the arrival delay time or the departure delay time; the exact delay time includes the arrival time and / or the departure time; the delay item of the first target station in the constructed feature sequence includes the initial delay time, and the delay items of the remaining target stations are preset to zero.

[0006] According to a deep learning-based train delay prediction method provided by the present invention, the feature sequence is input into a recurrent neural network model, and a predicted value of the delay time of the target train passing the target station is output, including: inputting the feature sequence into a synchronous many-to-many recurrent neural network model corresponding to the railway line on which the target train runs, and outputting a predicted value of the delay time of the target train passing the target station.

[0007] A method for predicting train delays based on deep learning provided by the present invention also includes: constructing a sample set based on train operation information of a target railway line; determining the characteristic information composition of train samples in the sample set based on the train operation information; extracting a time series of the delays for the operation information of the train samples in the sample set based on the initial delay time, and obtaining the characteristic information of the train samples in the sample set; constructing a first characteristic sequence of the stations that the train samples in the sample set will pass through after the initial delay occurs based on the time series of the delays and the characteristic information; dividing the train samples in the sample set into a training set, a validation set and a test set; establishing the synchronous many-to-many recurrent neural network model; and comparing the train samples in the training set and the validation set. The first feature sequence of the train samples in the training set and / or the validation set is input into the synchronous many-to-many recurrent neural network model, and the parameters of the synchronous many-to-many recurrent neural network model are adjusted according to the positive delay time series; the first feature sequence of the train samples in the training set and / or the validation set is input into the synchronous many-to-many recurrent neural network model after the parameter adjustment, and feature selection is performed on the feature information to obtain the target feature information; according to the positive delay time series and the target feature information, a second feature sequence of the stations that the train samples in the test set will pass through after the initial delay occurs is constructed; the second feature sequence of the train samples in the test set is input into the synchronous many-to-many recurrent neural network model after the parameter adjustment, and the performance of the synchronous many-to-many recurrent neural network model after the parameter adjustment is tested.

[0008] According to a method for predicting train delays based on deep learning provided by the present invention, according to the initial delay time, the operation information of the train samples in the sample set is subjected to extraction of the delay time series, including: for the itinerary of the train samples with only one initial delay, extracting the delay time series from the station where the initial delay occurs to the terminal station; for the itinerary of the train samples with more than two initial delays, extracting the delay time series from the station where each initial delay occurs to the station before the next initial delay occurs, except the station where the last initial delay occurs, and extracting the delay time series from the station where the last initial delay occurs to the terminal station.

[0009] According to a method for predicting train delays based on deep learning provided by the present invention, the first feature sequence of train samples in the training set and / or the validation set is input into a synchronous many-to-many recurrent neural network model after the parameters are adjusted, and feature selection is performed on the feature information to obtain the target feature information, including: inputting the first feature sequence of train samples in the training set and / or the validation set into a synchronous many-to-many recurrent neural network model after the parameters are adjusted; and performing feature selection on each feature in the first feature sequence of the train samples through captum to obtain the target feature information.

[0010] In the second aspect, the present invention also provides a train delay prediction device based on deep learning, comprising: a first processing module, used to obtain the initial delay time and the target feature information of the target station that the target train will pass through after the initial delay occurs according to the initial delay of the target train; a second processing module, used to construct a feature sequence for the target station according to the initial delay time and the target feature information of the target station; a third processing module, used to input the feature sequence into a synchronous many-to-many recurrent neural network model, and output a predicted value of the delay time of the target train passing through the target station; wherein, for two adjacent stations, when outputting the predicted value of the delay time of the latter station, the initial delay time or the predicted value of the delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model.

[0011] In a third aspect, the present invention also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned methods for predicting train delays based on deep learning are implemented.

[0012] In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the deep learning-based train delay prediction methods described above.

[0013] The present invention provides a method, device, equipment and medium for predicting the actual delay of a train based on deep learning. The method, device, equipment and medium obtain the target feature information of the target station that the target train will pass through after the initial delay occurs according to the initial delay of the target train; construct a feature sequence for the target station according to the initial delay time and the target feature information of the target station; input the feature sequence into a synchronous many-to-many recurrent neural network model, and output the predicted value of the actual delay time of the target train passing through the target station; wherein, for two adjacent stations, when outputting the predicted value of the actual delay time of the latter station, the initial delay time or the predicted value of the actual delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model. It can be seen that for the target train, the prediction of the actual delay time of the train is started after the initial delay of the target train, and the feature sequence constructed according to the initial delay time and the target feature information is used as the input of the synchronous many-to-many recurrent neural network model, so that the model can refer to the target feature information of the target station, can quantitatively evaluate the delay time, and can also freely select the number of predicted stations. In addition, since the closer the passed station is to the station to be predicted, the greater its impact on the prediction, its feature weight should be higher. During model prediction, when outputting the predicted value of the exact delay time of the next station, the initial delay time or the predicted value of the exact delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model. In this way, the predicted value of the exact delay time of the next station can refer to the initial delay time or the predicted value of the exact delay time of the previous station in real time, which can enable the synchronous many-to-many recurrent neural network model to refer to the weights of different stations, further improving the accuracy of model prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0015] Figure 1 It is a flowchart of some embodiments of the method for predicting train delay based on deep learning provided by the present invention;

[0016] Figure 2 is a flowchart of some embodiments of constructing a synchronous many-to-many recurrent neural network model provided by the present invention;

[0017] Figure 3 is a schematic diagram of different structures of a recurrent neural network provided according to the present invention;

[0018] Figure 4It is a schematic diagram of predicting train delay using a synchronous many-to-many recurrent neural network model provided by the present invention;

[0019] Figure 5 It is a schematic diagram of the reduction of loss of the training set of the synchronous many-to-many recurrent neural network model provided according to the present invention;

[0020] Figure 6 It is a schematic diagram of the reduction of MAE of the synchronous many-to-many recurrent neural network model training set provided by the present invention;

[0021] Figure 7 It is a schematic diagram of the reduction of MAE of the validation set of the synchronous many-to-many recurrent neural network model provided by the present invention;

[0022] Figure 8 is a schematic diagram of prediction results of a synchronous many-to-many recurrent neural network model provided by the present invention;

[0023] Fig. 9 It is a schematic diagram of the structure of some embodiments of the train delay prediction device based on deep learning provided by the present invention;

[0024] Fig.10 It is a schematic diagram of the structure of an electronic device provided according to the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.

[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0030] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0031] See also Figure 1 , Figure 1 1 is a flow chart of some embodiments of the train delay prediction method based on deep learning provided by the present invention. Figure 1 As shown, the method comprises the following steps:

[0032] Step 101, according to the initial delay of the target train, the initial delay time and the target characteristic information of the target station that the target train will pass after the initial delay occurs are obtained.

[0033] In some embodiments, the target characteristic information may be the type of train (such as a through train or an intra-train train), season, whether it is a weekday or a holiday, the time period in which the initial delay occurs (0:00-6:00, 6:00-12:00, 12:00-18:00, 18:00-20:00), whether it is a station for adjustment (the station for adjustment is planned to not stop), the planned running speed of the target train, the number of historical passes through the station, the historical late arrival ratio of the station, the historical early arrival ratio of the station, the historical late arrival ratio of the station and the target train, the maximum historical delay absorption value of the section (i.e. the longest historical delay time in the train line), the maximum historical stop absorption value of the station (i.e. the longest historical delay time at the station), etc. As an example, the target train can be a train from Beijing to Shanghai on the Beijing-Shanghai line. Assume that the train passes through Beijing Station, Tianjin Station, Nanjing Station, Suzhou Station, and Shanghai Station. The scheduled departure times of the train are 7:00, 8:00, 9:00, 10:00, and 11:00, and the scheduled arrival times of the train are 6:30, 7:50, 8:50, 9:50, and 10:50, respectively. Beijing is the departure station and Shanghai is the terminal station. When the train departs from Beijing Station on time and arrives at Nanjing Station, the first delay occurs, that is, the initial delay time is obtained as follows: the actual arrival time of the train is 8:55, and the actual departure time of the train is 9:00. After the initial delay occurs, the target characteristic information of the target station that the target train will pass through can be the target characteristic information of Suzhou Station and Shanghai Station. For example, the target characteristic information of Suzhou Station can be summer, weekend, 6:00-12:00, and the planned running speed of the interval is 70km / h. The target characteristic information of Shanghai Station can be summer, weekend, 6:00-12:00, and the planned running speed of the interval is 60km / h.

[0034] Step 102: construct a feature sequence for the target station according to the initial delay time and the target feature information of the target station.

[0035] In some embodiments, the delay recovery situation after the initial delay is unknown and needs to be predicted. Therefore, when the model feature sequence is established, the entry and exit delay times of all stations except the station where the initial delay occurs must be set to 0 and then entered into the model as feature items.

[0036] In some optional embodiments, the initial delay time includes the arrival delay time or the departure delay time; the actual delay time includes the arrival time and / or the departure time; the delay item of the first target station in the constructed feature sequence includes the initial delay time, and the delay items of the remaining target stations are preset to zero.

[0037] In some embodiments, still taking the above as an example, the initial delay time may be the actual arrival time of the train at 8:55 and the actual departure time of the train at 9:00. In the constructed feature sequence, the delay item of the first target station includes the initial delay time, that is, the delay item of Nanjing Station can be obtained in the following way:

[0038] Train arrival delay time = train actual arrival time – train scheduled arrival time Train departure delay time = train actual departure time – train scheduled departure time

[0039] That is, the delay item of Nanjing Station can be (5,0). The delay items of other target stations are preset to zero, that is, the delay items of Suzhou Station and Shanghai Station are (0,0) and (0,0) respectively.

[0040] Still taking the above as an example, according to the initial delay time and the target feature information of the target station, the feature sequence constructed for the target station can be [(5, 0), (0, 0, summer, weekend, 6:00-12:00, planned operating speed of the interval is 70km / h), (0, 0, summer, weekend, 6:00-12:00, planned operating speed of the interval is 60km / h)].

[0041] Step 103, input the feature sequence into the synchronous many-to-many recurrent neural network model, and output the predicted value of the exact delay time of the target train passing the target station; wherein, for two adjacent stations, when outputting the predicted value of the exact delay time of the latter station, the initial delay time or the predicted value of the exact delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model.

[0042] Common time series data include: language model, handwriting recognition, sequence generation, machine translation, speech, video analysis, etc. There is a sequential relationship between samples in time series data, and each sample is associated with the sample before it, that is, the selection and decision refer to the previous state. Recurrent Neural Network (RNN) adds horizontal connections between units in the hidden layer based on the ordinary multi-layer back propagation (BP) neural network. Through a weight matrix, the value of the neural unit of the previous time series can be transferred to the current neural unit, so that the neural network has a memory function, which is very applicable to natural language processing or time series machine learning problems with contextual connections. For a standard RNN structure, the main structure input of the RNN at time t comes from the input layer Xt, and there is also a loop edge to provide the hidden state transmitted from time t-1.

[0043] The applicability of RNN models varies depending on the number of output and input sequences, such as Figure 3 As shown in the figure, RNN can have many different structures, and the five structures are: one-to-one, one-to-many, many-to-one, interval many-to-many, and synchronous many-to-many. Different structures naturally have different application scenarios. These five RNN model structures can correspond to Vanilla neural network, picture title generation, sentiment analysis, machine translation, and context prediction application scenarios respectively.

[0044] The data input of the present invention is a feature sequence, and the required output is the actual delay of all stations. Its natural sequence conforms to the two structures of the interval many-to-many and synchronous many-to-many RNN model. The biggest difference between the two is that in the interval many-to-many mode, the model cannot utilize the characteristics of the station where the train is about to run, while the synchronous many-to-many mode can. Therefore, this modeling selects the RNN model with a synchronous many-to-many structure, namely the synchronous many-to-many recurrent neural network model, as the basic network structure.

[0045] Specifically, for the synchronous many-to-many recurrent neural network model, the values ​​corresponding to all stations can be used as the input of the next station. That is, for two adjacent stations, when outputting the predicted value of the exact delay time of the latter station, the initial delay time or the predicted value of the exact delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model. Still taking the above as an example, after inputting the feature sequence [(5, 0), (0, 0, summer, weekend, 6:00-12:00, planned operating speed of the interval is 70km / h), (0, 0, summer, weekend, 6:00-12:00, planned operating speed of the interval is 60km / h)] into the synchronous many-to-many recurrent neural network model, the predicted arrival time of Suzhou Station is 9:55, and the departure time is 10:05, that is, the delay item is (5, 5). When predicting the exact delay time of Shanghai Station, the predicted value of the exact delay time (5, 5) is obtained as input, that is, the exact delay time of Shanghai Station is predicted by the sequence [(5, 5, summer, weekend, 6:00-12:00, planned operating speed of the interval is 70km / h), (0, 0, summer, weekend, 6:00-12:00, planned operating speed of the interval is 60km / h)].

[0046] In some optional embodiments, the feature sequence is input into a recurrent neural network model, and a predicted value of the exact delay time of the target train passing through the target station is output, including: inputting the feature sequence into a synchronous many-to-many recurrent neural network model corresponding to the railway line on which the target train runs, and outputting a predicted value of the exact delay time of the target train passing through the target station.

[0047] In some embodiments, still taking the above as an example, the target train may be a train from Beijing to Shanghai on the Beijing-Shanghai line, and the synchronous many-to-many recurrent neural network model corresponding to the train line is selected as the input model.

[0048] The method for predicting the actual delay of a train based on deep learning disclosed in some embodiments of the present invention is to obtain the target feature information of the target station that the target train will pass through after the initial delay occurs according to the initial delay of the target train; construct a feature sequence for the target station according to the initial delay time and the target feature information of the target station; input the feature sequence into a synchronous many-to-many recurrent neural network model, and output the predicted value of the actual delay time of the target train passing through the target station; wherein, for two adjacent stations, when outputting the predicted value of the actual delay time of the latter station, the initial delay time or the predicted value of the actual delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model. It can be seen that for the target train, the prediction of the actual delay time of the train is started after the initial delay of the target train, and the feature sequence constructed according to the initial delay time and the target feature information is used as the input of the synchronous many-to-many recurrent neural network model, so that the model can refer to the target feature information of the target station, can quantitatively evaluate the delay time, and can also freely select the number of predicted stations. In addition, since the closer the passed station is to the station to be predicted, the greater its impact on the prediction, its feature weight should be higher. During model prediction, when outputting the predicted value of the exact delay time of the next station, the initial delay time or the predicted value of the exact delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model. In this way, the predicted value of the exact delay time of the next station can refer to the initial delay time or the predicted value of the exact delay time of the previous station in real time, which can enable the synchronous many-to-many recurrent neural network model to refer to the weights of different stations, further improving the accuracy of model prediction.

[0049] See also Figure 2 , Figure 2 1 is a flowchart of some embodiments of building a synchronous many-to-many recurrent neural network model, including the following steps:

[0050] Step 201: construct a sample set based on the train operation information of the target railway line.

[0051] In some embodiments, as an example, the target railway line may be the Beijing-Shanghai line or the Sichuan-Tibet line, and the train operation information may be the actual delay time, average train operation time, total length of the railway line, etc. during the operation of the target railway line.

[0052] Step 202, determining the characteristic information composition of the train samples in the sample set according to the train operation information.

[0053] In some embodiments, the characteristic information may consist of the type of train, season, whether it is a weekday or a holiday, the time period when the initial delay occurs (0:00-6:00, 6:00-12:00, 12:00-18:00, 18:00-20:00), whether it is a station for adjustment (the station for adjustment is planned not to stop), the planned running speed of the target train, the number of historical passes of the station, the historical late arrival ratio of the station, the historical early arrival ratio of the station, the historical late arrival ratio of the station and the target train, the maximum historical delay absorption value of the section (i.e., the longest historical delay time in the train line), the maximum historical stay absorption value of the station (i.e., the longest historical stay delay time of the station), etc., which are some information other than the actual delay time of the railway line during operation.

[0054] Step 203: extract the positive delay time series of the running information of the train samples in the sample set according to the initial delay time, and obtain the characteristic information of the train samples in the sample set.

[0055] In some embodiments, some characteristic information is not conducive to the prediction of the train delay time, so it is necessary to obtain characteristic information that is conducive to the prediction based on the screening characteristic information composition.

[0056] In some optional embodiments, based on the initial delay time, the running information of the train samples in the sample set is subjected to extraction of the exact delay time series, including: for the itinerary of the train samples with only one initial delay, extracting the exact delay time series from the station where the initial delay occurs to the terminal station; for the itinerary of the train samples with two or more initial delays, extracting the exact delay time series from the station where each initial delay occurs to the station before the next initial delay occurs, except the station where the last initial delay occurs, and extracting the exact delay time series from the station where the last initial delay occurs to the terminal station.

[0057] In some embodiments, the extraction of the delay time series of the running information of the train samples in the sample set can be obtained by the following method:

[0058] Table 1 Train arrival / departure delay time for a certain line

[0059]

[0060] As shown in Table 1, the stations that a train on a certain line passes through are A, B, C, D, E, F, G, H, and I. The train arrival / departure delay time in Table 1 is Figure 1 The method mentioned in step 102 is used to obtain the data in Table 1 in units of min. Numbers greater than, equal to, and less than 0 represent late, on-time, and early, respectively. If a station has an initial arrival delay or an initial departure delay, it is determined to be the starting point of the initial delay sequence.

[0061] For a trip with only one initial delay, for example, case 1 in Table 1, the data sequence of the initial delay occurrence-terminal station is extracted as the data training model, that is, a sequence of length 5 is selected: [(0, 6), (5, 4), (-1, -1), (0, 0), (-1, 0)].

[0062] For trips with 2 or more initial delays, the following two sequences are extracted as data training models: a. Initial delay occurs - the station before the next initial delay occurs; b. Initial delay occurs - the final destination. For example, in case 2 in Table 1, two sequences of length 4 need to be selected, namely: [(6, 6), (5, 4), (0, 0), (0, 0)] and [(0, 2), (2, 3), (2, 0), (0, 0)]. When constructing a positive delay time series, quartiles can be used to delete abnormal data. Abnormal data is problematic data, and the model will be more robust after elimination.

[0063] Step 204, constructing a first feature sequence of the stations that the train samples in the sample set will pass through after the initial delay occurs according to the positive delay time sequence and feature information.

[0064] In some embodiments, taking situation 1 in Table 1 as an example, the positive delay time sequence is [(0, 6), (5, 4), (-1, -1), (0, 0), (-1, 0)], and the characteristic information can be [(summer, weekend, 6:00-12:00, the planned operating speed of the interval is 70 km / h), (summer, weekend, 6:00-12:00, the planned operating speed of the interval is 60 km / h), (summer, weekend, 12:00-18:00, the planned operating speed of the interval is 70 km / h), (summer, weekend, 12:00-18:00, the planned operating speed of the interval is 80 km / h), (summer, weekend, 18:00-20 , the planned operating speed of the interval is 90km / h)], then the first feature sequence is [(0, 6, summer, weekend, 6:00-12:00, the planned operating speed of the interval is 70km / h), (5, 4, summer, weekend, 6:00-12:00, the planned operating speed of the interval is 60km / h), (-1, -1, summer, weekend, 12:00-18:00, the planned operating speed of the interval is 70km / h), (0, 0, summer, weekend, 12:00-18:00, the planned operating speed of the interval is 80km / h), (-1, 0, summer, weekend, 18:00-20:00, the planned operating speed of the interval is 90km / h)].

[0065] Step 205, dividing the train samples in the sample set into a training set, a validation set and a test set.

[0066] Step 206, establishing a synchronous many-to-many recurrent neural network model.

[0067] Step 207, input the first feature sequence of the train samples in the training set and the validation set into the synchronous many-to-many recurrent neural network model, and adjust the parameters of the synchronous many-to-many recurrent neural network model according to the positive delay time series.

[0068] In some embodiments, when the length of the first feature sequence is different, pack and pad operations can be used to implement training. Unfixed length sequences cannot be directly supplemented with 0 after the sequence, because 0 is meaningful in the data. Even if it is meaningless, after supplementing 0, the model will propagate forward at the place of 0, resulting in unreliable output of the model. Therefore, the processing flow in pytorch is adopted: pad-->pack-->model forward propagation.

[0069] Step 208 , input the first feature sequence of the train samples in the training set and / or the validation set into the synchronous many-to-many recurrent neural network model with adjusted parameters, perform feature selection on the feature information, and obtain target feature information.

[0070] In some optional embodiments, the first feature sequence of train samples in the training set and / or the validation set is input into a synchronous many-to-many recurrent neural network model with adjusted parameters, and feature selection is performed on feature information to obtain target feature information, including: the first feature sequence of train samples in the training set and / or the validation set is input into a synchronous many-to-many recurrent neural network model with adjusted parameters; feature selection is performed on each feature in the first feature sequence of train samples through captum to obtain target feature information.

[0071] In some embodiments, a certain amount of data is put into the model for training at one time, and the partial derivative of each feature value of each data in the certain amount of data to the target is calculated, and the higher the gradient value, the more significant the attribute is. Each feature value of each data represents a feature in the sequence.

[0072] Step 209, constructing a second feature sequence of the stations that the train samples in the test set will pass through after the initial delay occurs according to the positive delay time sequence and the target feature information.

[0073] Step 210, input the second feature sequence of the train samples in the test set into the synchronized many-to-many recurrent neural network model with adjusted parameters, and test the performance of the synchronized many-to-many recurrent neural network model with adjusted parameters.

[0074] As an example, the specific steps for establishing a synchronous many-to-many recurrent neural network model can refer to the following steps:

[0075] Step 1: Establish the target data set, for example: Beijing-Guangzhou Line, Beijing-Shanghai Line, and national lines. Modeling can be based on the Beijing-Shanghai high-speed rail data for the whole year of 2019, with a total of 118,887 trips and 4,354,281 records. Here, a single trip is defined as a train running from the departure station to the terminal station; high-speed rail data is defined as trips with train numbers starting with D, C, or G;

[0076] Step 2: Data cleaning and screening: Perform operations such as missing data completion, duplicate data deletion, and abnormal data deletion for the target data set. The specific operations can be referred to as follows: delete duplicate samples, delete itineraries with less than 3 stations, delete itineraries with missing station names, and delete itineraries with abnormal running time or planned time;

[0077] Step 3: Feature construction: Construct features from multiple perspectives by combining data characteristics and business knowledge;

[0078] Step 4: Data preprocessing: normalize continuous features and make categorical variables unique;

[0079] Step 5: Sequence extraction: extract the initial late segment sequence as input data;

[0080] Step 6: Data segmentation: divide the data into training set, validation set, and test set;

[0081] Step 7: Establish a synchronous many-to-many recurrent neural network model: select the number of hidden layers, the number of neural units in the input layer, hidden layer, and output layer;

[0082] Step 8: Model parameter adjustment: Set different network parameters and model training parameters, use captum to score features and adjust input features, and repeatedly evaluate the experimental model on the validation set according to the evaluation indicators until the optimal parameters are found. After a large number of comparative tests, the network structure parameters and training-related parameters of the synchronous many-to-many recurrent neural network model are set as follows: number of hidden layers: 4, number of hidden layer neurons: 512, network bidirectionality: False, model loss: SmoothL1Loss, model optimization algorithm: Adam, initial learning rate: 1e-3, decaying by 10% every 10 epochs, training epochs: 180, training batch size: 32, validation batch size: 64. Figure 4 is a schematic diagram of using a synchronous many-to-many recurrent neural network model to predict train delays according to the present invention. The above parameters are as follows: Figure 4 shown.

[0083] like Figure 5 , 67. During the 180 epoch training process, the training set loss and mean absolute error (MAE) have always maintained a downward trend, and the model fitting ability is good. From the validation set, MAE (mean absolute error) has reached the optimal value at about 20 epochs, which means that if the training is terminated early at about 20 epochs, it will not have much impact on the model accuracy;

[0084] Step 9: Accuracy calculation: For all initial delay segments in the test set, accuracy = total correct number calculated for all stations / total number of predicted stations. If the absolute value of the difference between the predicted value and the true value is within 1 minute, it is judged to be correct; MAE = mean absolute error.

[0085] When epoch=79, the accuracy of the validation set reaches the best. The model at this time is selected as the best performing model. The results are as follows:

[0086] Table 2 Training effect

[0087]

[0088] The accuracy calculation is for all initial delayed segments in the target data. Accuracy = total correct number of calculated stations for all stations / total number of predicted stations. When the absolute value of the difference between the predicted value and the true value is within 1 minute, the probability that the accurate route rate of the arrival delay time judged by the training set / validation set is correct is 0.82 and 0.68 respectively, and the probability that the accurate route rate of the departure delay time judged by the training set / validation set is correct is 0.82 and 0.69 respectively; when the absolute value of the difference between the predicted value and the true value is within 2 minutes, the probability that the accurate route rate of the arrival delay time judged by the training set / validation set is correct is 0.96 and 0.86 respectively, and the probability that the accurate route rate of the departure delay time judged by the training set / validation set is correct is 0.96 and 0.86 respectively.

[0089] like Figure 8 As shown in the figure, a piece of initial delay segment data is randomly selected to visualize the predicted value and the true value. It is found that the overall trend of the predicted value and the true value is consistent, and the MAE deviation is not large.

[0090] from Figure 2 It can be seen that Figure 2 The deep learning-based train delay prediction method in some corresponding embodiments embodies the ability to extract the delay time series from the sample set, obtain the feature information of the train samples in the sample set to construct a first feature sequence, and then establish a synchronous many-to-many recurrent neural network model. According to the characteristics of the model, the specific delay time can be predicted, and the number of predicted stations can be adjusted arbitrarily, giving higher weights to stations closer to the predicted stations, thereby improving the prediction accuracy.

[0091] See also Fig. 9 , Fig. 9 1 is a schematic diagram of the structure of some embodiments of the train delay prediction device based on deep learning provided by the present invention. As an implementation of the methods shown in the above figures, the present invention also provides some embodiments of the train delay prediction device based on deep learning. These device embodiments are similar to Figure 1 The embodiments of some methods shown correspond to each other, and the device can be applied to various electronic devices.

[0092] like Fig. 9 As shown, some embodiments of the train delay prediction device 900 based on deep learning include a first processing module 901, a second processing module 902, and a third processing module 903: the first processing module 901 is used to obtain the initial delay time and the target feature information of the target station that the target train will pass after the initial delay occurs according to the initial delay of the target train; the second processing module 902 is used to construct a feature sequence for the target station according to the initial delay time and the target feature information of the target station; the third processing module 903 is used to input the feature sequence into a synchronous many-to-many recurrent neural network model, and output a predicted value of the delay time of the target train passing the target station; wherein, for two adjacent stations, when outputting the predicted value of the delay time of the latter station, the initial delay time or the predicted value of the delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model.

[0093] In optional implementations of some embodiments, the initial delay time includes the arrival delay time or the departure delay time; the actual delay time includes the arrival time and / or the departure time; the delay item of the first target station in the constructed feature sequence includes the initial delay time, and the delay items of the remaining target stations are preset to zero.

[0094] In an optional implementation of some embodiments, the third processing module 903 includes: an output unit, used to input the feature sequence into a synchronous many-to-many recurrent neural network model corresponding to the railway line on which the target train runs, and output a predicted value of the delay time of the target train passing through the target station.

[0095] In an optional implementation of some embodiments, the device 900 further includes: a first construction module, used to construct a sample set according to the train operation information of the target railway line; a second construction module, used to determine the characteristic information composition of the train samples in the sample set according to the train operation information; an extraction module, used to extract the positive delay time series of the operation information of the train samples in the sample set according to the initial delay time, and obtain the characteristic information of the train samples in the sample set; a third construction module, used to construct a first characteristic sequence of the stations that the train samples in the sample set will pass after the initial delay occurs according to the positive delay time series and the characteristic information; a fourth processing module, used to divide the train samples in the sample set into a training set, a validation set and a test set; a fourth construction module, used to establish a synchronous many-to-many recurrent neural network model; an adjustment module, used to The invention discloses a method for inputting the first feature sequence of train samples in the training set and the validation set into the synchronous many-to-many recurrent neural network model, and adjusting the parameters of the synchronous many-to-many recurrent neural network model according to the time series of the actual delay; a feature selection module, which is used to input the first feature sequence of train samples in the training set and / or the validation set into the synchronous many-to-many recurrent neural network model after the parameters are adjusted, perform feature selection on the feature information, and obtain target feature information; a fifth construction module, which is used to construct, according to the time series of the actual delay and the target feature information, a second feature sequence of the stations that the train samples in the test set will pass through after the initial delay occurs; a detection module, which is used to input the second feature sequence of train samples in the test set into the synchronous many-to-many recurrent neural network model after the parameters are adjusted, and detect the performance of the synchronous many-to-many recurrent neural network model after the parameters are adjusted.

[0096] In an optional implementation of some embodiments, the extraction module is also used to: for a train sample itinerary with only one initial delay, extract the time sequence of the actual delay from the station where the initial delay occurs to the terminal station; for a train sample itinerary with more than two initial delays, extract the time sequence of the actual delay from the station where each initial delay occurs to the station before the next initial delay occurs, except for the station where the last initial delay occurs, and the time sequence of the actual delay from the station where the last initial delay occurs to the terminal station.

[0097] In an optional implementation of some embodiments, the feature selection module is also used to: input the first feature sequence of train samples in the training set and / or the validation set into a synchronous many-to-many recurrent neural network model with adjusted parameters; perform feature selection on each feature in the first feature sequence of the train samples through captum to obtain target feature information.

[0098] It is understandable that the modules described in the device 900 are similar to those described in the reference Figure 1Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 900 and the modules and units contained therein, and will not be described in detail here.

[0099] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020 and the memory 1030 complete mutual communication through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute a train delay prediction method based on deep learning, the method comprising: obtaining the initial delay time and the target feature information of the target station that the target train will pass after the initial delay occurs according to the initial delay of the target train; constructing a feature sequence for the target station according to the initial delay time and the target feature information of the target station; inputting the feature sequence into a synchronous many-to-many recurrent neural network model, and outputting a predicted value of the delay time of the target train passing the target station; wherein, for two adjacent stations, when outputting the predicted value of the delay time of the latter station, the initial delay time or the predicted value of the delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model.

[0100] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0101] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the deep learning-based train delay prediction method provided by the above methods, the method including: according to the initial delay of the target train, obtaining the initial delay time and the target feature information of the target station that the target train will pass after the initial delay occurs; according to the initial delay time and the target feature information of the target station, constructing a feature sequence for the target station; inputting the feature sequence into a synchronous many-to-many recurrent neural network model, and outputting the predicted value of the delay time of the target train passing the target station; wherein, for two adjacent stations, when outputting the predicted value of the delay time of the latter station, the initial delay time or the predicted value of the delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model.

[0102] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the deep learning-based train delay prediction method provided by the above-mentioned methods, the method comprising: obtaining the initial delay time and the target feature information of the target station that the target train will pass through after the initial delay occurs according to the initial delay of the target train; constructing a feature sequence for the target station according to the initial delay time and the target feature information of the target station; inputting the feature sequence into a synchronous many-to-many recurrent neural network model, and outputting a predicted value of the delay time of the target train passing through the target station; wherein, for two adjacent stations, when outputting the predicted value of the delay time of the latter station, the initial delay time or the predicted value of the delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model.

[0103] The device embodiments described above are merely illustrative, wherein the units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the above methods of each embodiment or some parts of the embodiments.

[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A train delay prediction method based on deep learning, characterized in that: The method comprises: According to the initial delay of the target train, the initial delay time and target characteristic information of the target station that the target train will pass after the initial delay occurs are obtained; Constructing a feature sequence for the target station according to the initial delay time and the target feature information of the target station; The feature sequence is input into a synchronous many-to-many recurrent neural network model, and a predicted value of the exact delay time of the target train passing through the target station is output; wherein, for two adjacent stations, when outputting the predicted value of the exact delay time of the latter station, the initial delay time or the predicted value of the exact delay time of the previous station is used as the input of the synchronous many-to-many recurrent neural network model; Also includes: Constructing a sample set based on the train operation information of the target railway line; Determining the characteristic information composition of the train samples in the sample set according to the train operation information; Extracting the positive delay time series of the running information of the train samples in the sample set according to the initial delay time, and obtaining the characteristic information of the train samples in the sample set; Constructing, according to the positive delay time series and the characteristic information, a first characteristic sequence of the stations that the train samples in the sample set will pass through after the initial delay occurs; Dividing the train samples in the sample set into a training set, a validation set and a test set; Establishing the synchronous many-to-many recurrent neural network model; Inputting the first feature sequence of the train samples in the training set and the validation set into the synchronous many-to-many recurrent neural network model, and adjusting the parameters of the synchronous many-to-many recurrent neural network model according to the positive delay time series; Inputting the first feature sequence of the train samples in the training set and / or the validation set into the synchronous many-to-many recurrent neural network model with adjusted parameters, performing feature selection on the feature information, and obtaining the target feature information; Constructing, according to the positive delay time series and the target feature information, a second feature sequence of the train samples in the test set for the stations that the train will pass through after the initial delay occurs; Inputting the second feature sequence of the train samples in the test set into the synchronous many-to-many recurrent neural network model after parameter adjustment, and testing the performance of the synchronous many-to-many recurrent neural network model after parameter adjustment; The extracting of the positive delay time series of the running information of the train samples in the sample set according to the initial delay time includes: For a train sample with only one initial delay, extract the positive delay time series from the station where the initial delay occurs to the terminal station; For the itinerary of train samples with more than two initial delays, extract the exact delay time series from the station where each initial delay occurs to the station before the next initial delay occurs, except for the station where the last initial delay occurs, and the exact delay time series from the station where the last initial delay occurs to the terminal station.

2. The train delay prediction method based on deep learning according to claim 1 is characterized in that: The initial delay time includes the arrival delay time or the departure delay time; The actual delay time includes the arrival time and / or the departure time; In the constructed feature sequence, the delay item of the first target station includes the initial delay time, and the delay items of the remaining target stations are preset to zero.

3. The train delay prediction method based on deep learning according to claim 2 is characterized in that: The step of inputting the feature sequence into a recurrent neural network model and outputting a predicted value of the delay time of the target train passing through the target station comprises: The feature sequence is input into a synchronous many-to-many recurrent neural network model corresponding to the railway line on which the target train runs, and a predicted value of the delay time of the target train passing through the target station is output.

4. The train delay prediction method based on deep learning according to claim 1, characterized in that: The inputting of the first feature sequence of the train samples in the training set and / or the validation set into the synchronized many-to-many recurrent neural network model after parameter adjustment, performing feature selection on the feature information, and obtaining the target feature information comprises: Inputting the first feature sequence of train samples in the training set and / or validation set into the synchronized many-to-many recurrent neural network model with adjusted parameters; Feature selection is performed on each feature in the first feature sequence of the train sample through captum to obtain the target feature information.

5. A train delay prediction device based on deep learning, characterized in that: The device comprises: The first processing module is used to obtain the target characteristic information of the target station that the target train will pass through after the initial delay occurs according to the initial delay of the target train; A second processing module is used to construct a feature sequence for the target station according to the initial delay time and the target feature information of the target station; A third processing module is used to input the feature sequence into a synchronous many-to-many recurrent neural network model, and output a predicted value of the exact delay time of the target train passing through the target station; wherein, for two adjacent stations, when outputting the predicted value of the exact delay time of the latter station, the initial delay time or the predicted value of the exact delay time of the previous station is used as an input of the synchronous many-to-many recurrent neural network model; The device also includes: A first construction module is used to construct a sample set according to the train operation information of the target railway line; The second building module is used to determine the characteristic information composition of the train samples in the sample set according to the train operation information; An extraction module, used for extracting the positive delay time series of the running information of the train samples in the sample set according to the initial delay time, and obtaining the characteristic information of the train samples in the sample set; A third construction module is used to construct a first characteristic sequence of the stations that the train samples in the sample set will pass through after the initial delay occurs according to the positive delay time sequence and the characteristic information; A fourth processing module, used for dividing the train samples in the sample set into a training set, a validation set and a test set; A fourth building block is used to establish the synchronous many-to-many recurrent neural network model; An adjustment module, used for inputting the first feature sequence of the train samples in the training set and the validation set into the synchronous many-to-many recurrent neural network model, and adjusting the parameters of the synchronous many-to-many recurrent neural network model according to the positive delay time series; A feature selection module, used for inputting the first feature sequence of the train samples in the training set and / or the validation set into the synchronous many-to-many recurrent neural network model after parameter adjustment, performing feature selection on the feature information, and obtaining the target feature information; A fifth construction module is used to construct a second feature sequence of the train samples in the test set for the stations that the train will pass after the initial delay occurs according to the positive delay time sequence and the target feature information; A detection module, used for inputting the second feature sequence of the train samples in the test set into the synchronous many-to-many recurrent neural network model after parameter adjustment, and detecting the performance of the synchronous many-to-many recurrent neural network model after parameter adjustment; The extracting of the positive delay time series of the running information of the train samples in the sample set according to the initial delay time includes: For a train sample with only one initial delay, extract the positive delay time series from the station where the initial delay occurs to the terminal station; For the itinerary of train samples with more than two initial delays, extract the exact delay time series from the station where each initial delay occurs to the station before the next initial delay occurs, except for the station where the last initial delay occurs, and the exact delay time series from the station where the last initial delay occurs to the terminal station.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the train delay prediction method based on deep learning as described in any one of claims 1 to 4 are implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the train delay prediction method based on deep learning as described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Train delay and behind-schedule information feedback system

    CN106696997A

  • Train delay artificial neural network identification method based on train operation order

    CN108764526A

  • A method for establishing a high-speed train initial delay influence prediction model

    CN109359788A

  • Deep Neural Network Modeling Method for Train Delay Forecasting of High Speed Railway

    CN109508751A

  • high-speed railway train operation late time prediction method

    CN109840639A