Railway passenger transfer scheme calculation method, system, device and storage medium

By combining big data analysis and offline computing, the complexity of transfer schemes in railway passenger transport networks has been solved, providing the optimal transfer scheme in high-concurrency environments, thereby improving the utilization rate of railway transport capacity and the freedom of passenger travel.

CN114912659BActive Publication Date: 2026-02-10INST OF COMPUTING TECH CHINA ACAD OF RAILWAY SCI +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210405948.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2026-02-10
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

Existing technologies cannot effectively meet the transfer needs of passengers under complex railway network conditions. In particular, under large-scale, complex and frequently changing conditions, traditional algorithms cannot provide the optimal transfer travel plan.

Method used

Employing a hybrid computing approach that combines big data analytics and offline computation, this method calculates optimal railway transfer schemes through OD dataset calculations, minimum transfer time calculations, and transfer plan calculations. It utilizes technologies such as Hive, Spark, Java microservices, and in-memory databases to decouple the solution process and constraints of the traditional A* algorithm.

Benefits of technology

In the context of dynamic changes in railway timetables and ticket availability, and high concurrency, it provides fast and accurate transfer solutions, improving the utilization rate of transport capacity resources and the freedom of passenger travel. It avoids the need for defining heuristic functions, ensuring the reliability of calculations and real-time response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114912659B_ABST
    Figure CN114912659B_ABST
Patent Text Reader

Abstract

The application discloses a railway passenger transfer transfer scheme calculation method, comprising: an OD data set calculation step: based on the latest railway operation diagram data or the latest remaining ticket data of the whole railway, the direct OD data set of the whole railway is calculated and obtained, the reachable OD data set of the whole railway is calculated and obtained based on the direct OD data set of the whole railway, and after the transfer stations in the reachable OD data set of the whole railway are prioritized based on the OD duration sorting rule, the candidate reachable OD data set of the whole railway is obtained; a minimum transfer time calculation step: the minimum transfer time in multiple transfer scenarios is calculated respectively; a transfer scheme calculation step: the railway user inputs a transfer request in real time, the transfer station is obtained based on the candidate reachable OD data set of the whole railway, the transfer station is filtered based on the remaining ticket information, the minimum transfer time and the preset filtering condition, the optimal transfer transfer scheme is obtained, and the railway user is displayed. The application also provides a railway passenger transfer transfer scheme calculation system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of railway passenger transfer, in particular to a railway passenger transfer and transfer scheme calculation method and system, computer equipment and computer readable storage medium. BACKGROUND

[0002] In recent years, the speed of China's high-speed railway trains has been continuously improved, and the scale of the high-speed railway network has been extended from "four vertical and four horizontal" to "eight vertical and eight horizontal", basically reaching a stable state of railway network. The overall railway passenger flow shows the characteristics of regional imbalance, seasonal imbalance, time imbalance, and imbalance between large and small stations. The passenger flow demand of intermediate stations and small node stations is insufficient, and can only take the mode of train stop to take the passenger flow; limited by the total number of train stops, the service frequency of a large number of intermediate stations and small node stations is insufficient, the service time point distribution is uneven, and passengers have great inconvenience in travel, and the utilization of transport resources is difficult. On the basis of the "eight vertical and eight horizontal" network scale, through transfer and transfer, that is, connecting medium and short-distance trains to realize long-distance travel is the development trend of improving train service frequency and utilization of transport resources and improving passenger travel freedom in the future.

[0003] In the prior art, various path planning algorithms such as traditional algorithms (Dijkstra algorithm, A* algorithm, etc.), intelligent algorithms (PSO algorithm, genetic algorithm, reinforcement learning, etc.), and algorithms combining traditional and intelligent algorithms are compared comprehensively, but the railway passenger network has the characteristics of complex scale, complex constraint conditions and different change frequencies, and the railway passenger user scale is large, and the transfer service needs to have the ability to handle high-concurrency requests. The traditional algorithm of the prior art cannot meet the complex needs of railway passenger transfer under the condition of complex network.

[0004] Therefore, it is urgent to build a new railway transfer scheme calculation method and system to decouple the A* algorithm solving process and the constraint conditions in the traditional prior art, and to adopt a hybrid computing method combining big data analysis, offline computing and real-time computing to provide the optimal railway transfer travel scheme for non-ticket travel and non-car travel direction users, while meeting the transfer travel needs of railway passengers under the conditions of railway operation diagram and dynamic changes of remaining tickets, high-concurrency environment. SUMMARY

[0005] To solve the above technical problems, the present application provides a railway transfer scheme calculation method and system, which can meet the transfer travel needs of railway passengers under the conditions of railway operation diagram and dynamic changes of remaining tickets, high-concurrency environment.

