A method and apparatus for determining train arrival time.
By acquiring and analyzing train route data, train arrival times can be determined, solving the problem of train companies not providing arrival times and supporting passenger flow sorting and decision-making.
Patent Information
- Application Number
- CN202311402803.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-10-26
AI Technical Summary
The train company did not provide the arrival times of each train at each station, making it impossible to sort out passenger flow and make some auxiliary decisions for train operations.
By acquiring train schedule duration data, train routes, and passenger exit times at all stations, as well as the train direction and planned intervals between adjacent trains corresponding to the passenger exit times, the initial train arrival times at each station on the train line are determined. Based on the train schedule duration data and direction of travel, the target train arrival times at all stations on the target train route are determined.
It enables the determination of arrival times at each station along a train route, supporting personnel in relevant fields to sort passenger flow and make auxiliary decisions for train operations.
Smart Images

Figure CN117184184B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of train operation technology, and more specifically, to a method and apparatus for determining train arrival time. Background Technology
[0002] With urban development, train travel has become an integral part of people's lives. After trains begin operation, relevant personnel will analyze passenger flow based on train arrival times at each station and formulate auxiliary decisions for the trains. These decisions include estimating the actual train operation in the event of a confirmed emergency for subsequent simulations, identifying risk points in station locations and passageways, and providing auxiliary decisions such as station flow control.
[0003] However, train companies generally do not provide the arrival times of each train at each station, making it impossible to sort out passenger flow and make some auxiliary decisions for train operations. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a method, apparatus, electronic device and storage medium for determining train arrival times, which can determine the train arrival times of all stations on the target train route, so that relevant personnel can perform passenger flow sorting and make some auxiliary decisions for trains.
[0005] In a first aspect, embodiments of this application provide a method for determining train arrival time, the method comprising:
[0006] Obtain train schedule data for train lines, train routes, and passenger exit times for all stations, as well as the direction of train operation and the scheduled interval between adjacent trains corresponding to the passenger exit times;
[0007] The initial train arrival time at each station on the train line is determined based on the passenger exit time and the corresponding planned interval.
[0008] Based on the train schedule duration data, the initial train arrival times at all stations along the train line, and the corresponding directions of travel, determine the target train arrival times at all stations along the target train route.
[0009] In one possible implementation, based on train schedule duration data, the initial train arrival times at all stations along the train line, and the corresponding directions of travel, the target train arrival times at all stations along the target train route are determined, including:
[0010] For each direction of travel, the initial train arrival times corresponding to the direction of travel at all stations are sorted to obtain the train arrival time sequence;
[0011] The train arrival time sequence is sorted in descending order of the train operation sequence number of the station corresponding to the initial train arrival time in the direction of operation, and in ascending order of all the initial train arrival times corresponding to each station.
[0012] Iterate through the initial train arrival times in the train arrival time sequence in order;
[0013] Based on the initial train arrival time, train schedule duration data, and train arrival time sequence during the current traversal, determine the target train arrival times for all stations on the target train route that is in the same direction of travel.
[0014] In one possible implementation, based on the initial train arrival time, train schedule duration data, and train arrival time sequence, the target train arrival times for all stations on the target train route running in the same direction of travel are determined, including:
[0015] The train route with the same direction of travel and the most stations is determined as the initial train route.
[0016] Based on the initial train operation route, the arrival time of the currently traversed initial trains, the train schedule duration data, and the train arrival time sequence, determine the train arrival time of all stations in the initial train operation route;
[0017] Based on the train arrival time sequence, the intermediate train arrival time of all stations in the intermediate train operation route is selected from the train arrival times of all stations in the initial train operation route.
[0018] Based on the number of intermediate train arrival times at stations in the train arrival time sequence, determine whether the intermediate train operation route is the target train operation route;
[0019] If so, the arrival times of intermediate trains at all stations in the intermediate train route will be determined as the arrival times of target trains at all stations in the target train route.
[0020] In one possible implementation, the arrival times of all stations in the initial train operation route are determined based on the initial train operation route, the arrival times of the currently traversed initial trains, the train schedule duration data, and the train arrival time sequence, including:
[0021] Determine whether the station corresponding to the arrival time of the initial train in the current iteration is the terminal station in the initial train operation route;
[0022] If not, then based on the initial train arrival time, train schedule duration data, and train arrival time sequence of the current traversal, determine the train arrival times of all stations after the station corresponding to the initial train arrival time in the current traversal of the initial train operation route.
[0023] Determine whether the station corresponding to the arrival time of the initial train in the current iteration is the starting station in the initial train operation route;
[0024] If not, then based on the initial train arrival time, train schedule duration data, and train arrival time sequence of the current traversal, determine the arrival times of all stations in the initial train operation route that are before the station corresponding to the initial train arrival time of the current traversal.
[0025] In one possible implementation, based on the currently traversed initial train arrival time, train schedule duration data, and train arrival time sequence, the arrival times of all stations following the station corresponding to the currently traversed initial train arrival time in the initial train operation route are determined, including:
[0026] The initial arrival time of the trains currently being traversed is determined as the first latest arrival time;
[0027] Based on the train schedule duration data and the first latest arrival time, calculate the arrival time of the first train at the next station in the initial train route that corresponds to the first latest arrival time.
[0028] Determine whether there is an initial train arrival time in the train arrival time sequence that has a difference from the arrival time of the first train that is less than a preset threshold among all the initial train arrival times corresponding to the next station;
[0029] If such a time exists, the arrival time of the next station is determined from the initial train arrival times whose difference from the arrival time of the first train is less than a preset threshold; if such a time does not exist, the arrival time of the first train is determined as the arrival time of the next station.
[0030] Determine whether the next station of the station corresponding to the initial train arrival time of the current traversal is the terminal station in the initial train operation route; if it is not the terminal station in the initial train operation route, update the train arrival time of the next station to the latest arrival time.
[0031] Then, jump to the next station in the initial train route that corresponds to the station with the first latest arrival time, based on the train schedule duration data and the first latest arrival time, to calculate the arrival time of the first train at the next station, so as to continue execution.
[0032] In one possible implementation, based on the currently traversed initial train arrival time, train schedule duration data, and train arrival time sequence, the arrival times of all stations preceding the station corresponding to the currently traversed initial train arrival time in the initial train operation route are determined, including:
[0033] Set the initial train arrival time of the current traversal as the second latest arrival time;
[0034] Based on the train schedule duration data and the second latest arrival time, calculate the second train arrival time of the station preceding the station corresponding to the second latest arrival time in the initial train operation route;
[0035] Determine whether there is an initial train arrival time in the train arrival time sequence that corresponds to the previous station and has a difference from the arrival time of the second train that is less than a preset threshold.
[0036] If it exists, the train arrival time of the previous station is determined from the initial train arrival times whose difference with the arrival time of the second train is less than a preset threshold; if it does not exist, the arrival time of the second train is determined as the arrival time of the train of the previous station.
[0037] Determine whether the previous station of the station corresponding to the initial train arrival time of the current traversal is the starting station in the initial train operation route; if it is not the starting station in the initial train operation route, update the train arrival time of the previous station to the second latest arrival time.
[0038] Then, jump to the station above the station corresponding to the second latest arrival time in the initial train route, based on the train schedule duration data and the second latest arrival time, to calculate the arrival time of the second train at the station above the station corresponding to the second latest arrival time, and continue execution.
[0039] In one possible implementation, based on the train arrival time sequence, the intermediate train arrival times for all stations in the intermediate train route are selected from the train arrival times of all stations in the initial train operation route, including:
[0040] Starting from the station in the initial train route that corresponds to the arrival time of the current initial train, expand the stations sequentially to obtain at least one first extended route.
[0041] Take the station in the initial train route that corresponds to the arrival time of the current initial train as the endpoint, and expand the stations forward in sequence to obtain at least one second extended route;
[0042] Both the first extended route and the second extended route are identified as target extended routes;
[0043] The target extended route that is the same as the train operation route is determined as the intermediate train operation route; and the train arrival time of each station in the intermediate train operation route is determined as the intermediate train arrival time.
[0044] In one possible implementation, determining whether an intermediate train route is the target train route is based on the number of intermediate train arrival times at each station in the train arrival time sequence, including:
[0045] If the number of intermediate train arrival times at stations in an intermediate train route is 1 in the train arrival time sequence, then determine whether the difference between the intermediate train arrival time at a station in the intermediate train route that is included in the train arrival time sequence and the train arrival time at a station in other intermediate train routes is less than the time interval parameter.
[0046] If it is less than, then the intermediate train route will be determined as the target train route;
[0047] If, in an intermediate train route, the number of intermediate train arrival times at a station in the train arrival time sequence is greater than 1, then the intermediate train route is determined as the target train route.
[0048] Secondly, embodiments of this application also provide a device for determining train arrival time, wherein the method for determining train arrival time includes:
[0049] The acquisition module acquires train schedule duration data, train operation routes, and passenger exit times for all stations, as well as the direction of train operation and the planned interval between adjacent trains corresponding to the passenger exit times.
[0050] The determination module is used to determine the initial train arrival time at each station on the train line based on the passenger exit time and the corresponding planned interval.
[0051] The determination module is used to determine the target train arrival time for all stations in the target train operation route based on the train schedule duration data, the initial train arrival time of all stations on the train line, and the corresponding direction of operation.
[0052] In one possible implementation, the determining module is specifically used to sort the initial train arrival times of all stations corresponding to the operating direction for each direction of operation, thereby obtaining a train arrival time sequence. The train arrival time sequence is sorted in descending order of the train operation sequence number of the station corresponding to the initial train arrival time in the operating direction, and in ascending order of all initial train arrival times corresponding to each station. The module sequentially traverses the initial train arrival times in the train arrival time sequence. Based on the currently traversed initial train arrival times, train schedule duration data, and the train arrival time sequence, the module determines the target train arrival times for all stations on the target train operation route that is in the same operating direction.
[0053] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for determining train arrival time as described in any of the first aspects.
[0054] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the method for determining train arrival time as described in any of the first aspects.
[0055] This application provides a method and apparatus for determining train arrival times. The method includes: acquiring train schedule duration data for a train line, train routes, and passenger exit times at all stations, as well as the direction of travel of the trains corresponding to the passenger exit times and the planned intervals between adjacent trains; determining the initial train arrival time at each station on the train line based on the passenger exit times and corresponding planned intervals; and determining the target train arrival times at all stations on a target train route based on the train schedule duration data, the initial train arrival times at all stations on the train line, and the corresponding directions of travel. This application determines the initial train arrival times at each station on a train line using the passenger exit times and corresponding planned intervals, and then determines the target train arrival times at all stations on a target train route, enabling personnel in the relevant field to perform passenger flow analysis and make some auxiliary decisions regarding train operations. Attached Figure Description
[0056] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 A flowchart illustrating a method for determining train arrival time according to an embodiment of this application is shown;
[0058] Figure 2 A flowchart illustrating another method for determining train arrival time provided in an embodiment of this application is shown;
[0059] Figure 3 A schematic diagram of a train arrival time determination device provided in an embodiment of this application is shown.
[0060] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0062] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0063] To enable those skilled in the art to utilize the content of this application, and in conjunction with the specific application scenario of "train operation technology," the following embodiments are provided. For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is primarily described within the "train operation technology field," it should be understood that this is merely an exemplary embodiment.
[0064] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0065] The following is a detailed description of a method for determining train arrival time provided in an embodiment of this application.
[0066] Reference Figure 1 The diagram shown is a flowchart illustrating a method for determining train arrival time according to an embodiment of this application. The specific execution process of this method is as follows:
[0067] S101. Obtain the train schedule duration data, train operation routes, and passenger exit times for all stations, as well as the direction of operation of the trains corresponding to the passenger exit times and the scheduled intervals between adjacent trains.
[0068] S102. Determine the initial train arrival time at each station on the train line based on the passenger exit time and the corresponding planned interval.
[0069] S103. Based on the train schedule duration data, the initial train arrival times of all stations on the train line, and the corresponding running directions, determine the target train arrival times of all stations on the target train route within the train operation route.
[0070] This application provides a method for determining train arrival times. The method includes: acquiring train schedule duration data for a train line, train routes, and passenger exit times at all stations, as well as the direction of travel of the trains corresponding to the passenger exit times and the planned intervals between adjacent trains; determining the initial train arrival time for each station on the train line based on the passenger exit times and corresponding planned intervals; and determining the target train arrival times for all stations on a target train route based on the train schedule duration data, the initial train arrival times for all stations on the train line, and the corresponding directions of travel. This application determines the initial train arrival times for each station on a train line using the passenger exit times and corresponding planned intervals, and then determines the target train arrival times for all stations on a target train route, enabling personnel in the relevant field to perform passenger flow analysis and make some auxiliary decisions regarding train operations.
[0071] The exemplary steps of the embodiments of this application are described below:
[0072] S101. Obtain the train schedule duration data, train operation routes, and passenger exit times for all stations, as well as the direction of operation of the trains corresponding to the passenger exit times and the scheduled intervals between adjacent trains.
[0073] In this embodiment, there can be one or more train lines. Each train line includes multiple stations. The planned train duration data for a train line includes the travel time between adjacent stations and the stop time at each station. The travel time between stations and the stop time at each station can be the same or different, subject to the information provided by the subway company. Each train line can correspond to multiple train operation routes. A train operation route refers to the stations a train passes through when traveling on a train line in a certain direction, including both up and down directions. The direction of travel of the train corresponding to the passenger's exit time at a station refers to the direction of travel of the train carrying the passenger who exits the station at that time. The planned interval time between adjacent trains corresponding to the passenger's exit time at a station refers to the interval between the arrival time of the train carrying the passenger at that exit time and the corresponding train arriving at the previous and next stations.
[0074] Specifically, the process involves acquiring the paths of train lines in each direction of travel, the distances between stations, the transfer times between train lines, and initial passenger entry / exit data. Based on Dijkstra's algorithm, passenger travel paths are determined according to these data. The direction of travel of the trains corresponding to the initial passenger exit times in the initial passenger entry / exit data is determined based on the passenger travel paths and the paths in each direction of travel. The peak passenger flow for each initial passenger entry / exit data point is determined based on the number of such points. The initial passenger entry / exit data for each time period is first filtered based on the average of the peak passenger flow for multiple time periods. The first-filtered initial passenger entry / exit data is then second-filtered based on the arrival time difference between adjacent trains at each station to obtain target passenger entry / exit data. Finally, the initial passenger exit times for each station in the target passenger entry / exit data are determined as the final passenger exit times for each station.
[0075] Here, since multiple passengers will ride the train on the line, there will also be multiple passenger entry and exit data, referred to as initial passenger entry and exit data in this embodiment. The initial passenger entry and exit data includes the passenger's entry station, entry time, exit station, and exit time, referred to as initial passenger entry station, initial passenger entry time, initial passenger exit station, and initial passenger exit time in this embodiment.
[0076] Furthermore, based on the number of initial passenger entry and exit data, the peak passenger flow corresponding to each initial passenger entry and exit data point is determined, including:
[0077] In this embodiment of the application, the initial passenger entry and exit data is divided according to the initial passenger exit time and the first preset duration in the initial passenger entry and exit data to obtain initial passenger entry and exit data corresponding to multiple first time periods; wherein, the time corresponding to each first time period does not overlap; the number of initial passenger entry and exit data corresponding to each first time period is determined as the passenger flow peak of each initial passenger entry and exit data corresponding to each first time period.
[0078] For example, the initial passenger exit times in the initial passenger entry and exit data include 8:00, 8:01, 8:02, 8:03, 8:04, 8:05, and 8:06; the first preset duration is 4 minutes, so the first time period includes 8:00-8:03 and 8:04-8:06.
[0079] Furthermore, based on the average of the peak passenger flow data within multiple time periods, the initial passenger entry and exit data for each time period are first filtered, including:
[0080] In this embodiment of the application, the initial passenger entry and exit data are divided according to the second preset duration to obtain initial passenger entry and exit data corresponding to multiple second time periods; the initial passenger entry and exit data corresponding to each second time period that are less than the average value of the passenger flow peak value of the initial passenger entry and exit data corresponding to each second time period are filtered.
[0081] Furthermore, based on the arrival time difference of adjacent trains at each station, the initial passenger entry and exit data after the first filtering is filtered a second time to obtain the target passenger entry and exit data, including:
[0082] In this embodiment of the application, the initial passenger exit time difference in the initial passenger entry and exit data of each station after the first filtering is less than the arrival time difference of adjacent trains at each station.
[0083] S102. Determine the initial train arrival time at each station on the train line based on the passenger exit time and the corresponding planned interval.
[0084] In this embodiment of the application, the initial train arrival time of each station is obtained by subtracting the corresponding planned interval from the passenger exit time of each station.
[0085] S103. Based on the train schedule duration data, the initial train arrival times of all stations on the train line, and the corresponding running directions, determine the target train arrival times of all stations on the target train route within the train operation route.
[0086] Determine the arrival times of the target trains at all stations along the target train route using the following steps:
[0087] I. For each direction of travel, sort the initial train arrival times of all stations corresponding to the direction of travel to obtain the train arrival time sequence.
[0088] The initial train arrival time sequence is sorted in descending order by the train operation sequence number of the station corresponding to the initial train arrival time in the direction of operation, and in ascending order by the initial train arrival times of all the stations.
[0089] Here, the train sequence number of a station in the direction of travel refers to which station the train arrives at in that direction of travel.
[0090] Specifically, for each direction of travel, the initial train arrival times of all stations corresponding to the direction of travel are sorted in reverse order according to the train operation sequence number of the station to obtain the initial train arrival time sequence; the initial train arrival times of each station in the initial train arrival time sequence are sorted in ascending order according to the initial train arrival time to obtain the target train arrival time sequence.
[0091] For example, when the train is traveling in the upward direction, the train's arrival sequence number at station 1 is 1, and the train's arrival sequence number at station 2 is 2. The initial train arrival times at station 1 when the train is traveling in the upward direction include 8:00, 9:02, and 8:30; the initial train arrival times at station 2 when the train is traveling in the upward direction include 7:03, 9:05, 10:06, and 8:04. Therefore, the initial train arrival time sequence obtained by reversing the train's arrival sequence number at each station is: initial train arrival time at station 2 7:03, initial train arrival time at station 2 9:05, initial train arrival time at station 2 10:06, initial train arrival time at station 2 8:04, initial train arrival time at station 1 8:00, initial train arrival time at station 1 9:02, and initial train arrival time at station 1 8:30. The initial train arrival times for each station in the initial train arrival time sequence are sorted in ascending order to obtain the target train arrival time sequence as follows: initial train arrival time for station 2 is 7:03, initial train arrival time for station 2 is 8:04, initial train arrival time for station 2 is 9:05, initial train arrival time for station 2 is 10:06, initial train arrival time for station 1 is 8:00, initial train arrival time for station 1 is 8:30, and initial train arrival time for station 1 is 9:02.
[0092] II. Iterate through the initial train arrival times in the train arrival time sequence.
[0093] III. Based on the currently traversed train arrival times, train schedule duration data, and train arrival time sequence, determine the target train arrival times for all stations on the target train route that is in the same direction of travel.
[0094] Specifically, the train route with the most stops in the same direction of travel is identified as the initial train route. Based on the initial train route, the currently traversed initial train arrival times, train schedule duration data, and train arrival time sequence, the arrival times of all stations in the initial train route are determined. Based on the train arrival time sequence, the intermediate train arrival times of all stations in the intermediate train routes are determined from the train arrival times of all stations in the initial train route. Based on the number of intermediate train arrival times of stations in the intermediate train routes within the train arrival time sequence, it is determined whether the intermediate train route is the target train route. If so, the intermediate train arrival times of all stations in the intermediate train routes are determined as the target train arrival times for all stations in the target train route.
[0095] Reference Figure 2 The diagram shown is a flowchart illustrating a method for determining train arrival time according to an embodiment of this application. The exemplary steps of this embodiment are described below:
[0096] S201. The train operation route with the same direction of operation and the most stations is determined as the initial train operation route.
[0097] In this embodiment of the application, if the running direction is upward, the train running routes with the running direction upward include train running routes 1, train running routes 2 and train running routes 3. Among them, train running routes 3 passes through the most stations, so train running routes 3 are determined as the initial train running routes.
[0098] S202. Based on the initial train operation route, the arrival time of the currently traversed initial trains, the planned train duration data, and the train arrival time sequence, determine the arrival time of all stations in the initial train operation route.
[0099] The following steps are used to determine the train arrival times at all stations in the initial train operation route:
[0100] I. Determine whether the station corresponding to the arrival time of the initial train in the current traversal is the terminal station in the initial train operation route.
[0101] In this embodiment of the application, it is determined whether the station corresponding to the arrival time of the initial train being traversed is the last station in the initial train operation route.
[0102] II. If not, then based on the initial train arrival time, train schedule duration data, and train arrival time sequence of the current traversal, determine the train arrival times of all stations after the station corresponding to the initial train arrival time in the initial train operation route.
[0103] In the embodiments of this application, all stations in the initial train operation route that are after the station corresponding to the arrival time of the initial train in the current traversal refer to the stations that are reached after the station corresponding to the arrival time of the initial train in the current traversal.
[0104] For example, the initial train route includes stations 3, 4, and 5, and the order of operation is stations 3, 4, and 5. If the station corresponding to the arrival time of the currently traversed initial train is station 3, then the stations following the station corresponding to the arrival time of the currently traversed initial train in the initial train route are stations 4 and 5.
[0105] The following steps are used to determine the arrival times of all stations following the station corresponding to the initial train arrival time in the currently traversed train route:
[0106] Step 1: Determine the initial train arrival time of the current traversal as the first latest arrival time.
[0107] For example, if the initial train arrival time of the current traversal is 9:30 for station 3, then the initial train arrival time of station 3, 9:30, is determined as the first latest arrival time.
[0108] Step 2: Based on the train schedule duration data and the first latest arrival time, calculate the arrival time of the first train at the next station corresponding to the first latest arrival time in the initial train operation route.
[0109] In this embodiment of the application, the running time between the station corresponding to the first latest arrival time and the next station in the train schedule duration data is calculated, and the sum of the running time between the station and the next station is calculated, and the dwell time at the station corresponding to the first latest arrival time is obtained. The first latest arrival time is added to the sum to obtain the first train arrival time at the next station.
[0110] Step 3: Determine whether there is an initial train arrival time in the train arrival time sequence that corresponds to the next station and has a difference from the first train arrival time that is less than a preset threshold.
[0111] Step 4: If a train arrives at a station, determine the arrival time of the next station from the initial train arrival times whose difference from the arrival time of the first train is less than a preset threshold; if no train arrives at a station, determine the arrival time of the first train as the arrival time of the next station.
[0112] In this embodiment of the application, the train arrival time of the next station is determined by the train arrival time with the smallest difference from the first train arrival time among the initial train arrival times whose difference from the first train arrival time is less than a preset threshold; and the train arrival time of the next station is deleted from the train arrival time sequence.
[0113] Step 5: Determine whether the next station of the station corresponding to the initial train arrival time of the current traversal is the terminal station in the initial train operation route; if it is not the terminal station in the initial train operation route, update the train arrival time of the next station to the latest arrival time.
[0114] Step 6: Then jump to the step of calculating the arrival time of the first train at the next station corresponding to the first latest arrival time in the initial train operation route based on the train schedule duration data and the first latest arrival time, and continue execution.
[0115] III. Determine whether the station corresponding to the arrival time of the initial train in the current traversal is the starting station in the initial train operation route.
[0116] IV. If not, then based on the initial train arrival time, train schedule duration data, and train arrival time sequence of the current traversal, determine the arrival times of all stations in the initial train operation route that are before the station corresponding to the initial train arrival time of the current traversal.
[0117] In the embodiments of this application, all stations in the initial train operation route that are before the station corresponding to the arrival time of the current traversed initial train refer to the stations that are reached before the station corresponding to the arrival time of the current traversed initial train in the initial train operation route.
[0118] For example, the initial train route includes stations 3, 4, and 5, and the order of operation is stations 3, 4, and 5. If the station corresponding to the arrival time of the currently traversed initial train is station 5, then the stations following the station corresponding to the arrival time of the currently traversed initial train in the initial train route are stations 3 and 4.
[0119] The following steps are used to determine the arrival times of all stations preceding the station corresponding to the current arrival time of the initial train in the initial train route:
[0120] Step 1: Determine the initial train arrival time of the current traversal as the second latest arrival time.
[0121] For example, if the initial train arrival time of the current traversal is 9:30 for station 5, then the initial train arrival time of station 5, 9:30, is determined as the second latest arrival time.
[0122] Step 2: Based on the train schedule duration data and the second latest arrival time, calculate the arrival time of the second train at the station preceding the station corresponding to the second latest arrival time in the initial train operation route.
[0123] In this embodiment of the application, the running time between the station corresponding to the second latest arrival time and the previous station in the train schedule duration data is calculated, and the dwell time at the station corresponding to the second latest arrival time is summed to obtain a sum value; the second latest arrival time is subtracted from the sum value to obtain the second train arrival time at the previous station.
[0124] Step 3: Determine whether there is an initial train arrival time in the train arrival time sequence that corresponds to the previous station and has a difference from the second train arrival time that is less than a preset threshold.
[0125] Step 4: If it exists, determine the train arrival time of the previous station from the initial train arrival times whose difference from the arrival time of the second train is less than a preset threshold; if it does not exist, the arrival time of the second train is determined as the arrival time of the train of the previous station.
[0126] In this embodiment of the application, the train arrival time of the previous station is determined by the train arrival time with the smallest difference from the second train arrival time among the initial train arrival times whose difference from the second train arrival time is less than a preset threshold; and the previous arrival time is deleted from the train arrival time sequence.
[0127] Step 5: Determine whether the previous station of the station corresponding to the current initial train arrival time is the starting station in the initial train operation route; if it is not the starting station in the initial train operation route, update the train arrival time of the previous station to the second latest arrival time.
[0128] Step 6: Then jump to the step of calculating the arrival time of the second train at the station above the station corresponding to the second latest arrival time in the initial train route based on the train schedule duration data and the second latest arrival time, and continue execution.
[0129] S203. Based on the train arrival time sequence, select the intermediate train arrival time for all stations in the intermediate train operation route from the train arrival times of all stations in the initial train operation route.
[0130] Specifically, the station in the initial train operation route that corresponds to the arrival time of the current initial train is taken as the starting point, and the stations are expanded sequentially to obtain at least one first extended route;
[0131] For example, the initial train route's running sequence is station 1, station 2, station 3, station 4, station 5; where the station corresponding to the arrival time of the currently traversed initial train is station 2, then the first extended route includes {station 2, station 3}, {station 2, station 3, station 4}, and {station 2, station 3, station 4, station 5}.
[0132] Specifically, the station corresponding to the arrival time of the current initial train in the initial train route is taken as the endpoint, and the stations are extended forward in sequence to obtain at least one second extended route.
[0133] In this embodiment of the application, the operating sequence of the initial train route is station 1, station 2, station 3, station 4, and station 5 in sequence; wherein, the station corresponding to the arrival time of the initial train being traversed is station 2, then the second extended route includes {station 1, station 2}.
[0134] Specifically, both the first extended route and the second extended route are determined as target extended routes.
[0135] Specifically, the target extended route that is the same as the train operation route is determined as the intermediate train operation route; and the train arrival time of each station in the intermediate train operation route is determined as the intermediate train arrival time.
[0136] In the embodiments of this application, at least one train operation route is included. If the target extended route is included in the train operation route, the target extended route is determined as an intermediate train operation route.
[0137] S204. Based on the number of intermediate train arrival times at stations in the intermediate train operation route within the train arrival time sequence, determine whether the intermediate train operation route is the target train operation route.
[0138] In this embodiment of the application, if the number of intermediate train arrival times at stations in an intermediate train route is 1 in the train arrival time sequence, it is determined whether the difference between the intermediate train arrival time at a station included in the train arrival time sequence in the intermediate train route and the train arrival time at a station in other intermediate train routes is less than the time interval parameter; if it is less, the intermediate train route is determined as the target train route; if the number of intermediate train arrival times at stations in an intermediate train route is greater than 1 in the train arrival time sequence, the intermediate train route is determined as the target train route.
[0139] S205. If so, then the arrival times of the intermediate trains at all stations in the intermediate train route shall be determined as the arrival times of the target trains at all stations in the target train route.
[0140] Based on the same inventive concept, this application also provides a train arrival time determination device corresponding to the train arrival time determination method. Since the principle of the device in this application is similar to the train arrival time determination method described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0141] Reference Figure 3 The diagram shown is a schematic representation of a train arrival time determination device provided in an embodiment of this application. The train arrival time determination device includes:
[0142] The acquisition module 301 acquires the train schedule duration data, train operation routes, and passenger exit times for all stations, as well as the running direction of the trains corresponding to the passenger exit times and the scheduled intervals between adjacent trains.
[0143] The determination module 302 is used to determine the initial train arrival time of each station on the train line based on the passenger exit time and the corresponding planned interval time of each station on the train line.
[0144] The determination module 302 is used to determine the target train arrival time of all stations in the target train operation route based on the train schedule duration data, the initial train arrival time of all stations on the train line, and the corresponding running direction.
[0145] In one possible implementation, the determining module 302 is specifically used to sort the initial train arrival times of all stations corresponding to the operating direction for each direction of operation, thereby obtaining a train arrival time sequence. The train arrival time sequence is sorted in descending order of the train operation sequence number of the station corresponding to the initial train arrival time in the operating direction, and in ascending order of all initial train arrival times corresponding to each station. The module sequentially traverses the initial train arrival times in the train arrival time sequence. Based on the currently traversed initial train arrival times, train schedule duration data, and the train arrival time sequence, the module determines the target train arrival times of all stations on the target train operation route that is in the same operating direction.
[0146] In one possible implementation, the determining module 302 is specifically used to determine the train operation route with the same direction of operation and the most stations as the initial train operation route; determine the train arrival times of all stations in the initial train operation route based on the initial train operation route, the currently traversed initial train arrival times, train schedule duration data, and train arrival time sequence; select the intermediate train arrival times of all stations in the intermediate train operation route from the train arrival times of all stations in the initial train operation route based on the train arrival times of all stations in the initial train operation route; determine whether the intermediate train operation route is the target train operation route based on the number of intermediate train arrival times of stations in the intermediate train operation route in the train arrival time sequence; if so, determine the intermediate train arrival times of all stations in the intermediate train operation route as the target train arrival times of all stations in the target train operation route.
[0147] In one possible implementation, the determining module 302 is specifically used to determine whether the station corresponding to the current traversed initial train arrival time is the terminal station in the initial train operation route; if not, then based on the current traversed initial train arrival time, train planned duration data, and train arrival time sequence, determine the train arrival times of all stations in the initial train operation route after the station corresponding to the current traversed initial train arrival time; determine whether the station corresponding to the current traversed initial train arrival time is the starting station in the initial train operation route; if not, then based on the current traversed initial train arrival time, train planned duration data, and train arrival time sequence, determine the train arrival times of all stations in the initial train operation route before the station corresponding to the current traversed initial train arrival time.
[0148] In one possible implementation, the determining module 302 is specifically used to determine the current traversed initial train arrival time as the first latest arrival time; calculate the arrival time of the first train at the next station in the initial train route corresponding to the station with the first latest arrival time based on the train schedule duration data and the first latest arrival time; determine whether there exists an initial train arrival time in the train arrival time sequence that has a difference from the first train arrival time less than a preset threshold among all the initial train arrival times corresponding to the next station; if so, then start from the initial train arrival time with a difference from the first train arrival time less than the preset threshold. In the station time, determine the train arrival time of the next station; if it does not exist, then determine the arrival time of the first train as the arrival time of the next station; determine whether the next station corresponding to the current initial train arrival time is the terminal station in the initial train operation route; if it is not the terminal station in the initial train operation route, then update the train arrival time of the next station to the first latest arrival time; and jump to calculate the arrival time of the first train of the next station corresponding to the first latest arrival time in the initial train operation route based on the train schedule duration data and the first latest arrival time, so as to continue execution.
[0149] In one possible implementation, the determining module 302 is specifically used to determine the currently traversed initial train arrival time as the second latest arrival time; based on the train schedule duration data and the second latest arrival time, calculate the second train arrival time of the station preceding the station corresponding to the second latest arrival time in the initial train operation route; determine whether there exists an initial train arrival time in the train arrival time sequence that has a difference from the second train arrival time less than a preset threshold among all initial train arrival times corresponding to the previous station; if so, then select the initial train with a difference from the second train arrival time less than the preset threshold. In the arrival time calculation, determine the arrival time of the train at the previous station; if it does not exist, set the arrival time of the second train as the arrival time of the train at the previous station; determine whether the previous station of the station corresponding to the initial arrival time of the currently traversed train is the starting station in the initial train route; if it is not the starting station in the initial train route, update the arrival time of the train at the previous station to the second latest arrival time; and jump to calculate the arrival time of the second train at the station above the station corresponding to the second latest arrival time in the initial train route based on the train schedule duration data and the second latest arrival time, to continue execution.
[0150] In one possible implementation, the determining module 302 is specifically used to take the station in the initial train operation route corresponding to the arrival time of the currently traversed initial train as the starting point, and expand the stations sequentially backward to obtain at least one first extended route; take the station in the initial train operation route corresponding to the arrival time of the currently traversed initial train as the ending point, and expand the stations sequentially forward to obtain at least one second extended route; determine both the first extended route and the second extended route as target extended routes; determine the target extended routes that are the same as the train operation routes as intermediate train operation routes; and determine the train arrival times of all stations in the intermediate train operation routes as intermediate train arrival times.
[0151] In one possible implementation, the determining module 302 is specifically configured to determine whether the difference between the intermediate train arrival time of a station in an intermediate train route and the train arrival time of a station in other intermediate train routes is less than a time interval parameter if the number of intermediate train arrival times of stations in the intermediate train route is 1 in the train arrival time sequence; if it is less than 1, the intermediate train route is determined as the target train route; if the number of intermediate train arrival times of stations in an intermediate train route is greater than 1 in the train arrival time sequence, the intermediate train route is determined as the target train route.
[0152] like Figure 4 As shown in the embodiment of this application, an electronic device 400 includes a processor 401, a memory 402, and a bus. The memory 402 stores machine-readable instructions that can be executed by the processor 401. When the electronic device is running, the processor 401 communicates with the memory 402 through the bus. The processor 401 executes the machine-readable instructions to perform the steps of the method for determining the train arrival time described above.
[0153] Specifically, the memory 402 and processor 401 mentioned above can be general-purpose memory and processor, without any specific limitations. When the processor 401 runs the computer program stored in the memory 402, it can execute the above-mentioned method for determining the train arrival time.
[0154] Corresponding to the above-described method for determining train arrival time, this application also provides a computer-readable storage medium storing a computer program. When the computer program is run by a processor, it executes the steps of the above-described method for determining train arrival time.
[0155] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0156] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0157] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0158] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the information processing methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0159] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of determining a train arrival time, characterized by, The method for determining the train arrival time comprises the following steps: obtaining train plan duration data of a train line, passenger departure times of all stations on the train line, and running directions of trains corresponding to the passenger departure times and plan interval durations of adjacent trains; determining initial train arrival times of all stations on the train line according to the passenger departure times of the stations and the corresponding plan interval durations; determining target train arrival times of all stations on a target train route of the train line according to the train plan duration data, the initial train arrival times of all stations on the train line, and the corresponding running directions, including: for each running direction, sorting the initial train arrival times of all stations corresponding to the running direction to obtain a train arrival time sequence; wherein the train arrival time sequence is sorted in a reverse order of train running numbers of the stations corresponding to the initial train arrival times in the running direction and in an ascending order of all initial train arrival times of the stations; sequentially traversing the initial train arrival times in the train arrival time sequence; and determining target train arrival times of all stations on a target train route of the train line with the same running direction as the running direction according to the currently traversed initial train arrival time, the train plan duration data, and the train arrival time sequence; wherein the determining of the target train arrival times of all stations on the target train route of the train line with the same running direction as the running direction according to the currently traversed initial train arrival time, the train plan duration data, and the train arrival time sequence comprises: determining a train route with the most stations as an initial train route from train routes of the train line with the same running direction as the running direction; determining train arrival times of all stations on the initial train route according to the initial train route, the currently traversed initial train arrival time, the train plan duration data, and the train arrival time sequence; selecting intermediate train arrival times of all stations on an intermediate train route from the train arrival times of all stations on the initial train route according to the train arrival time sequence; determining whether the intermediate train route is a target train route according to the number of stations with the intermediate train arrival times in the train arrival time sequence in the intermediate train route; and if so, determining the intermediate train arrival times of all stations on the intermediate train route as the target train arrival times of all stations on the target train route.
2. The method of claim 1, wherein, the determining of the train arrival times of all stations on the initial train route according to the initial train route, the currently traversed initial train arrival time, the train plan duration data, and the train arrival time sequence comprises: determining whether a station corresponding to the currently traversed initial train arrival time is a terminal station in the initial train route; If not, determining, according to the current traversed initial train arrival time, the train planned duration data and the train arrival time sequence, train arrival times of all stations after the station corresponding to the current traversed initial train arrival time in the initial train operation circuit; Judging whether the station corresponding to the current traversed initial train arrival time is the starting station in the initial train operation circuit; If not, determining, according to the current traversed initial train arrival time, the train planned duration data and the train arrival time sequence, train arrival times of all stations before the station corresponding to the current traversed initial train arrival time in the initial train operation circuit.
3. The method of claim 2, wherein, The determining, according to the current traversed initial train arrival time, the train planned duration data and the train arrival time sequence, train arrival times of all stations after the station corresponding to the current traversed initial train arrival time in the initial train operation circuit comprises: Determining the current traversed initial train arrival time as a first latest arrival time; According to the train planned duration data and the first latest arrival time, calculating a first train arrival time of a next station of the station corresponding to the first latest arrival time in the initial train operation circuit; Judging whether there is an initial train arrival time with a difference from the first train arrival time less than a preset threshold in all initial train arrival times corresponding to the next station in the train arrival time sequence; If there is, determining a train arrival time of the next station from the initial train arrival time with the difference from the first train arrival time less than the preset threshold; if not, determining the first train arrival time as the train arrival time of the next station; Judging whether the next station of the station corresponding to the current traversed initial train arrival time is the terminal station in the initial train operation circuit; if not the terminal station in the initial train operation circuit, updating the train arrival time of the next station as the first latest arrival time; And jumping to the calculating a first train arrival time of a next station of the station corresponding to the first latest arrival time in the initial train operation circuit according to the train planned duration data and the first latest arrival time to continue execution.
4. The method of claim 2, wherein, The determining, according to the current traversed initial train arrival time, the train planned duration data and the train arrival time sequence, train arrival times of all stations before the station corresponding to the current traversed initial train arrival time in the initial train operation circuit comprises: Determining the current traversed initial train arrival time as a second latest arrival time; According to the train planned duration data and the second latest arrival time, calculating a second train arrival time of a previous station of the station corresponding to the second latest arrival time in the initial train operation circuit; Judging whether there is an initial train arrival time with a difference from the second train arrival time less than a preset threshold in all initial train arrival times corresponding to the previous station in the train arrival time sequence; determining the train arrival time of the previous station from the initial train arrival times with a difference from the second train arrival time less than a preset threshold, if there is one; or determining the second train arrival time as the train arrival time of the previous station, if there is not; determining whether the previous station of the station corresponding to the initial train arrival time currently traversed is the starting station in the initial train running loop; if not, updating the train arrival time of the previous station as the second latest train arrival time; and jumping to the calculation of the second train arrival time of the previous station of the station corresponding to the second latest train arrival time in the initial train running loop according to the train plan duration data and the second latest train arrival time, to continue execution.
5. The method of claim 1, wherein, The selection of the intermediate train arrival times of all stations in the intermediate train running loop from the train arrival times of all stations in the initial train running loop according to the train arrival time sequence includes: taking the station corresponding to the initial train arrival time currently traversed in the initial train running loop as a starting point, and extending the stations in sequence to obtain at least one first extended loop; taking the station corresponding to the initial train arrival time currently traversed in the initial train running loop as a terminal point, and extending the stations in sequence to obtain at least one second extended loop; determining the first extended loop and the second extended loop as target extended loops; determining the target extended loop same as the train running loop as an intermediate train running loop, and determining the train arrival times of all stations in the intermediate train running loop as intermediate train arrival times.
6. The method of claim 1, wherein, The determination of whether the intermediate train running loop is a target train running loop according to the number of intermediate train arrival times of stations in the intermediate train running loop in the train arrival time sequence includes: if the number of intermediate train arrival times of stations in the intermediate train running loop in the train arrival time sequence is 1, determining whether the difference between the intermediate train arrival time of the station included in the train arrival time sequence in the intermediate train running loop and the train arrival time of the station in other intermediate train running loops is less than a time interval parameter; if yes, determining the intermediate train running loop as a target train running loop; if the number of intermediate train arrival times of stations in the intermediate train running loop in the train arrival time sequence is greater than 1, determining the intermediate train running loop as a target train running loop.
7. A device for determining train arrival time, characterized in that, The determination method of the train arrival time includes: an acquisition module, which acquires train plan duration data of a train line, a train running loop, and passenger departure times of all stations, and running directions of trains corresponding to the passenger departure times and plan interval durations of adjacent trains; the train plan duration data of the train line includes running durations between adjacent stations and stopping durations of stations; determining, according to the passenger egress time and the corresponding planned interval time of each station of the train line, initial train arrival times of the stations in the train line; determining, according to the train planning time data, the initial train arrival times of all stations of the train line and the corresponding running directions, target train arrival times of all stations of a target train running circuit in the train running circuit; the determining module is specifically configured to, for each running direction, sort the initial train arrival times of all stations corresponding to the running direction to obtain a train arrival time sequence, wherein the train arrival time sequence is sorted in a reverse order of train running numbers of the stations corresponding to the initial train arrival times in the running direction and in an order of all initial train arrival times of the stations; sequentially traversing the initial train arrival times in the train arrival time sequence; and determining, according to the currently traversed initial train arrival time, the train planning time data and the train arrival time sequence, target train arrival times of all stations of a target train running circuit in the train running circuit with the same running direction as the running direction; the determining module is specifically configured to determine, as an initial train running circuit, a train running circuit with the same running direction as the running direction and the largest number of stations in the train running circuit; determine, according to the initial train running circuit, the currently traversed initial train arrival time, the train planning time data and the train arrival time sequence, train arrival times of all stations in the initial train running circuit; select, according to the train arrival time sequence, intermediate train arrival times of all stations in an intermediate train running circuit from the train arrival times of all stations in the initial train running circuit; determine, according to the number of stations with the intermediate train arrival times in the intermediate train running circuit in the train arrival time sequence, whether the intermediate train running circuit is a target train running circuit; and if so, determine the intermediate train arrival times of all stations in the intermediate train running circuit as the target train arrival times of all stations of the target train running circuit.
Citation Information
Patent Citations
Urban rail transit operation plan compilation method and system
CN116142264A
Passenger-oriented transfer synchronization optimization method and passenger-oriented transfer synchronization optimization device
EP3992057A1