Rail transit schedule updating method and device

By utilizing the mapping relationship between configuration files and document objects in the rail transit system, the problems of low efficiency, poor accuracy, and insufficient security in timetable updates are solved, realizing an efficient and secure timetable update method and reducing the coupling between systems.

CN119903065BActive Publication Date: 2025-11-11WUHAN INTELLIGENCE METRO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411904636.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-11-11
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

In existing rail transit systems, the methods for updating train timetables suffer from inefficiency, poor accuracy, and high data security risks, especially given the lack of standardized interfaces between systems, high error rates in manual data entry, and insufficient security of shared databases.

Method used

By reading the source and destination configuration files, document objects and connection objects are created. The line name and weekday status are stored according to the document name and destination parameters, respectively. Timetable data is read and updated for different document formats and data types. The configuration files are used to achieve precise mapping between systems and reduce coupling.

Benefits of technology

It improves the accuracy and reliability of timetable updates, reduces operational workload, and enhances the stability and security between systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903065B_ABST
    Figure CN119903065B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for updating rail transit timetables, belonging to the field of rail transit. The method includes: reading a source configuration file; reading a timetable document according to document information parameters and storing it in a document object; extracting the line name and weekday status according to the document name and storing them in a line name object and a weekday object, respectively; reading a destination configuration file; establishing a destination data connection according to destination parameters and storing the destination data connection method in a connection object; reading timetable data from the document object according to project location parameters and storing it in the corresponding project object; establishing connections from the line name object, weekday object, and each project object to the data destination according to the destination location parameters, placing them in an array object, performing operations for different destination data types, and executing a timetable update to the data destination. This method reduces the amount of import work, improves the accuracy of operations, and reduces the coupling between systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rail transit, and more particularly to a method and apparatus for updating rail transit timetables. Background Technology

[0002] With the continuous advancement of urban rail transit construction, the number of rail transit lines and stations continues to grow, providing citizens with more convenient travel options. In daily operations, frequent updates to train timetables have become a crucial task, posing significant challenges to numerous closely related software systems.

[0003] Currently, various software systems primarily update train timetables through reserved interfaces, manual data entry, and shared databases. However, these methods have revealed numerous problems in practical applications. The reserved interface method is limited by differences in the construction period and usage cycle of various systems, leading to inconsistencies and incompatibility between interfaces, resulting in low timetable update efficiency. Manual data entry, due to the large number of lines and stations, is not only labor-intensive but also prone to errors, severely impacting the accuracy and reliability of timetables. While shared databases improve data sharing efficiency to some extent, the data security risks cannot be ignored; data leakage or tampering would cause significant losses to rail transit operations.

[0004] Therefore, there is an urgent need to find a more efficient, secure, and reliable way to update timetables to ensure smooth communication and collaborative work between various software systems. Summary of the Invention

[0005] To address the aforementioned problems, this invention provides a method and apparatus for updating rail transit timetables.

[0006] This invention provides a method for updating rail transit timetables, comprising: reading a source configuration file, reading a timetable document according to document information parameters therein and storing it in a document object, and extracting the line name and weekday status according to the document name and storing them in a line name object and a weekday object respectively, wherein the document information parameters include document name, document path and document format; reading a destination configuration file, establishing a destination data connection according to destination parameters therein, and storing the destination data connection method in a connection object; for different document formats, reading timetable data from the document object according to item location parameters, and storing each item of the read timetable in a corresponding item object; for different destination data types, establishing connection relationships from the line name object, the weekday object and each item object to the data destination according to the destination location parameters, and placing the connection relationships in an array object; for different destination data types, performing operations on the array object according to the connection object to update the timetable to the data destination; wherein the source configuration file pre-configures document information parameters and item location parameters, and the destination configuration file pre-configures destination parameters and destination location parameters, wherein the destination parameters include destination data type, destination data medium name and destination data connection method.

[0007] In the rail transit timetable update method of the present invention, before reading the target configuration file, the method further includes: generating a timetable document for each line and different workday status according to the timetable to be updated. The document name includes the line name and workday status. The workday status includes workdays and rest days. Each document includes items such as the direction of travel, station name, station code, first train time, last train time, and travel interval.

[0008] In the rail transit timetable update method of the present invention, before reading the source configuration file, the method further includes: configuring project location parameters in the source configuration file; when the document format is a table format, the project location parameters are column names corresponding to each project; when the document format is JSON, the project location parameters are key names corresponding to each project.