[0006] In a first aspect, the embodiments of the present application provide a railway passenger transfer and transfer scheme calculation method, comprising:

[0007] OD dataset calculation steps: Calculate the direct OD dataset for the entire railway network based on the latest railway timetable data or the latest remaining ticket data for the entire railway network. Calculate the reachable OD dataset for the entire railway network based on the direct OD dataset for the entire railway network. After prioritizing the transfer stations in the reachable OD dataset for the entire railway network based on the OD historical sorting rules, obtain the candidate reachable OD dataset for the entire railway network.

[0008] Minimum transfer time calculation steps: Calculate the minimum transfer time under various transfer scenarios;

[0009] The transfer plan calculation steps are as follows: railway users input transfer requests in real time, transfer stations are obtained by querying the candidate all-railway reachable OD dataset, transfer stations are filtered based on available tickets, minimum transfer time and preset filtering conditions, the optimal transfer plan is obtained and displayed to railway users.

[0010] Preferably, the above OD dataset calculation steps include:

[0011] The steps for calculating the fully reachable OD dataset are as follows: In the fully direct OD dataset, find the departure station and the arrival station and associate them with each other. Complete at least one association calculation to obtain at least one transit station and obtain the fully reachable OD dataset.

[0012] Duration calculation steps: Based on the latest operation map data, calculate the shortest duration from each departure station to the arrival station via at least one transfer station in the total reachable OD dataset. The duration sorting rule is that the shortest duration has the highest priority.

[0013] Optimal sorting steps: Sort the OD dataset based on OD history sorting rules for the entire reachability OD dataset;

[0014] Selection steps: Select fully reachable OD datasets according to the specified priority range, obtain at least one candidate fully reachable OD data, and store it in the in-memory database.

[0015] Preferably, the above-mentioned minimum transfer time calculation steps include:

[0016] Minimum transfer time within the same station: The minimum transfer time within the same station is calculated based on historical transfer behavior data, station size, and the availability of convenient transfer passages, and then imported into an in-memory database;

[0017] Minimum transfer time within the city: The minimum transfer time within the city is calculated based on collected urban traffic travel time data and imported into an in-memory database;

[0018] Convenient transfer time: Specify a fixed value for convenient transfer time and import it into the in-memory database.

[0019] Preferably, the calculation steps for the above transfer scheme include:

[0020] Ticket availability query steps: Based on the transfer requests of railway users, query the ticket availability data from the departure station to each transfer station within the departure date, and the ticket availability data from each transfer station to the arrival station within a predetermined time period after the departure date, and filter out trains without tickets based on the ticket availability data.

[0021] Anomaly filtering steps: If a detour from the arrival station to the departure station occurs, the transfer scheme is filtered out, and if the transfer time of the transfer scheme is less than the minimum transfer time, the transfer scheme is also filtered out.

[0022] Preferably, the above-mentioned direct OD dataset includes a first direct OD dataset and a second direct OD dataset; the first direct OD dataset is calculated based on the latest operation schedule data, and the second direct OD dataset is calculated based on the latest remaining ticket data for the entire railway.

[0023] The fully reachable OD dataset includes a first fully reachable OD dataset and a second fully reachable OD dataset. The first fully reachable OD dataset is obtained by offline computation using SQL based on the first fully reachable OD dataset, and the second fully reachable OD dataset is obtained by offline computation using multiple programming languages ​​based on the second fully reachable OD dataset.

[0024] Preferably, the first and second nationally accessible OD datasets are hot backups of each other, and railway users can query and obtain transfer stations based on the first or second nationally accessible OD datasets.

[0025] Preferably, the above-mentioned all-route direct OD dataset includes: departure station, arrival station, and the shortest direct journey time between the departure station and the arrival station; the all-route reachable OD dataset includes: sequence number, departure station, at least one transfer station, arrival station, and the shortest transfer time from the departure station to the arrival station via at least one transfer station, wherein the shortest transfer time is the minimum time, and the corresponding sequence number is the minimum value.

[0026] Secondly, embodiments of this application provide a railway passenger transfer scheme calculation system, employing the railway passenger transfer scheme calculation method described above, including:

[0027] OD dataset calculation module: It is used to calculate the direct OD dataset of the whole railway based on the latest railway operation timetable data or the latest remaining ticket data of the whole railway, calculate the reachable OD dataset of the whole railway based on the direct OD dataset of the whole railway, and obtain the candidate reachable OD dataset of the whole railway after prioritizing the reachable OD dataset of the whole railway based on the OD history sorting rules.

[0028] Minimum transfer time calculation module: used to calculate the minimum transfer time under various transfer scenarios;

[0029] The transfer scheme calculation module is used by railway users to input transfer requests in real time, query transfer stations based on the candidate all-railway reachable OD dataset, filter transfer stations based on remaining ticket information, minimum transfer time and preset filtering conditions, obtain the optimal transfer scheme, and display it to railway users.

