A data analysis up-down version compatibility method and a data analysis method

By optimizing the query function of the rail transit ATS system, data entity uniqueness and version compatibility are achieved, solving the problems of excessive class libraries and complex structure in existing technologies, improving the readability and scalability of the system, and reducing development costs.

CN115237460BActive Publication Date: 2026-03-31成都交控轨道科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-07
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

The existing ATS (Automatic Train Service) system for rail transit has too many query function libraries with complex structures, resulting in poor readability, insufficient scalability and compatibility, and increased software development costs.

Method used

The query function adopts an overall structural optimization, ensures data entity uniqueness, stores it in the corresponding data management class, includes parsing methods for each data version, achieves version compatibility through data dictionary and dynamic reflection loading, and simplifies the code structure.

Benefits of technology

It improves software development efficiency, reduces development costs, simplifies system structure, facilitates expansion and updates, and enhances the configurability and compatibility of data parsing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115237460B_ABST
    Figure CN115237460B_ABST
Patent Text Reader

Abstract

The application discloses a data analysis up-to-down version compatibility method and a data analysis method, and belongs to the field of rail transit, and comprises the following steps: when a software program of an ATS system of rail transit is loaded and run by a processor, a query function with optimized overall structure is run to complete the connection between business data of rail transit lines; the connection between the business data of the rail transit lines comprises data reading, data analysis and checking, and data relationship binding; the query function with the optimized overall structure has the following technical features: the entire query function has only one set of data entities; different types of data entities are stored in corresponding data management classes; the data management classes are table types, and the data management classes have analysis methods of various data versions. The application reduces code redundancy, is modularized, functionalized, convenient for extension and update, reduces software development time for subsequent demand changes, and lowers development cost.
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 specifically, to a data parsing method for upward and downward version compatibility, and a data parsing method. Background Technology

[0002] Query functions are a fundamental component of the Automatic Train Control System (ATS). Each module may use the data from query functions, and the relationships between these data are also the business manifestation and presentation of the metro rail transit line. Its initialization can be divided into three steps: data reading, data parsing and checking, and data relationship binding.

[0003] Because the data for each line will have slight differences, and the data will be modified for different lines due to business needs, this incremental change requires constant code modification. As new lines are added and the requirements of old lines change, data parsing also needs to be compatible with different versions of data. The existing solution is to store the corresponding data as a collection type attribute in the query function interface class, putting all the parsing methods in one class. Adding a new table or changing a data column in a table requires modifying this class, which violates the software development philosophy of being closed for modification and open for extension.

[0004] The existing technology has the following technical problems: too many parsing libraries; the internal structure of the libraries is complex, with a single data initialization parsing class having nearly 10,000 lines, resulting in poor readability, unfriendly to newcomers, poor scalability, and a higher risk of errors during modification, thus increasing software development costs; furthermore, it has poor configurability and compatibility. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a data parsing method that is compatible with both upward and downward versions, reducing code redundancy, modularizing and functionalizing the data, facilitating expansion and updates, reducing software development time due to subsequent requirement changes, and lowering development costs.

[0006] The objective of this invention is achieved through the following solution:

[0007] A data parsing method with upward and downward version compatibility is applied to a rail transit ATS system. When the software program of the rail transit ATS system is loaded and run by the processor, a query function with an optimized overall structure is executed to complete the connection between business data of the rail transit lines. The connection between the business data of the rail transit lines includes data reading, data parsing and inspection, and data relationship binding. The query function with an optimized overall structure has the following technical features: the entire query function has only one set of data entities; different types of data entities are stored in corresponding data management classes, the data management classes are of table type, and the data management classes contain parsing methods for each data version.

[0008] Furthermore, when the query function with the optimized overall structure is used to establish connections between business data of rail transit lines, the following initialization steps are included:

[0009] S1: First, initialize the data dictionary and dynamically reflectively load all subclasses that inherit from a certain type;