[0009] In the rail transit timetable update method of the present invention, before reading the destination configuration file, the method further includes: configuring the destination parameters and destination location parameters in the destination configuration file; when the destination data type is a database type, the destination data medium name is the name of the imported data table, and the destination data connection method is the database connection parameter; when the destination data type is JSON, the destination data medium name is defaulted, and the destination data connection method is the destination document path.

[0010] In the rail transit timetable update method of the present invention, the destination location parameter includes the line name location parameter of the data destination, the weekday status location parameter, and the location parameter of each item.

[0011] In the rail transit timetable update method of the present invention, the step of reading timetable data from the document object according to the item location parameters for different document formats and storing each item of the read timetable into the corresponding item object includes: when the document format is a table type, converting the document object into a table object and reading it in row order, reading the corresponding column according to each item, and storing each column value into the corresponding item object; when the document format is JSON type, converting the document object into a JSON array object and reading it in row order, reading the corresponding key value according to each item, and storing the corresponding column value into the corresponding item object.

[0012] In the rail transit timetable update method of the present invention, the step of establishing connection relationships from line name objects, weekday objects, and each project object to the data destination according to the destination location parameters for different destination data types, and placing the connection relationships into an array object, includes: when the destination data type is JSON, creating a JSON object, assigning the values ​​of line name objects, weekday objects, and each project object to the JSON object according to the key names configured for each project, and placing the JSON object into an array object; when the destination data type is a database type, establishing insert statements from line name objects, weekday objects, and each project object to the data destination, and placing the insert statements into an array object.

[0013] In the rail transit timetable update method of the present invention, the step of operating the array object according to the connection object to update the timetable to the data destination for different target data types includes: when the target data type is a database type, performing a database update operation by executing an insert statement in the array object; when the target data type is JSON, using a file handle connection to output the array object as a file.

[0014] This invention also provides a rail transit timetable update device, comprising: a source reading module, used to read a source configuration file, read timetable documents according to document information parameters therein and store them in a document object, and extract line names and weekday status according to document names, storing them in a line name object and a weekday object respectively, wherein the document information parameters include document name, document path and document format; a destination reading module, used to read a destination configuration file, establish a destination data connection according to destination parameters therein, and store the destination data connection method in a connection object; and a data extraction module, used to read timetable data from the document object according to project location parameters for different document formats, and extract each timetable data from the document object. Each project is stored in its corresponding project object; the connection establishment module is used to establish connection relationships from the line name object, the workday object, and each project object to the data destination based on the destination location parameters for different destination data types, and put the connection relationships into an array object; the write execution module is used to operate on the array object based on the connection objects for different destination data types, and execute the timetable update to the data destination; wherein, the source configuration file is pre-configured with document information parameters and project location parameters, and the destination configuration file is pre-configured with destination parameters and destination location parameters, and the destination parameters include the destination data type, the destination data medium name, and the destination data connection method.

[0015] The present invention also provides a computer storage medium storing a computer program executable by a processor, the computer program performing the rail transit timetable update method described in any of the preceding claims.

[0016] The beneficial effects of this invention are as follows: By establishing a precise mapping relationship between the data to be imported and the target database (or data file) through documentation and configuration, the accuracy and consistency of the data are ensured. When the target system needs to update train timetables, each system only needs to perform simple configuration operations, significantly reducing the import workload and improving the accuracy of the operation. Furthermore, this configuration-based approach reduces the coupling between systems, enhancing the reliability and stability of the import operation. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is one of the flowcharts illustrating the rail transit timetable update method according to an embodiment of the present invention;

[0019] Figure 2 This is the second flowchart illustrating the rail transit timetable update method according to an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail 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 invention.

[0021] The following is combined with Figures 1 to 2 The rail transit timetable updating method and apparatus of the present invention will be described. Figure 1 This is one of the flowcharts illustrating the rail transit timetable update method according to an embodiment of the present invention, such as... Figure 1 As shown, the present invention provides a method for updating rail transit timetables, including:

[0022] S1. Read the source configuration file, read the timetable document according to the document information parameters therein and store it in the document object, and extract the line name and weekday status according to the document name and store them in the line name object and weekday object respectively; the document information parameters include document name, document path and document format; wherein, the document information parameters and project location parameters are pre-configured in the source configuration file.

[0023] When train timetables within the rail transit network are adjusted, train timetable documents for all lines are compiled. Each document includes document information, such as document name F1, document path F2, and document format F3, as well as items for each timetable. In one embodiment, the items in each document include direction of travel, station name, station code, first train time, last train time, and travel interval.