[0030] Thirdly, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for calculating transfer schemes in railway passenger transport as described in the first aspect above.

[0031] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method for calculating transfer schemes in railway passenger transport as described in the first aspect above.

[0032] Compared with existing technologies, it has the following outstanding advantages:

[0033] 1) Based on the traditional A* path planning algorithm, the present invention eliminates the definition of the heuristic function. Through the analysis of a large amount of railway passenger transfer travel time data, the present invention found that railway passengers usually prefer transfer schemes with shorter durations. Therefore, the present invention calculates the duration between any OD on the entire railway network based on the latest train schedule data, ignoring the transfer time consumed between any ODs across the entire railway network. This is used as the basis for evaluating the priority of the optimal transfer station between any ODs, thus avoiding the definition of the heuristic function.

[0034] 2) The method of this invention adopts a hierarchical calculation of the entire route transfer scheme. In the offline calculation layer, two types of data are calculated respectively: one is the entire route reachable OD dataset, and the other is the minimum transfer time. In the real-time calculation layer, after the user submits a transfer request, the program queries the corresponding transfer station in real time according to the entire route reachable OD dataset in the memory database, then splices them to form a candidate detailed transfer scheme, and filters unreasonable schemes according to the constraints.

[0035] 3) This invention employs two different methods to implement a disaster recovery strategy for calculating the entire railway transfer plan. Since the data on which the railway transfer plan depends is stored on different internal networks, cross-network calculation and data transmission pose a risk of failure. To mitigate this risk, two methods are used daily: one based on the latest railway timetable data ("offline calculation of transfer stations using SQL language → periodic import into one of the specified in-memory databases"), and the other based on the remaining train tickets for the entire railway network ("calculation of transfer stations using a Java microservice cluster → periodic import into another specified in-memory database"). The first and second in-memory databases can be of the same or different types, but they must not belong to different servers to achieve disaster recovery. When a user submits a transfer request, the program can query the optimal transfer station data from either the first or second specified in-memory database and calculate a detailed transfer plan. Attached Figure Description

[0036] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0037] Figure 1 This is a flowchart of the railway transfer scheme calculation method of the present invention;

[0038] Figure 2 This is a flowchart of the conversion multiplication scheme calculation method in a specific embodiment of the present invention;

[0039] Figure 3 This is a schematic diagram of the railway transfer scheme calculation system of the present invention;

[0040] Figure 4 A schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention.

[0041] In the above image:

[0042] 10OD dataset calculation module; 20 minimum transfer time calculation module.

[0043] 30 Transfer Scheme Calculation Module

[0044] 81. Processor; 82. Memory; 83. Communication interface; 80. Bus. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0046] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0047] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent.

[0048] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0049] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0050] This invention aims to provide a simple, reliable, and accurate method for calculating railway transfer schemes. This method uses the A* algorithm as the basic algorithm for railway transfer services and comprehensively utilizes various technologies and tools such as Hive, Spark, Java microservices, in-memory databases, and a self-developed data platform. It decouples the solution process and constraints of the traditional A* algorithm and employs a hybrid computing approach combining big data analysis, offline computation, and real-time computation to provide suitable railway transfer travel schemes for users traveling without tickets or on routes without available trains. The specific travel scheme consists of two segments of a journey connected by two different train services. This method can meet the transfer travel needs of railway passengers under dynamic changes in railway timetables and ticket availability, and in high-concurrency environments.

[0051] Firstly, such as Figure 1 As shown in the embodiment of this application, a method for calculating transfer schemes in railway passenger transport is provided, including:

[0052] OD dataset calculation step S10: Calculate the direct OD dataset of the whole railway based on the latest railway operation chart data or the latest remaining ticket data of the whole railway. Calculate the reachable OD dataset of the whole railway based on the direct OD dataset of the whole railway. After prioritizing the transfer stations in the reachable OD dataset of the whole railway based on the OD historical sorting rules, obtain the candidate reachable OD dataset of the whole railway.

[0053] Minimum transfer time calculation step S20: Calculate the minimum transfer time under various transfer scenarios;

[0054] Transfer plan calculation step S30: The railway user inputs the transfer request in real time, and the transfer station is obtained by querying the candidate all-railway reachable OD dataset. The transfer station is filtered based on the remaining ticket information, minimum transfer time and preset filtering conditions to obtain the optimal transfer plan and display it to the railway user.

[0055] Preferably, the above OD dataset calculation step S10 includes:

[0056] The steps for calculating the fully reachable OD dataset are as follows: In the fully direct OD dataset, find the departure station and the arrival station and associate them with each other. Complete at least one association calculation to obtain at least one transit station and obtain the fully reachable OD dataset.