[0010] S2, based on the configuration version number, uniformly call the parsing methods of all objects in the data dictionary, and select the corresponding parsing method in the data management class according to the data version number to parse and store it in the data dictionary;

[0011] S3 binds the field relationships between various data tables;

[0012] S4, with its open query interface available for external calls, has completed initialization.

[0013] Furthermore, during the data reading, the data is obtained from the Fs file; the Fs file is an Excel spreadsheet generated from the track data using a tool.

[0014] Furthermore, the data reading includes reading the electronic map data table and the link table in the worksheet therein, where a link represents a segment of the track between any two adjacent dividing nodes.

[0015] Furthermore, each worksheet page corresponds to only one data entity class; the overall optimized query function has only one link entity class, which contains all link-related attributes.

[0016] Furthermore, the data management class includes an electronic map data management base class and an ATS data management base class, which correspond to the electronic map data table and the ATS configuration data table, respectively; the Link table in the electronic map data table corresponds to the electronic map link data management class, which explicitly specifies the generic type of the base class as the electronic map link entity class, thereby storing Link entity objects.

[0017] Furthermore, the service interfaces of each table are used as Fs data service interfaces for external calls.

[0018] Furthermore, the parsing method for each data version has a version number.

[0019] A data parsing method, based on any of the above-described data parsing upward and downward version compatible methods, selects the corresponding parsing method in the data management class to parse the data according to the configured version number.

[0020] Furthermore, during the data parsing process, the parsing process is carried out according to the following parsing rules: obtain the maximum version number that is no greater than the input version number; the version numbers in the parsing class can be non-sequential; each parsing class has a base version numbered 0; different data constraint methods are added to the parsing class to check the validity of the data.

[0021] The beneficial effects of this invention include:

[0022] This invention solves the problem of configurable data parsing that is compatible with other versions, improving software development efficiency and reducing development costs. Specifically, it optimizes the overall structure of the query function using object-oriented principles, separating each worksheet into a separate class, decomposing the code within the parsing class, and simplifying the system structure. Furthermore, the parsing method is configurable; data entity objects add corresponding parsing methods based on the data version. Compared to existing technologies, this invention ensures unique data entities, a clear code structure, reduced code redundancy, modularization, functionalization, and facilitates expansion and updates, reducing software development time for subsequent requirement changes. Attached Figure Description

[0023] 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 only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 Flowchart for initializing the query function;

[0025] Figure 2 This is a schematic diagram of the Link class in electronic maps;

[0026] Figure 3 This is a diagram illustrating the relationships within data management categories.

[0027] Figure 4 A diagram illustrating the query function interface and its implementation class;

[0028] Figure 5 A schematic diagram of the electronic map interface and its implementation class;

[0029] Figure 6 This is a diagram of Excel data in an Fs file. Detailed Implementation

[0030] The invention will be further described below with reference to the accompanying drawings and embodiments. All features disclosed in all embodiments of this specification, or steps in all methods or processes implied in the disclosure, may be combined and / or extended or substituted in any way, except for mutually exclusive features and / or steps.

[0031] Terminology Explanation

[0032] Fs: The .fs extension belongs to the F# format, and in this invention, it refers to a file generated by a tool from tabular data in subway lines;

[0033] Sheet: Worksheet;

[0034] Link: An abstract segment of a subway line between any two adjacent dividing nodes is called a link;

[0035] EmapDatamanagementBase: Base class for electronic map data management;

[0036] ATSDatamanagementBase: The base class for ATS data management;

[0037] EmapLinkDatamanagement: A class for managing electronic map link data;

[0038] EmapLinkData: Electronic map link entity class;

[0039] Dictionary<Type,IParseFsData> : Data dictionary, used to store key-value pairs where the key is of the data management base class type and the value type is of the data parsing interface;

[0040] IFsDataSearchService: Fs data service interface;

[0041] Parse: parsing.