[0024] In one embodiment, before reading the target configuration file, the method further includes: generating a timetable document for each route and different weekday status for the timetable to be updated, with the document name including the route name and the weekday status, and the weekday status including weekdays and rest days.

[0025] Specifically, each line's timetable is organized into document D based on weekdays (Monday to Friday) and weekends (Saturday to Sunday). The naming convention for weekday timetable D1 is: "Line X Weekday Train Timetable," and for weekend timetable D2, it's: "Line X Weekday Train Timetable." Their physical addresses on the disk are P1 and P2, respectively. When the timetables for n lines need updating, a total of 2n documents are generated, named D1, D2, ..., D2n.

[0026] Each document contains the following items: direction of travel, station name, station code, first train time, last train time, and train interval. This information can be provided in a table or a structured JSON document. When organized in a table format, the row and column rules are as follows: columns (N1 is the train direction, N2 is the station name, N3 is the station code, N4 is the first train time, N5 is the last train time, and N6 is the train interval; N1 to N6 are positive integers, and the train interval is in seconds), and rows (one data point per row). An example is shown below:

[0027]

[0028]

[0029] When the above content is provided in a structured JSON format, it should be a serialized array containing several objects with the following information: direction of travel, station name, station code, first train time, last train time, and train interval. The keys in the objects can be customized (e.g., K1 represents direction of travel, K2 represents station name, K3 represents station code, K4 represents first train time, K5 represents last train time, K6 represents train interval; K1 to K6 are strings, and the unit for train interval is...). (in seconds), and related content examples are as follows: [{'K1':'a direction','K2':'a station','K3':'aaaa','K4':'06:30','K5':'23:30','K6':'180'},{'K1':'a direction','K2':'b station','K3':'bbbb','K4':'06:33','K5':'23:33','K6':'180'}].

[0030] In summary, this involves compiling data for each station on weekdays and weekends for each railway line. The following description refers to this type of document as a source document. As can be seen from the above description, the train timetable information in the source document is either a list or an array.

[0031] Then, the relevant information of the source document is placed in the source configuration file. The method of the present invention can be implemented by running a script file. When the timetable update script R runs, it reads and detects the source configuration file S, and determines whether the document name F1, document path F2 and document format F3 configuration items exist. After completion, the format is validated according to the established rules and the timetable document is read according to the document name F1, document path F2 and document format F3. After reading, the timetable document is an object Z (document object) in memory.

[0032] Based on the document name F1 in the configuration file S, extract and assign the document to the line name M1 and whether it is a working day M2 according to the naming rules of document D. M2 = 1 when the document name contains a working day and M2 = 0 when the document name contains a rest day. M1 and M2 are objects in memory.

[0033] S2. Read the destination configuration file, establish a destination data connection based on the destination parameters, and store the destination data connection method in the connection object.

[0034] like Figure 2 As shown, read the target configuration file T, determine whether the target data type L1, target data medium name L2, and target data connection method L3 configuration items exist, perform format verification according to the established rules, and establish a database connection (or file handle connection) based on the data type L1, target data medium name L2, and target data connection method L3, and store it in object M3.

[0035] S3. For different document formats, read the timetable data from the document object according to the project location parameters, and store each item of the read timetable into the corresponding project object.

[0036] The document formats include tables and JSON. Depending on the format, the corresponding project is read according to the configuration of the project location parameters: driving direction V1, station name V2, station code V3, first train time V4, last train time V5, and train interval V6. The project values ​​are stored in objects M4, M5, M6, M7, M8, and M9 in memory respectively.

[0037] S4. For different destination data types, establish connection relationships from the line name object, workday object, and each project object to the data destination based on the destination location parameter, and put the connection relationships into an array object;

[0038] In one embodiment, the destination location parameters include the route name location parameter of the data destination, the weekday status location parameter, and the location parameter of each item.

[0039] For example, the location parameter for each project is V. c1 V c2 V c3 V c4 V c5 V c6 It corresponds to the items in the timetable document, but records the item location of the data destination, and also includes the route name location parameter V. c7 Workday status location parameter V c8 Finally, M4, M5, M6, M7, M8, M9, M1, and M2 are transferred to V. c1 V c2 Vc3 V c4 V c5 V c6 V c7 V c8 The connection relationships are stored in array object P.

[0040] S5. For different target data types, operate on the array object according to the connection object, and perform timetable updates to the data destination.