[0057] Duration calculation steps: Ignoring the dwell time at transfer stations, calculate the shortest duration from each departure station to the arrival station in the full route reachable OD dataset based on the latest operation map data. The duration sorting rule is that the shortest duration has the highest priority.

[0058] Optimal sorting steps: Sort the OD dataset based on OD history sorting rules for the entire reachability OD dataset;

[0059] Selection steps: Select fully reachable OD datasets according to the specified priority range, obtain at least one candidate fully reachable OD data, and store it in the in-memory database.

[0060] Preferably, the minimum transfer time calculation step S20 includes:

[0061] Minimum transfer time within the same station: The minimum transfer time within the same station is calculated based on historical transfer behavior data, station size, and the availability of convenient transfer passages, and then imported into an in-memory database;

[0062] Minimum transfer time within the city: The minimum transfer time within the city is calculated based on collected urban traffic travel time data and imported into an in-memory database;

[0063] Convenient transfer time: Specify a fixed value for convenient transfer time and import it into the in-memory database.

[0064] Preferably, the above-mentioned transfer plan calculation step S30 includes:

[0065] Ticket availability query steps: Based on the transfer requests of railway users, query the ticket availability data from the departure station to each transfer station within the departure date, and the ticket availability data from each transfer station to the arrival station within a predetermined time period after the departure date, and filter out trains without tickets based on the ticket availability data.

[0066] Anomaly filtering steps: If a detour from the arrival station to the departure station occurs, the transfer scheme is filtered out, and if the transfer time of the transfer scheme is less than the minimum transfer time, the transfer scheme is also filtered out.

[0067] Preferably, the above-mentioned direct OD dataset includes a first direct OD dataset and a second direct OD dataset; the first direct OD dataset is calculated based on the latest operation schedule data, and the second direct OD dataset is calculated based on the latest remaining ticket data for the entire railway.

[0068] The fully reachable OD dataset includes a first fully reachable OD dataset and a second fully reachable OD dataset. The first fully reachable OD dataset is obtained by offline computation using SQL based on the first fully reachable OD dataset, and the second fully reachable OD dataset is obtained by offline computation using multiple programming languages ​​based on the second fully reachable OD dataset.

[0069] Preferably, the first and second nationally accessible OD datasets are hot backups of each other, and railway users can query and obtain transfer stations based on the first or second nationally accessible OD datasets.

[0070] Preferably, the above-mentioned all-route direct OD dataset includes: departure station, arrival station, and the shortest direct journey time between the departure station and the arrival station; the all-route reachable OD dataset includes: sequence number, departure station, at least one transfer station, arrival station, and the shortest transfer time from the departure station to the arrival station via at least one transfer station, wherein the shortest transfer time is the minimum time, and the corresponding sequence number is the minimum value.

[0071] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings:

[0072] This invention, based on the fundamental principles of the A* algorithm, considers various uncertainties and their frequencies, including the dynamic variability of railway operation plans, inconsistent station sizes, the impact of urban traffic conditions on intra-city transfers, uncertain railway user travel demands, dynamic calculation and changes in remaining tickets, and high concurrency. It decouples the solution process and constraints of the traditional A* algorithm and comprehensively utilizes multiple technologies and tools such as Hive, Spark, Java microservice clusters, in-memory databases, and a self-developed data platform. It employs a hybrid computing approach combining offline and real-time computation, using two methods: "offline calculation of transfer stations using SQL language → periodic import into the in-memory database" and "calculation of transfer stations using Java microservice clusters → periodic import into the in-memory database." These methods calculate the disaster recovery strategy for the optimal transfer stations between origin and destination (OD) stations across the entire railway network during the pre-sale period, enabling rapid solution and zero-error real-time response for transfer schemes across the entire railway network.

[0073] (1) Based on the idea of ​​the traditional A* path planning algorithm, this invention eliminates the definition of the heuristic function.

[0074] Traditional A* path planning algorithms require determining a heuristic function based on business needs and extensive data analysis to identify the optimal node in the shortest path search. The rationality of the heuristic function largely determines the reasonableness, feasibility, and optimality of the transfer plan. In a fully-fledged railway passenger network, it is difficult to define a suitable heuristic function to adapt to diverse train schedules and operational plans. An unreasonable heuristic function may lead to unreasonable solutions that provide users with detours, incurring more time and costs.

[0075] Therefore, this invention, through analysis of a large amount of railway passenger transfer travel time data, found that railway passengers usually prefer transfer schemes with shorter durations. Thus, this invention, ignoring the transfer time consumed between any origin-destination (OD) stations across the entire railway network, calculates the duration between any OD stations based on the latest train schedule data, using this as the basis for evaluating the priority of the optimal transfer station between any OD stations, thus avoiding the need for defining a heuristic function.