[0042] The initialization of a query function can be divided into three steps: data reading, data parsing and checking, and data relationship binding. Its data comes from the Fs file, which is... Figure 3 The data storage structure in this embodiment is generated from an Excel spreadsheet. The solution is to establish the data storage structure in the program based on the actual Excel spreadsheet structure, taking the electronic map data table and the link table in the Sheet page as an example.

[0043] Data entities are unique; each worksheet has only one corresponding data entity class, such as... Figure 2 The entire query function has only one link entity class, which contains all the link-related attributes.

[0044] All data entity objects are stored in a management class, which is a table type. This management class contains parsing methods for each data version. The electronic map data management base class (EmapDatamanagementBase) and the ATS data management base class (ATSDatamanagementBase) correspond to... Figure 3 The electronic map data table and ATS configuration data table are included. The Link table in the electronic map data table corresponds to the electronic map link data management class (EmapLinkDatamanagement). This class explicitly specifies that the generic type of the base class is the electronic map link entity class (EmapLinkData), thereby storing Link entity objects.

[0045] Initialization: such as Figure 1 First, initialize the data dictionary.<Type,IParseFsData> The dynamic reflection loading inherits from all subclasses of the electronic map link data management class (EmapDataManagementBase), uniformly calls the parsing method of all objects in the dictionary, selects the corresponding parsing method in the electronic map link data management class (EmapDataManagementBase) according to the data version number to parse and store it in the dictionary, and finally initializes the relationship between the tables in a unified manner, and the query function initialization is completed.

[0046] The service class interfaces of each table are set as attributes of the Fs Data Service Interface (IFsDataSearchService) interface, exposing the Fs Data Service Interface (IFsDataSearchService) interface for external calls.

[0047] Example 1

[0048] like Figures 1-6 As shown, a data parsing method with upward and downward version compatibility is applied to a rail transit ATS system. Its characteristic is that when the software program of the rail transit ATS system is loaded and run by the processor, a query function with an optimized overall structure is executed to complete the connection between business data of the rail transit lines. The connection between the business data of the rail transit lines includes data reading, data parsing and checking, and data relationship binding. The query function with an optimized overall structure has the following technical features: the entire query function has only one set of data entities; different types of data entities are stored in corresponding data management classes, the data management classes being table types, and the data management classes containing parsing methods for each data version.

[0049] Example 2

[0050] Based on Example 1, when the query function with the optimized overall structure is used to complete the connection between business data of rail transit lines, the following initialization steps are included:

[0051] S1: First, initialize the data dictionary and dynamically reflectively load all subclasses that inherit from a certain type;

[0052] S2, based on the configuration version number, uniformly call the parsing methods of all objects in the data dictionary, and select the corresponding parsing method in the data management class according to the data version number to parse and store it in the data dictionary;

[0053] S3 binds the field relationships between various data tables;

[0054] S4, with its open query interface available for external calls, has completed initialization.

[0055] Example 3

[0056] Based on Example 1, during the data reading, the data is obtained from the Fs file; the Fs file is an Excel spreadsheet in the track data generated by a tool.

[0057] Example 4

[0058] Based on Example 1, the data reading includes reading the electronic map data table and the link table in the worksheet therein, where a link represents a section of the track between any two adjacent dividing nodes.

[0059] Example 5

[0060] Based on Example 4, each worksheet page corresponds to only one data entity class; the overall optimized query function has only one link entity class, which contains all link-related attributes.

[0061] Example 6

[0062] Based on Example 4, the data management class includes an electronic map data management base class and an ATS data management base class, which correspond to the electronic map data table and the ATS configuration data table, respectively. The Link table in the electronic map data table corresponds to the electronic map link data management class, which specifies that the generic type of the base class is the electronic map link entity class, thereby storing Link entity objects.

[0063] Example 7

[0064] Based on Example 4, the service interfaces of each table are used as Fs data service interfaces for external calls.

[0065] Example 8

[0066] Based on Example 1, the parsing method for each data version is provided with a version number.

[0067] Example 9