[0041] Considering different data types, such as database type and JSON type, perform corresponding operations on the array object P to update the timetable.

[0042] The rail transit timetable update method of this invention establishes a precise mapping relationship between the data to be imported and the target database (or data file) through documents and configuration, ensuring the accuracy and consistency of the data. When the target system needs to update the train timetable, each system only needs to perform simple configuration operations, significantly reducing the import workload and improving the accuracy of the operation. In addition, this configuration-based approach reduces the coupling between systems, enhancing the reliability and stability of the import operation.

[0043] In one embodiment, before reading the source configuration file, the method further includes: configuring project location parameters in the source configuration file; when the document format is a table format, the project location parameters are column names corresponding to each project; when the document format is JSON, the project location parameters are key names corresponding to each project.

[0044] Configure document information and project location parameters in the source configuration file S. The specific configuration items are as follows: Document information includes document name F1, document path F2, and document format F3; Project location parameters include driving direction V1, station name V2, station code V3, first train time V4, last train time V5, and train interval V6.

[0045] For example, F1 = Dy, F2 = full path to the document (e.g., / xxx / xxx / xxx / xxx), and the document format F3 can be table or json, representing the document format as a table and json, respectively.

[0046] When F3 is a table, V1, V2, V3, V4, V5, and V6 are the corresponding column names. For example, if column N1 is the train direction, column N2 is the station name, column N3 is the station code, column N4 is the first train time, column N5 is the last train time, and column N6 is the train interval, then V1 = N1, V2 = N2, V3 = N3, V4 = N4, V5 = N5, and V6 = N6.

[0047] When F3 = json, V1, V2, V3, V4, V5, and V6 are the corresponding key names. For example, if K1 represents the direction of travel, K2 represents the station name, K3 represents the station code, K4 represents the first train time, K5 represents the last train time, and K6 represents the train interval, then V1 = K1, V2 = K2, V3 = K3, V4 = K4, V5 = K5, and V6 = K6.

[0048] In one embodiment, before reading the destination configuration file, the method further includes: configuring the destination parameters and destination location parameters in the destination configuration file; when the destination data type is a database type, the destination data medium name is the name of the imported data table, and the destination data connection method is the database connection parameter; when the destination data type is JSON, the destination data medium name is defaulted, and the destination data connection method is the destination document path.

[0049] The destination configuration file T configures the destination data information (simply put, the destination data is where the new train timetable information will go; it can be a data table or a timetable configuration file within the destination system). This includes destination data information and the corresponding relationships between the destination data. Specific destination parameters include: destination data type L1, destination data medium name L2, and destination data connection method L3. Destination location parameters include: direction of travel C1, station name C2, station code C3, first train time C4, last train time C5, train interval C6, line name C7, and whether it is a weekday C8. The data type L1 can be MySQL, Oracle, or JSON array.

[0050] When L1 = mysql and L1 = oracle, L2 is the name of the data table T1 to be imported, and C1, C2, C3, C4, C5, C6, C7, and C8 are the corresponding column names in data table B1. If the data table does not have the column, the field should be configured according to the requirements of the business system where the data table is located. L3 is the database connection information, which should be filled in as IP:port:username:password:database name (e.g., L3 = 127.0.0.1:9999:user:password:dbname).

[0051] When L1 = jsonarray, L2 can be omitted. C1, C2, C3, C4, C5, C6, C7, and C8 are the destination key names; L3 is the full path of the destination document (e.g., / xxx / xxx / xxx / xxx.json).

[0052] In one embodiment, the step of reading timetable data from the document object according to the project location parameter for different document formats, and storing each project of the read timetable into a corresponding project object, includes: when the document format is a table type, converting the document object into a table object and reading it in row order, reading the corresponding column according to each project, and storing each column value into the corresponding project object; when the document format is JSON type, converting the document object into a JSON array object and reading it in row order, reading the corresponding key value according to each project, and storing the corresponding column value into the corresponding project object.

[0053] When F3 = table, a global array variable P is defined, and the document object Z in memory is converted into a table object Z1 and read in row order. Based on the configuration of train direction V1, station name V2, station code V3, first train time V4, last train time V5, and train interval V6, the corresponding columns are read and their values ​​are stored in memory as objects M4, M5, M6, M7, M8, and M9, respectively.