[0076] (2) The present invention calculates the entire route transfer scheme in a hierarchical manner, and filters out unreasonable schemes based on constraints in the final detailed transfer scheme generation stage.

[0077] In the offline computing layer, two types of data need to be calculated: a nationwide reachable origin-destination (OD) dataset and a minimum transfer time. First, the nationwide direct OD dataset is calculated based on the latest railway timetable or available ticket data, specifically including departure station, arrival station, and travel time. Then, based on the nationwide direct OD dataset, the nationwide reachable OD dataset is calculated, specifically including departure station, transfer station, arrival station, travel time, and priority. The shorter the travel time, the higher the priority of the transfer station. Finally, the nationwide reachable OD dataset is transferred to the in-memory database according to a specified priority range. For example, if there are two pairs of ODs, AB and BC, and trains run between AB and BC, then AC is considered reachable.

[0078] Minimum transfer time is used to ensure passengers can complete transfers in the shortest possible time, preventing transfer failures due to insufficient transfer time. There are three types of minimum transfer times: minimum transfer time within the same station, minimum transfer time within the same city, and convenient transfer time. The minimum transfer time within the same station is calculated based on a combination of factors, including historical transfer behavior data, station size, and the availability of convenient transfer channels. This minimum transfer time is calculated monthly and imported into an in-memory database. The minimum transfer time within the same city is calculated daily based on collected urban traffic travel time data and imported into one of the in-memory databases. For stations with convenient transfer channels, a minimum transfer time of 15 minutes is specified.

[0079] In the real-time computing layer, after a user submits a transfer request, the program queries the corresponding transfer stations based on the all-route reachable OD dataset in the in-memory database, calculates the number of remaining tickets for both segments of the journey, and if both segments have remaining tickets, they are considered as one of the options. A detour removal condition is set: if the first leg of the journey passes through stations A and B, the transfer route cannot be from B to A. Minimum transfer time data is read from the in-memory database, and options with transfer times below the minimum threshold are filtered out. The transfer options are sorted using the departure time of the first leg as the anchor point, prioritizing the display of options where the second leg arrives faster, ensuring that there is an optimal option for each departure time.

[0080] (3) The present invention employs two different methods to implement the disaster recovery strategy for calculating the whole-line transfer scheme.

[0081] Because the data relied upon for railway transfer schemes is stored on different internal networks, cross-network calculations and data transmission pose a risk of failure. To mitigate this risk, two methods are employed daily: one based on the latest railway timetable data, using "offline calculation of transfer stations using SQL language → periodic import into one in-memory database"; and the other based on the remaining train tickets across the entire railway network, using "calculation of transfer stations using a Java microservice cluster → periodic import into another in-memory database." When a user submits a transfer request, the program can query the optimal transfer station data from either the first or second in-memory database and calculate the solution.

[0082] This invention relates to railway transfer routes that can consist of multiple journey segments. Currently, a transfer scheme consisting of two journey segments has been implemented, and multi-segment railway transfer schemes can be easily extended based on the existing methods. The following diagram shows the calculation flow of a two-segment railway transfer scheme, including three main modules: transfer station calculation service, minimum transfer time calculation service, and transfer scheme calculation service. Figure 2 As shown, the specific steps of a particular embodiment of the present invention are as follows:

[0083] 1. Transfer station calculation service

[0084] (1) Using Spark SQL language to calculate the optimal transfer station offline based on a big data analysis platform

[0085] ①The railway timetable data mainly includes key station information such as station, station sequence, train number, departure time, and arrival time from one day after the calculation date to the entire pre-sale period. The timetable may be temporarily adjusted according to the epidemic situation and the latest railway passenger flow demand.

[0086] ② Based on the basic business rules of railway train numbers and lines, the railway operation diagram data within the future pre-sale period is correlated and calculated to form a direct OD dataset for the entire railway network, including main information such as departure station, arrival station, and shortest duration. However, this invention is not limited to this and may also include other information.

[0087] ③ If there are two records in the all-route direct OD dataset that have this characteristic, i.e., the arrival station of one record is the departure station of the other record, then the intersection B of the two records is one of the transfer stations from departure station A to destination station C. For example, in the all-route direct OD dataset, there are two records: "Departure station A, arrival station B, shortest duration t" and "Departure station B, arrival station C, shortest duration s". A full-route reachable OD dataset is formed by using Spark SQL to perform join calculations, disregarding the dwell time at transfer stations. It mainly includes departure station A, transfer station B, arrival station C, the shortest duration a (where a is the sum of s and t), and the sequence number n (sorted according to the shortest duration a; the smaller a is, the smaller n is). However, this invention is not limited to this; other SQL languages ​​can also be used to perform join calculations on the all-route reachable OD dataset.