[0068] A data parsing method, based on the data parsing upward and downward version compatible method described in any of Embodiments 1 to 8, selects the corresponding parsing method in the data management class to parse the data according to the configured version number.

[0069] Example 10

[0070] Based on Example 9, the data parsing process is performed according to the following parsing rules:

[0071] Get the largest version that is not greater than the passed version number;

[0072] Version numbers in a parsing class can be non-sequential;

[0073] Each parsing class has a base version numbered 0;

[0074] Add different data constraint methods to the parsing class to check the validity of the data.

[0075] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0076] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.

[0077] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.

[0078] All parts not covered in this invention are the same as or can be implemented using existing technologies.

[0079] The above technical solution is only one embodiment of the present invention. For those skilled in the art, based on the application methods and principles disclosed in the present invention, it is easy to make various types of improvements or modifications, and not limited to the methods described in the above specific embodiments of the present invention. Therefore, the methods described above are only preferred and are not restrictive.

[0080] In addition to the examples above, other embodiments may be obtained by those skilled in the art based on the above disclosure or by making modifications using knowledge or technology in related fields. The features of each embodiment may be interchanged or replaced. Modifications and changes made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A data parsing up-down version compatibility method applied to a rail transit ATS system, characterized in that, The method comprises the following steps: when a software program of the rail transit ATS system is loaded and run by a processor, a query function with an optimized overall structure is run to complete the connection between service data of a rail transit line; the connection between the service data of the rail transit line comprises data reading, data analysis and checking, and data relationship binding; the query function with the optimized overall structure has the following technical features: The entire query function has only one set of data entities; Different types of data entities are stored in corresponding data management classes, the data management classes are table types, and the data management classes have analysis methods for each data version; When the query function with the optimized overall structure is run to complete the connection between the service data of the rail transit line, the following initialization steps are included: S1, first, initialize a data dictionary, and dynamically reflect and load all subclasses of a certain type; S2, according to a configuration version number, uniformly call analysis methods of all objects of the data dictionary, select a corresponding analysis method in the data management class according to a data version number, analyze and store the data version number in the data dictionary; S3, bind the field connection between each data table; S4, open a query interface for external calling, and complete initialization; The data management classes include an electronic map data management base class and an ATS data management base class, which correspond to an electronic map data table and an ATS configuration data table, respectively; A Link table in the electronic map data table corresponds to an electronic map link data management class, the class displays a generic type of a specified base class as an electronic map link entity class, and thus stores a Link entity object; In the process of analyzing data, the following analysis rules are used: a maximum version number not greater than a transmitted version number is obtained; the version number in the analysis class can be discontinuous; each analysis class has a basic version number 0; different data constraint methods are added to the analysis class to check the validity of data.

2. The data parsing up-down version compatibility method according to claim 1, characterized in that, In the data reading, data is obtained from an Fs file; the Fs file is a file generated by a tool from an Excel table in rail line data.

3. The data parsing up-down version compatibility method according to claim 1, characterized in that, The data reading includes reading an electronic map data table and a link table in each worksheet page, and the link represents a section of a rail line between any two adjacent division nodes on the rail line.

4. The data parsing up-down version compatibility method according to claim 3, characterized in that, Each worksheet page has only one data entity class corresponding thereto; the query function with the optimized overall structure has only one link entity class, which contains all link-related attributes.

5. The data parsing up-down version compatibility method according to claim 3, characterized in that, Service class interfaces of each table are used as Fs data service interfaces for external calling.

6. The data parsing up-down version compatibility method according to claim 1, characterized in that, The analysis methods of each data version are provided with a version number.

7. A data parsing method characterized by comprising: According to any one of claims 1-6, a data analysis upward and downward version compatibility method is provided, according to a configuration version number, a corresponding analysis method in a data management class is selected to analyze data.

Citation Information

Patent Citations

  • Data analysis method and a related device

    CN109491665A

  • Xml language-based vehicle-mounted control software communication protocol analysis method

    CN110839022A