[0054] When F3 = json, define a global array variable P, convert the object Z in memory into a json array object Z1, read it row by row, and read each row as a json object R1. According to the configuration of train direction V1, station name V2, station code V3, first train time V4, last train time V5, and train interval V6, read the corresponding key value and store the column values ​​into objects M4, M5, M6, M7, M8, and M9 in memory respectively.

[0055] In one embodiment, the step of establishing connection relationships from line name objects, weekday objects, and each project object to the data destination based on the destination location parameters for different destination data types, and placing the connection relationships into an array object, includes: when the destination data type is JSON, creating a JSON object, assigning the values ​​of line name objects, weekday objects, and each project object to the JSON object according to the key names configured for each project, and placing the JSON object into an array object; when the destination data type is a database type, establishing insert statements from line name objects, weekday objects, and each project object to the data destination, and placing the insert statements into an array object.

[0056] According to the configuration in configuration file T, when L1 = jsonarray, a JSON object R is created in memory. n Based on the keys configured in C1 (direction of travel), C2 (station name), C3 (station code), C4 (first train time), C5 (last train time), C6 (train interval), C7 (line name), and C8 (whether it is a weekday), process the JSON object R. n Assignment, R n The assignment relationship is as follows: V c1 =M4, Vc2 =M5, V c3 =M6, V c4 =M7, V c5 =M8, V c6 =M9, V c7 =M1, V c8 =M 2, and R n After table object Z1 is read row by row, the array variable P is manipulated according to the L1 configuration in T.

[0057] When the target data type is a database type, such as L1=mysql and L1=oracle, the corresponding data table insert statement Q is constructed by matching the column names in the following parameters: direction of travel (C1), station name (C2), station code (C3), first train time (C4), last train time (C5), train interval (C6), line name (C7), and whether it is a weekday (C8). n Q n The assignment relationship is as follows: V c1 =M4, V c2 =M5, V c3 =M6, V c4 =M7, V c5 =M8, V c6 =M9, V c7 =M1, V c8 =M2, and the statement Q n Place it in P.

[0058] In one embodiment, the step of operating on the array object according to the connection object to update the timetable to the data destination for different target data types includes: when the target data type is a database type, performing a database update operation by executing an insert statement in the array object; when the target data type is JSON, using a file handle connection to output the array object to a file.

[0059] When the target data type is a database type, such as L1 = mysql or L1 = oracle, database connection M3 is used to perform database operations. When L1 = jsonarray, a file handle is used to connect to M3 to output the array variable P1 to a file, ultimately completing the timetable update to the data destination.

[0060] This invention also provides a rail transit timetable update device, comprising: a source reading module, used to read a source configuration file, read timetable documents according to document information parameters therein and store them in a document object, and extract line names and weekday status according to document names, storing them in a line name object and a weekday object respectively, wherein the document information parameters include document name, document path and document format; a destination reading module, used to read a destination configuration file, establish a destination data connection according to destination parameters therein, and store the destination data connection method in a connection object; and a data extraction module, used to read timetable data from the document object according to project location parameters for different document formats, and extract each timetable data from the document object. Each project is stored in its corresponding project object; the connection establishment module is used to establish connection relationships from the line name object, the workday object, and each project object to the data destination based on the destination location parameters for different destination data types, and put the connection relationships into an array object; the write execution module is used to operate on the array object based on the connection objects for different destination data types, and execute the timetable update to the data destination; wherein, the source configuration file is pre-configured with document information parameters and project location parameters, and the destination configuration file is pre-configured with destination parameters and destination location parameters, and the destination parameters include the destination data type, the destination data medium name, and the destination data connection method.

[0061] The rail transit timetable updating device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned rail transit timetable updating method embodiment. For the sake of brevity, any parts not mentioned in the rail transit timetable updating device embodiment can be referred to the corresponding content in the aforementioned rail transit timetable updating method embodiment.

[0062] This application also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application store, etc., which stores a computer program, and the program performs corresponding functions when executed by a processor. The computer-readable storage medium of this embodiment, when executed by a processor, implements a method for updating a rail transit timetable.

[0063] It should be noted that, depending on the implementation needs, the various steps / components described in this application can be broken down into more steps / components, or two or more steps / components or parts of the operation of steps / components can be combined into new steps / components to achieve the purpose of this invention.