[0088] To calculate transfer routes for trips with three or more segments, the method of associating the direct OD datasets of two segments with the reachable OD datasets of the entire route is used to calculate the reachable OD datasets of the entire route. For example, to calculate a transfer route for a three-segment trip, one association calculation is required, resulting in two transfer stations; to calculate a transfer route for a four-segment trip, two association calculations are required, resulting in three transfer stations; and to calculate a transfer route for an N-segment trip, N-2 association calculations are required, resulting in N-1 transfer stations, where N is a positive integer greater than or equal to 3.

[0089] ④ The fully reachable OD dataset is stored in a Hive data warehouse. However, this invention is not limited to this; other data warehouses may also be used.

[0090] ⑤ After storing the fully reachable OD dataset in the Hive data warehouse, import the fully reachable OD datasets (n not exceeding 10) into the Redis in-memory database in batches before a specified time each day. Here, n is a positive integer greater than 0. In this specific embodiment of the invention, n = 10, but the invention is not limited to this; n can take other values, and other in-memory databases can also be used.

[0091] (2) A method for calculating the optimal transfer station based on a Java microservice cluster program.

[0092] ① Call the internal ticket availability query interface at a specified time every day, regardless of whether there are tickets available, to retrieve the latest ticket availability data for the entire railway network from one day after the calculation date to the entire pre-sale period, and store it in the form of a text file. The data mainly includes information such as departure station, arrival station, train number, departure time, and arrival time, which serves as the data source for calculating the direct OD dataset for the entire railway network.

[0093] ②Based on the latest remaining ticket data file for the entire railway network, write a Java program to calculate the direct OD dataset for the entire railway network, including key information such as departure station, arrival station, and shortest travel time.

[0094] ③ If there are two records in the all-railway direct OD dataset that have this feature, that is, the arrival station of one record is the departure station of the other record, then the intersection B of the two records is one of the transfer stations from departure station A to destination station C. For example, in the all-railway direct OD dataset, there are two records: "Departure station A, arrival station B, shortest duration t" and "Departure station B, arrival station C, shortest duration s". The all-railway reachable OD dataset is formed by program association calculation, without considering the dwell time at transfer stations. It mainly includes departure station A, transfer station B, arrival station C, the shortest duration of the two journeys a (a is the sum of the times s and t), and the sequence number n (sorted according to the shortest duration of the two journeys a, the smaller a is, the smaller n is).

[0095] ④ When calculating the fully reachable OD dataset, each fully reachable OD data record with n not exceeding 10 is written to the Infinispan in-memory database. However, this invention is not limited to this, and other in-memory databases may also be used.

[0096] The implementation method of the above calculation process in this invention is not limited to this, and can also be based on other service methods and other programming languages.

[0097] 2. Minimum transfer time calculation service

[0098] Transfer time refers to the difference between the departure time of the second leg of the journey and the arrival time of the first leg. To avoid the risk of passengers missing their trains due to short transfer times, the transfer time of the railway transfer options shown to users cannot be lower than a minimum value, which is called the minimum transfer time. It is divided into minimum transfer time at the same station, minimum transfer time within the same city, and convenient transfer time. The detailed calculation methods for the minimum transfer times at the same station and within the same city are described in another patent.

[0099] (1) Minimum transfer time at the same station

[0100] The minimum transfer time at the same station is calculated based on railway passenger transfer behavior data over a relatively long period and the station's size classification. This calculation is updated monthly using Spark SQL and the results are imported into a Redis in-memory database. However, this invention is not limited to this; other in-memory databases may also be used.

[0101] (2) Minimum transfer time within the same city

[0102] ① Develop a data collection program to collect data at a certain frequency on the time spent traveling from designated departure stations and arrival stations at different times of the day using different modes of transportation.

[0103] ② Store the collected urban traffic data in a Hive data warehouse. However, this invention is not limited to this; other data warehouses may also be used.

[0104] ③ Analyze the distribution characteristics of urban traffic travel time data at different departure and arrival stations, calculate and update the minimum transfer time for intra-city travel using Spark SQL daily, and import it into a Redis in-memory database. However, this invention is not limited to this; other SQL calculation methods and in-memory databases are also possible.

[0105] (3) Convenient transfer time

[0106] For transfers at stations with convenient transfer passages, the minimum transfer time is specified as 15 minutes. The railway bureau maintains and updates convenient transfer stations through a data maintenance and management platform. When a convenient transfer passage needs to be closed due to special circumstances such as station construction or emergencies, the station's convenient transfer definition must be promptly cancelled. After a station's convenient transfer definition is cancelled, a default time value set by the program is first used as the latest minimum transfer time, and the minimum transfer time for all stations across the entire railway network is recalculated on the same day using the same calculation method for minimum transfer times within the same station and city. However, this invention is not limited to this; other values ​​can also be specified for the minimum transfer time of convenient transfers.

[0107] 3. Transfer plan calculation service

[0108] To prevent the optimal transfer station calculation service from failing due to a single method, the optimal transfer stations for all reachable ODs are stored in Redis and Infinispan in-memory databases respectively. Optimal transfer stations from both data sources can be used to calculate transfer plans and have the same effect. The optimal transfer stations in the Redis in-memory database are the preferred data source. If the optimal transfer station data in Redis becomes empty or inaccessible, the program automatically switches to the Infinispan in-memory database to obtain the optimal transfer station data. This specific embodiment of the invention uses Redis and Infinispan in-memory databases, but the invention is not limited to these; other in-memory databases can also be used.

[0109] ① Users can submit a transfer request on the ticket availability page. The request information includes the departure station or departure city, the arrival station or arrival city, and the departure date.

[0110] ② The program queries the corresponding optimal transfer station based on the request information and concatenates all available transfer routes.

[0111] For example, if a user submits a request with departure station A, arrival station B, and departure date T, the program will query a Redis or Infinispan in-memory database for records containing departure station A and arrival station B, and obtain at least 10 optimal transfer stations C. i (i = 1, 2, ..., 10). Here, the specified priority range is less than 10, but the present invention is not limited to this and other priority ranges can also be used.

[0112] ③ Call the remaining ticket query interface to query tickets from departure station A to transfer station C. i Departure date T, transit station C i The system retrieves available tickets to destination B within 24 hours of the departure date T, filtering out trains without tickets. While the specified departure date range is within 24 hours T, this invention is not limited to this and other departure date ranges can also be used.

[0113] ④ If the first leg of the train passes through stations A and B in succession, and the combined transfer route involves a route from B to A, then the plan is considered to have a detour and should be filtered out.

[0114] ⑤ For same-station transfer plans, first check the server's basic cache to see if the transfer station is a convenient transfer station. If it is, the minimum transfer time is 15 minutes; otherwise, check Redis for the minimum transfer time corresponding to the transfer station. For same-city transfer plans, directly check Redis for the minimum transfer time corresponding to the transfer route.

[0115] If the transfer time in the plan is less than the minimum transfer time, then the plan is filtered out.

[0116] ⑥ Sort the transfer options by using the departure time of the first train as the anchor point, and prioritize showing the options that arrive faster on the second train to ensure that there are better transfer options at different departure times.

[0117] Secondly, embodiments of this application provide a railway passenger transfer scheme calculation system, employing the railway passenger transfer scheme calculation method described above, such as... Figure 3 As shown, it includes:

[0118] OD dataset calculation module: It is used to calculate the direct OD dataset of the whole railway based on the latest railway operation timetable data or the latest remaining ticket data of the whole railway, calculate the reachable OD dataset of the whole railway based on the direct OD dataset of the whole railway, and obtain the candidate reachable OD dataset of the whole railway after prioritizing the reachable OD dataset of the whole railway based on the OD history sorting rules.

[0119] Minimum transfer time calculation module: used to calculate the minimum transfer time under various transfer scenarios;

[0120] The transfer scheme calculation module is used by railway users to input transfer requests in real time, query transfer stations based on the candidate all-railway reachable OD dataset, filter transfer stations based on remaining ticket information, minimum transfer time and preset filtering conditions, obtain the optimal transfer scheme, and display it to railway users.

[0121] Thirdly, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the railway passenger transfer scheme calculation method as described in the first aspect above.

[0122] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method for calculating transfer schemes in railway passenger transport as described in the first aspect above.

[0123] The computer device may include a processor 81 and a memory 82 storing computer program instructions.

[0124] The memory 82 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 81.

[0125] The processor 81 reads and executes computer program instructions stored in the memory 82 to implement any of the railway passenger transfer scheme calculation methods in the above embodiments.

[0126] In some embodiments, the computer device may further include a communication interface 83 and a bus 80. For example, Figure 4 As shown, the processor 81, memory 82, and communication interface 83 are connected through bus 80 and complete communication with each other.