[0064] The order of the steps in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0065] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for updating rail transit timetables, characterized in that, The method includes: Read the source configuration file, read the timetable document according to the document information parameters therein and store it in the document object, and extract the line name and weekday status according to the document name and store them in the line name object and weekday object respectively. The document information parameters include document name, document path and document format; Read the destination configuration file, establish a destination data connection based on the destination parameters, and store the destination data connection method in the connection object; For different document formats, timetable data is read from the document object according to the project location parameter, and each item of the read timetable is stored in the corresponding project object. For different destination data types, establish connection relationships from line name objects, workday objects, and each project object to the data destination based on the destination location parameter, and put the connection relationships into an array object; For different target data types, the array object is operated on according to the connection object to perform timetable updates to the data destination; The source configuration file pre-configures document information parameters and project location parameters, and the destination configuration file pre-configures destination parameters and destination location parameters. The destination parameters include the destination data type, the destination data medium name, and the destination data connection method.

2. The rail transit timetable updating method according to claim 1, characterized in that, Before reading the destination configuration file, the following is also included: Generate a timetable document for each route and different weekday status for the timetable to be updated. The document name includes the route name and weekday status. The weekday status includes weekdays and rest days. Each document includes items such as the direction of travel, station name, station code, first train time, last train time, and travel interval.

3. The rail transit timetable updating method according to claim 1, characterized in that, Before reading the source configuration file, the process also includes: Configure the project location parameters in the source configuration file; When the document format is a table, the item position parameter is the column name corresponding to each item; when the document format is JSON, the item position parameter is the key name corresponding to each item.

4. The rail transit timetable updating method according to claim 1, characterized in that, Before reading the destination configuration file, the following is also included: Configure the destination parameters and destination location parameters in the destination configuration file; When the target data type is a database type, the target data medium name is the name of the imported data table, and the target data connection method is the database connection parameter; When the target data type is JSON, the target data medium name is defaulted, and the target data connection method is the target document path.

5. The rail transit timetable updating method according to claim 1 or 4, characterized in that, The destination location parameters include the route name location parameter of the data destination, the working day status location parameter, and the location parameter of each item.

6. The rail transit timetable updating method according to claim 1, characterized in that, The process involves reading timetable data from the document object based on the project location parameters for different document formats, and storing each item of the read timetable into the corresponding project object, including: When the document format is a table, the document object is converted into a table object and read in row order. The corresponding column is read according to each item, and the value of each column is stored in the corresponding item object. When the document format is JSON, the document object is converted into a JSON array object and read in row order. For each item, the corresponding key value is read and the corresponding column value is stored in the corresponding item object.

7. The rail transit timetable updating method according to claim 1, characterized in that, For different destination data types, connections are established from route name objects, weekday objects, and each project object to the data destination based on the destination location parameter. These connections are then placed into an array object, including: When the target data type is JSON, create a JSON object, assign the values ​​of the line name object, weekday object, and each project object to the JSON object according to the key name configured for each project, and put the JSON object into an array object; When the target data type is a database type, create an insert statement from the line name object, the workday object, and each project object to the data destination, and put the insert statement into an array object.

8. The rail transit timetable updating method according to claim 7, characterized in that, The process of operating on the array object based on the connection object for different target data types, and performing timetable updates to the data destination, includes: When the target data type is a database type, the database update operation is performed by executing the insert statement in the array object; When the target data type is JSON, use a file handle connection to output the array object to a file.

9. A rail transit timetable updating device, characterized in that, include: The source reading module is used to read the source configuration file, read the timetable document according to the document information parameters therein and store it in the document object, and extract the line name and weekday status according to the document name and store them in the line name object and weekday object respectively. The document information parameters include document name, document path and document format. The destination reading module is used to read the destination configuration file, establish a destination data connection based on the destination parameters in it, and store the destination data connection method in the connection object; The data extraction module is used to read timetable data from the document object according to the project location parameters for different document formats, and store each project of the read timetable into the corresponding project object. The connection establishment module is used to establish connection relationships from line name objects, workday objects, and each project object to the data destination based on the destination location parameters for different destination data types, and put the connection relationships into an array object; The write execution module is used to operate on the array object according to the connection object for different target data types, and to update the timetable to the data destination; The source configuration file pre-configures document information parameters and project location parameters, and the destination configuration file pre-configures destination parameters and destination location parameters. The destination parameters include the destination data type, the destination data medium name, and the destination data connection method.

10. A computer storage medium, characterized in that, It contains a computer program that can be executed by a processor, which performs the rail transit timetable update method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Urban rail transit train operation adjustment scheme optimization method and system

    CN114312926A

  • Automating Creation of Multiple Simultaneous Software Development Environments on a Computer System

    US20240095028A1