[0127] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0128] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for calculating transfer schemes in railway passenger transport, characterized in that, include: The OD dataset calculation steps are as follows: A direct OD dataset for the entire railway network is calculated based on the latest railway timetable data or the latest remaining ticket data for the entire railway network. A reachable OD dataset for the entire railway network is then calculated based on this direct OD dataset. Transfer stations in the reachable OD dataset are prioritized according to OD duration sorting rules to obtain candidate reachable OD datasets for the entire railway network. The direct OD dataset includes: departure station, arrival station, and the shortest direct journey time between the departure station and the arrival station. The reachable OD dataset includes: sequence number, departure station, at least one transfer station, arrival station, and the shortest transfer time from the departure station to the arrival station via at least one transfer station, where the shortest transfer time is the minimum value corresponding to the sequence number. Minimum transfer time calculation steps: Calculate the minimum transfer time under various transfer scenarios; The transfer plan calculation steps are as follows: The railway user inputs a transfer request in real time, the transfer station is obtained by querying the candidate all-railway reachable OD dataset, the transfer station is filtered based on the remaining ticket information, the minimum transfer time and preset filtering conditions, the optimal transfer plan is obtained and displayed to the railway user; The OD dataset calculation steps include: The steps for calculating the all-route reachable OD dataset are as follows: In the all-route direct OD dataset, the departure station and the arrival station are searched and correlated with each other. At least one correlation calculation is performed to obtain at least one of the transit stations and to obtain the all-route reachable OD dataset. Duration calculation steps: Based on the latest operation map data, calculate the shortest duration from each departure station to the arrival station via at least one transfer station in the total reachable OD dataset. The duration sorting rule is that the shortest duration has the highest priority. The preferred sorting step is to sort the fully reachable OD dataset based on the OD history sorting rules. Selection steps: Select the fully reachable OD dataset according to the specified priority range, obtain at least one candidate fully reachable OD data, and store it in the memory database.

2. The method for calculating transfer schemes in railway passenger transport according to claim 1, characterized in that, The steps for calculating the minimum transfer time include: Minimum transfer time within the same station: The minimum transfer time within the same station is calculated based on historical transfer behavior data, station size, and the availability of convenient transfer passages, and then imported into an in-memory database; Minimum transfer time within the city: The minimum transfer time within the city is calculated based on collected urban traffic travel time data and imported into an in-memory database; Convenient transfer time: Specify a fixed convenient transfer time and import it into the in-memory database.

3. The method for calculating transfer schemes in railway passenger transport according to claim 1, characterized in that, The calculation steps for the transfer plan include: Ticket availability query steps: Based on the transfer request of the railway user, query the ticket availability data from the departure station to each of the transfer stations within the departure date, and the ticket availability data from each transfer station to the arrival station within a predetermined period after the departure date, and filter out trains without tickets based on the ticket availability data. Anomaly filtering steps: If a detour occurs from the arrival station to the departure station, the transfer plan is filtered, and if the transfer time of the transfer plan is less than the minimum transfer time, the transfer plan is filtered.

4. The method for calculating transfer schemes in railway passenger transport according to claim 2, characterized in that, The full-route direct OD dataset includes a first full-route direct OD dataset and a second full-route direct OD dataset; The first all-route direct OD dataset is calculated based on the latest operation map data, and the second all-route direct OD dataset is calculated based on the latest remaining ticket data for the entire route. The fully reachable OD dataset includes a first fully reachable OD dataset and a second fully reachable OD dataset; The first fully reachable OD dataset is obtained by offline computation using SQL based on the first fully direct OD dataset, and the second fully reachable OD dataset is obtained by offline computation using multiple programming languages ​​based on the second fully direct OD dataset.

5. The method for calculating transfer schemes in railway passenger transport according to claim 4, characterized in that, The first fully accessible OD dataset and the second fully accessible OD dataset serve as hot backups for each other. The railway user obtains the transfer station by querying based on the first fully accessible OD dataset or the second fully accessible OD dataset.

6. A railway passenger transfer scheme calculation system, employing the railway passenger transfer scheme calculation method as described in any one of claims 1-5, characterized in that, include: OD dataset calculation module: used to calculate the direct OD dataset of the whole railway based on the latest railway operation chart data or the latest remaining ticket data of the whole railway, calculate the reachable OD dataset of the whole railway based on the direct OD dataset of the whole railway, and obtain the candidate reachable OD dataset of the whole railway after prioritizing the reachable OD dataset of the whole railway based on the OD history sorting rules. Minimum transfer time calculation module: used to calculate the minimum transfer time under various transfer scenarios; The transfer scheme calculation module is used by railway users to input transfer requests in real time, query transfer stations based on the candidate all-railway reachable OD dataset, filter the transfer stations based on remaining ticket information, the minimum transfer time and preset filtering conditions, obtain the optimal transfer scheme, and display it to the railway users.

7. A computer 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 computer program, it implements the railway passenger transfer scheme calculation method as described in any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the method for calculating transfer schemes in railway passenger transport as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Realization method and system of online ticket booking

    CN105574597A

  • Transfer station recommendation method and transfer station recommendation system

    CN106528720A

  • An inter-city multi-mode travel route planning method

    CN109002923A

  • Multi-modal transport transit city optimization method and system, terminal and storage medium

    CN112232596A