Data synchronization method and system applied to train control and ATS equipment
By deploying the data synchronization system in the ATS equipment, using the application server to monitor and automatically switch the database server, only the necessary train data is synchronized, which solves the problem of complexity and high cost of the traditional synchronization method, and improves the data synchronization efficiency in rail transit signal control. and degree of automation to ensure the stability of train operation.
Patent Information
- Application Number
- CN202410584862.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2024-08-30
AI Technical Summary
The data synchronization method in traditional rail transit signal control has problems such as complexity, high cost, and difficulty in automation switching. Especially when data synchronization is abnormal during train operation, it may cause the system to become unavailable and affect the normal operation of the train.
A data synchronization method and system is designed. The data synchronization system is deployed through ATS equipment, and the application server is used to monitor the connection status of the database server in real time, automatically switching the main and backup databases, and only synchronizing the necessary dynamic data for the train's operation on the day, reducing the complexity of the synchronization operation. speed and cost, realizing automated active and standby switching.
It improves the efficiency and automation of data synchronization, reduces the impact of system failures on train operation, and reduces system availability and maintenance difficulty during the synchronization process.
Smart Images

Figure CN118568171A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data synchronization in rail transit signal control, and in particular to a data synchronization method, system and ATS device applied to train control. Background Art
[0002] The traditional dual database working mode is usually that the dual databases work independently, and the primary database synchronizes data with the backup database in real time and in full. The specific synchronization method can be implemented by physical mirror synchronization of hard disk data, or based on redo log synchronization and data pump.
[0003] However, each of the above synchronization methods has corresponding disadvantages. For example, the direction of synchronization is required to be fixed, which is generally a one-way synchronization from the main database to the backup database. If the backup database needs to synchronize with the main database, it is necessary to manually intervene and switch after the main database is completely disabled. It cannot automatically complete two-way synchronization, and the operation is complicated and the synchronization efficiency is low. It requires a special third-party synchronization tool to implement, which is costly. In addition, the synchronization method in the related technology has very high requirements for data integrity in the backup database. Once the synchronization process is abnormal, the backup database may not work normally. In the field of rail transit signaling, once there is an equipment failure, the normal operation of the current train is the top priority. Therefore, the losses caused by data synchronization problems affecting the normal operation of the train are huge. Summary of the invention
[0004] In an exemplary embodiment of the present application, a data synchronization method, system and ATS device for train control are provided to reduce the complexity of synchronization operations, improve synchronization efficiency and realize automatic master-slave switching.
[0005] According to a first aspect of an exemplary embodiment, a data synchronization method for train control is provided, which is applied to an ATS device. A data synchronization system is deployed on the ATS device. The system includes an active control center application server cluster, an active control center database server cluster, a standby control center application server cluster, and a standby control center database server cluster. A database is deployed on each database server in the active control center database server cluster and the standby control center database server cluster. The method includes:
[0006] The first application server obtains the identification and update time of at least one database server, and determines the database server with the latest update time as the current main database server; wherein the first application server is an operating application server in the main control center application server cluster and the backup control center application server cluster;
[0007] If the first application server detects that the current main database server is disconnected and the standby database server is connected normally, the set business data stored in the first application server is written into the database deployed by the standby database server;
[0008] Among them, the standby database server is the database server cluster of the main control center and other database servers in the database server cluster of the standby control center except the current main database server; the business data is set to be the necessary dynamic data for the train operation on that day.
[0009] According to the second aspect of the exemplary implementation, a data synchronization system is provided, including a primary control center application server cluster, a primary control center database server cluster, a backup control center application server cluster and a backup control center database server cluster, wherein a database is deployed on each database server in the primary control center database server cluster and the backup control center database server cluster; a first application server is used to execute the method of the first aspect, and the first application server is an operating application server in the primary control center application server cluster and the backup control center application server cluster.
[0010] According to a third aspect of an exemplary embodiment, a data synchronization device for train control is provided, the device is applied to an ATS device, a data synchronization system is deployed on the ATS device, the system includes an active control center application server cluster, an active control center database server cluster, a standby control center application server cluster and a standby control center database server cluster, and a database is deployed on each database server in the active control center database server cluster and the standby control center database server cluster; the device includes a first server, and the first server includes a data transmission unit and a data processing unit:
[0011] The data transmission unit is used to: obtain the identification and update time of at least one database server, and determine the database server with the latest update time as the current main database server; wherein the first application server is an operating application server in the main control center application server cluster and the backup control center application server cluster;
[0012] The data processing unit is used to: if it is detected that the current main database server is disconnected and the standby database server is connected normally, write the set business data stored in the first application server into the database deployed by the standby database server;
[0013] Among them, the standby database server is the database server cluster of the main control center and other database servers in the database server cluster of the standby control center except the current main database server; the business data is set to be the necessary dynamic data for the train operation on that day.
[0014] According to a fifth aspect of an exemplary implementation, an ATS device is provided, on which a data synchronization system is deployed, the system comprising an active control center application server cluster, an active control center database server cluster, a standby control center application server cluster, and a standby control center database server cluster, wherein a database is deployed on each database server in the active control center database server cluster and the standby control center database server cluster; each server comprises a processor and a memory:
[0015] The first processor is configured to execute:
[0016] Obtaining the identification and update time of at least one database server, and determining the database server with the latest update time as the current main database server; wherein the first processor is a processor of the first application server, and the first application server is an operating application server in the main control center application server cluster and the backup control center application server cluster;
[0017] When it is detected that the current main database server is disconnected and the standby database server is connected normally, the set business data stored in the first application server is written into the database deployed by the standby database server;
[0018] Among them, the standby database server is the other database servers in the main control center database server cluster and the standby control center database server cluster except the current main database server; the business data is set to be the necessary dynamic data for the train operation on that day;
[0019] The first memory is configured to execute:
[0020] Storing business data of train operation; wherein the first memory is the memory of the first application server.
[0021] According to a fifth aspect of an exemplary implementation, a computer storage medium is provided, in which computer program instructions are stored. When the instructions are executed on a computer, the computer executes the data synchronization method applied to train control as in the first aspect.
[0022] The data synchronization method provided in the embodiment of the present application is that the synchronization process is completed inside the currently operating application server, and the operating application server in the main control center application server cluster and the backup control center application server cluster is called the first application server. The synchronization process can be divided into two stages, the first stage is the main database decision stage, and the second stage is the main-standby switching stage. In the first stage, the first application server obtains the identification and update time of at least one database server, and determines the database server with the latest update time as the current main database server; in the second stage, the first application server detects that the current main database server connection is disconnected and the backup database server connection is normal, then the set business data stored in the first application server is written into the database deployed by the backup database server, where the backup database server is the other database server in the main control center database server cluster and the backup control center database server cluster except the current main database server; the business data is set to the necessary dynamic data for the train to run on the day. Since the synchronization process of the business data in the embodiment of the present application is implemented by the currently operating application server, compared with the related technology that requires the use of third-party synchronization tools or manual intervention, the complexity of the synchronization operation is reduced. In addition, by classifying business data and adopting the principle of non-synchronization when not necessary, only the necessary dynamic data of the train operation on the day is synchronized, which improves synchronization efficiency and reduces the problem of reduced system availability caused by full data synchronization. In addition, during the master-slave switching process, the master refers to the current master database server, not the physical master database server. Therefore, automatic master-slave switching can be achieved without affecting train operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0024] Figure 1a The structure diagram of a CBTC system provided by an embodiment of the present application is exemplarily shown;
[0025] Figure 1b An application scenario diagram of a data synchronization method for train control provided by an embodiment of the present application is exemplarily shown;
[0026] Figure 2 A flow chart of a data synchronization method for train control provided by an embodiment of the present application is exemplarily shown;
[0027] Figure 3The following is an exemplary logical structure diagram of a data synchronization system provided by an embodiment of the present application;
[0028] Figure 4 A schematic diagram exemplarily shows a logical structure of a data access layer provided in an embodiment of the present application;
[0029] Figure 5 A schematic diagram of a data query control provided by an embodiment of the present application is exemplarily shown;
[0030] Figure 6 A schematic diagram of a business data classification synchronization strategy provided by an embodiment of the present application is exemplarily shown;
[0031] Figure 7 A flowchart of a complete data synchronization method provided by an embodiment of the present application is exemplified;
[0032] Figure 8 The following is a schematic diagram showing the structure of a data synchronization device for train control provided by an embodiment of the present application;
[0033] Fig. 9 The structural diagram of an ATS device provided in an embodiment of the present application is exemplified. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0035] For ease of understanding, the professional terms involved in the embodiments of the present application are explained below:
[0036] (1) Database synchronization: Keep the contents of two or more databases consistent, or keep them partially consistent as needed. In the related art, there are two ways to implement database synchronization. The first is to apply the changes of one database to another database based on the database log. This method is suitable for the same database with exactly the same data structure. If this synchronization method is applied to different types of databases, or the data types in the databases are different, problems will arise. The second implementation method is to analyze the contents of the two databases, find out the differences, and write the records of the differences into the other database. This method does not have strict requirements on the data type, because appropriate type conversion can be performed before the data is called out from one database and written to another database. If the Open Database Connectivity (ODBC) interface is used to access the database, this method of implementing synchronization can also be applied to the synchronization between various heterogeneous databases.
[0037] The synchronization methods of dual databases in the related technologies each have corresponding disadvantages. For example, the synchronization direction is required to be fixed, which is generally a one-way synchronization from the main database to the backup database. If the backup database needs to be synchronized with the main database, it is necessary to manually intervene and switch after the main database is completely disabled. The two-way synchronization cannot be completed automatically, and the operation is complicated; it requires a special third-party synchronization tool to implement, which is costly. In addition, the synchronization method in the related technology has very high requirements for data integrity in the backup database. Once the synchronization process is abnormal, the backup database may not work normally; when the network environment is unstable, the probability of problems occurring is extremely high. In addition, the synchronization method in the related technology requires a special third-party synchronization tool, which is costly, and the synchronization operation is complicated, which is not conducive to automated maintenance. In the field of rail transit signaling, once there is an equipment failure, the normal operation of the current train is the top priority. Therefore, the losses caused by data synchronization problems affecting the normal operation of the train are huge.
[0038] To this end, an embodiment of the present application provides a data synchronization method for train control, which can be applied to Automatic Train Supervision (ATS) equipment. A data synchronization system is deployed on the ATS equipment. The data synchronization system includes a primary control center and a backup control center, wherein the primary control center includes a primary control center application server cluster and a primary control center database server cluster, and the backup control center includes a backup control center application server cluster and a backup control center database server cluster. A database is deployed on each database server in the primary control center database server cluster and the backup control center database server cluster. All servers can be connected through the ATS redundant network to achieve access to database heartbeat data, business synchronization data, and business application data. Reference Figure 1a ,Communication Based Train Control (CBTC) is very important in the field of train control, Figure 1a A structural schematic diagram of a CBTC system is shown. The data synchronization method applied to train control in the embodiment of the present application can be applied to ATS equipment.
[0039] Taking the operating application server (first application server) in the active control center application server cluster and the standby control center application server cluster as an example, the current primary database server is first determined, and then the business data synchronization between the active control center database and the standby control center database is realized.
[0040] After introducing the design ideas of the embodiments of the present application, the following briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limited. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0041] refer to Figure 1b , shows an application scenario diagram of a data synchronization method applied to train control, wherein the main control center application server cluster uses two application servers (application server IA, application server IB) as an example, and the backup control center application server cluster also uses two application servers (application server II-A and application server II-B) as an example; the main control center database cluster uses two database servers (database server IA, database server IB) as an example, and the backup control center database cluster uses two database servers (database server II-A, database server II-B) as an example. For each application server, its corresponding database is called a local database, which does not need to be installed and can be used to store relevant data of the corresponding application server. For each database server, its corresponding database is called a remote database, which is installed on the corresponding database server and can be used to store data that needs to be synchronized.
[0042] It should be noted that the concepts of master and backup have physical and logical distinctions. For example, physically, the master database server and the backup database server are fixed; logically, the database server currently in operation is the master database server. Figure 1b The concept of active and standby is from a physical perspective.
[0043] In addition, the embodiments of the present application mainly include the following situations:
[0044] 1. When the primary database is disconnected, the necessary dynamic data in the memory of the current application server is written to the standby database during database switching.
[0045] 2. After the database switch is completed, the semi-dynamic data generated during the operation of the current application server is written to the standby database.
[0046] 3. When both the primary database and the standby database are normal, all the semi-dynamic data generated during the operation of the current application server are written into the primary database and the standby database.
[0047] To further illustrate the technical solution provided by the embodiment of the present application, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation steps shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiment of the present application.
[0048] Combine the following Figure 1b The application scenario shown is shown in Figure 2 A data synchronization method for train control is shown, which is applied to ATS equipment, combined with Figure 2 , the technical solution provided by the embodiment of the present application is described. Referring to the first case, the method at least includes the following steps:
[0049] S201: The first application server obtains the identification and update time of at least one database server, and determines the database server with the latest update time as the current main database server.
[0050] The first application server is an operating application server in the main control center application server cluster and the backup control center application server cluster;
[0051] S202: If the first application server detects that the current main database server is disconnected and the standby database server is connected normally, the set business data stored in the first application server is written into the database deployed by the standby database server.
[0052] Among them, the standby database server is the main control center database server cluster and other database servers in the standby control center database server cluster except the current main database server; the business data is set to be the necessary dynamic data for the train operation on that day.
[0053] The data synchronization method provided in the embodiment of the present application is that the synchronization process is completed inside the currently operating application server, and the operating application server in the main control center application server cluster and the backup control center application server cluster is called the first application server. The synchronization process can be divided into two stages, the first stage is the main database decision stage, and the second stage is the main-standby switching stage. In the first stage, the first application server obtains the identification and update time of at least one database server, and determines the database server with the latest update time as the current main database server; in the second stage, the first application server detects that the current main database server connection is disconnected and the backup database server connection is normal, then the set business data stored in the first application server is written into the database deployed by the backup database server, where the backup database server is the other database server in the main control center database server cluster and the backup control center database server cluster except the current main database server; the business data is set to the necessary dynamic data for the train to run on the day. Since the synchronization process of the business data in the embodiment of the present application is implemented by the currently operating application server, compared with the related technology that requires the use of third-party synchronization tools or manual intervention, the complexity of the synchronization operation is reduced. In addition, by classifying business data and adopting the principle of non-synchronization when not necessary, only the necessary dynamic data of the train operation on the day is synchronized, which improves synchronization efficiency and reduces the problem of reduced system availability caused by full data synchronization. In addition, during the master-slave switching process, the master refers to the current master database server, not the physical master database server. Therefore, automatic master-slave switching can be achieved without affecting train operation.
[0054] Regarding S201, see Figure 1b As an illustration, since there is only one application server in operation at any time, the server currently operating may be referred to as the first server, for example, the first server is the application server IA.
[0055] This step is mainly the primary database decision stage, that is, the process of determining the primary database, and the database installed on the primary database server is the primary database. Therefore, the identification and update time of at least one database server can be obtained, and the database server with the latest update time can be determined as the current primary database server. Figure 1bIn the example, the identifiers (which can be the four numbers corresponding to the four database servers) and update times of the four database servers (database server IA, database server IB, database server II-A, and database server II-B) can be obtained, and then the four update times are sorted, and then the database server with the latest update time is determined as the current main database server (for example, database server II-A). At this time, the data access interface can use the connection corresponding to the main database number.
[0056] As mentioned above, after determining the current main database server, it is also possible to determine that the database deployed on it is the main database. At this time, all business modules can be controlled to access only the main database through a unified application layer access interface. Optionally, the application layer access interface in the embodiment of the present application includes interfaces for functions or operations such as establishing database connections, disconnecting database connections, querying data, updating data, deleting data, and inserting data. In addition, in the embodiment of the present application, the type of database is not limited. For example, mainstream database system drivers can be encapsulated, including SQLite, Access, Excel, MySQL, SQL Server, Oracle, etc., to achieve unified interface access at the application layer, and establish a unified automatic diagnosis mechanism and disconnection and reconnection mechanism for the database connection status.
[0057] Involving S202, this step is mainly the active-standby switching strategy. Specifically, if the first application server (e.g., application server IA) detects that the current active database server (e.g., database server II-A) is disconnected and the standby database (e.g., database server IA, database server IB, database server II-B) is connected normally, the set business data stored in the database deployed by the current active database server (e.g., database server II-A) is written into the database deployed by the standby database server. After the switch, the data access interface uses the interface of the standby database.
[0058] Since the master and standby mentioned here are logical master and standby, the master-standby switching process that can be implemented in the embodiment of the present application solves the problem that traditional databases cannot automatically synchronize in both directions. In addition, the application server implements the database access control and business data synchronization strategy. The application server monitors the status of the master database in real time. When the master database fails, it automatically switches the standby database to the master. The switching process is fully automated and does not affect business operations.
[0059] Optionally, during the active / standby switching process, the business data is set to include necessary dynamic data of the current train operation, such as the daily operation plan and other data. Compared with the synchronization of full data in the prior art, according to the principle of non-essential synchronization, it is mainly enough to support the operation of the train on the same day, and the amount of data synchronization is minimized. This solves the problem of reduced system availability caused by synchronizing full data, reduces system cost, and reduces the difficulty of construction and maintenance.
[0060] Among them, object relationship mapping can be realized through .Net reflection technology to achieve type classification of set business data.
[0061] The above embodiment is a synchronization strategy for the necessary dynamic data of the train running on the day. In the actual application process, the set business data can also be static data or non-essential dynamic data of the train running on the day. For this type of data, an asynchronous strategy is implemented, that is, the static data and the non-essential dynamic data of the train running on the day are kept unchanged on the server deployed by the current main database.
[0062] In a specific example, the static data is configuration data, which remains unchanged during the operation of the first application server and is not allowed to be modified. Moreover, the static data is mapped to the memory object of the first application server when the first application server is started, and is kept thereafter. The static data is accessed by accessing the memory object during the operation of the first application server to improve query performance. In addition, in order to ensure that the data of the local database of the first application server is consistent with the static data of the current main database, the data during the disconnection of the current main database server is saved in the local database and restored after the current main database server is restored to the connection.
[0063] In a specific example, the non-essential dynamic data of the train operation on that day includes playback data or operation record data, and the non-essential dynamic data of the train operation on that day is accessed by accessing the corresponding database table.
[0064] In addition, the business data can also be set as semi-dynamic data. For this type of data, when the first application server accesses the unified application layer access interface, it detects an insert, update, delete or query operation. If the primary database server and the standby database server are both connected normally at this time, the operation is performed on the database deployed by the current primary database server and the database deployed by the current standby database server. For example, when semi-dynamic data is synchronized in real time, when the business module accesses these operations through the interface, the primary database is operated first, and then the standby database is operated. This can correspond to situation 3 in the above embodiment.
[0065] If the standby database server has been switched at this time, only the semi-dynamic data generated during the operation of the first application server is written into the database deployed by the standby database server. This may correspond to the situation 2 in the above embodiment.
[0066] In summary, the embodiments of the present application follow the principle of non-synchronization unless necessary, and minimize the amount of synchronized data. As long as it can support the day's operations. So that the database can be quickly switched back. Different synchronization schemes are adopted for different types of business data: static configuration data does not need to be synchronized; semi-dynamic data is synchronized by the application in real time; dynamic data necessary for the day's operations, such as the day's planned operation diagram and other data, are synchronized from the memory database of the first application server to the standby database when the primary and standby databases switch; dynamic data not required for the day's operations are not synchronized, such as playback, operation records and other data.
[0067] In addition, in order to ensure the continuity of the synchronization process, the identifier of the current main database server (database server II-A) can be written into other servers (application server IB, application server II-A and application server II-B) in the main control center application server cluster and the backup control center application server cluster except the first application server, as well as the database servers (database server IA, database server IB, database server II-A, database server II-B) in the main control center database server cluster and the backup control center database server cluster.
[0068] In order to make the technical solution of this application more perfect, Figure 3 A logical structure diagram of a data synchronization system provided in an embodiment of the present application, which can be logically divided into a data access layer and a business application layer. The data access layer implements multi-database connection management, dual database access and switching control, and dual database data synchronization. The data access layer provides a data access interface to the business application layer, which hides the details of dual database access. The upper layer does not need to care about which database to access and the database switching problem. For example, Figure 4 A logical structure of a data access layer is shown, in which the data access layer includes a data access control function, a data synchronization function, an access and switching control function, and a connection management function. In the embodiment of the present application, only the data access control function and the data synchronization function are involved, and other functions are not described in detail.
[0069] In addition, the process of deciding a primary database in step S202 can be implemented by the data access layer, and the data query request from the business application layer can be forwarded to the current primary database, and the query result can be returned to the requester. Figure 5 A schematic diagram of a data query control provided in an embodiment of the present application.
[0070] In addition, during data synchronization, semi-dynamic data and necessary dynamic data can be written during active / standby switching. Figure 6 A schematic diagram of a business data classification synchronization strategy provided in an embodiment of the present application.
[0071] In order to make the technical solution of this application more perfect, Figure 7 is a flow chart of a complete data synchronization method in an embodiment of the present application. Figure 7 At least the following steps are included:
[0072] S701: The first application server obtains the identification and update time of at least one database server, and determines the database server with the latest update time as the current main database server.
[0073] S702: If the first application server detects that the current main database server connection is disconnected and the standby database server connection is normal, when the business data is set to be the necessary dynamic data for the train operation on that day, the set business data stored in the first application server is written into the database deployed by the standby database server, and the semi-dynamic data generated during the operation of the first application server is written into the database deployed by the standby database server.
[0074] S703: If the business data is set to static data or non-essential dynamic data of the train running on that day, the static data and the non-essential dynamic data of the train running on that day are kept unchanged on the server where the current main database is deployed.
[0075] S704: If the business data is set as semi-dynamic data, when the first application server detects an insert, update, delete or query operation when accessing the unified application layer access interface, the operation is executed in the database deployed on the current standby database server.
[0076] in, Figure 7 The implementation method of each step can be found in the above-mentioned embodiment and will not be repeated here.
[0077] In the embodiment of the present application, different synchronization schemes are adopted for different types of business data: static configuration data does not need to be synchronized; semi-dynamic data is synchronized in real time by the application; dynamic data necessary for the day's operation, such as the day's planned operation diagram and other data, is synchronized from the memory database of the first application server to the standby database when the primary and standby databases are switched; dynamic data not required for the day's operation is not synchronized.
[0078] Based on the same inventive concept, an embodiment of the present application provides a data synchronization system, including a primary control center application server cluster, a primary control center database server cluster, a backup control center application server cluster and a backup control center database server cluster, and a database is deployed on each database server in the primary control center database server cluster and the backup control center database server cluster; the first application server is used to execute the method of the aforementioned embodiment, and the first application server is an operating application server in the primary control center application server cluster and the backup control center application server cluster.
[0079] like Figure 8 As shown, based on the same inventive concept, the embodiment of the present application provides a data synchronization device for train control, which is applied to ATS equipment, and a data synchronization system is deployed on the ATS equipment. The system includes a primary control center application server cluster, a primary control center database server cluster, a backup control center application server cluster, and a backup control center database server cluster. A database is deployed on each database server in the primary control center database server cluster and the backup control center database server cluster. The device includes a first server, and the first server includes a data transmission unit 81 and a data processing unit 82.
[0080] The data transmission unit 81 is used to obtain the identification and update time of at least one database server, and determine the database server with the latest update time as the current main database server; wherein the first application server is an operating application server in the main control center application server cluster and the backup control center application server cluster;
[0081] The data processing unit 82 is used to: if it is detected that the current main database server is disconnected and the standby database server is connected normally, write the set business data stored in the first application server into the database deployed by the standby database server;
[0082] Among them, the standby database server is the database server cluster of the main control center and other database servers in the database server cluster of the standby control center except the current main database server; the business data is set to be the necessary dynamic data for the train operation on that day.
[0083] In an optional implementation, the data processing unit 82 is further configured to:
[0084] The semi-dynamic data generated during the operation of the first application server is written into the database deployed by the standby database server.
[0085] In an optional implementation, if the first application server detects that the current primary database server and the standby database server are connected normally, the data processing unit 82 is further configured to:
[0086] The semi-dynamic data generated during the operation of the first application server is written into the database deployed by the standby database server and the database deployed by the current main database server.
[0087] In an optional embodiment, if the business data is set to static data or non-essential dynamic data of the train operation on that day, the data processing unit 82 is also used to: keep the static data and the non-essential dynamic data of the train operation on that day unchanged on the server deployed by the current main database.
[0088] In an optional implementation, the static data is configuration data, the static data is mapped to a memory object of the first application server when the first application server is started, and the static data is accessed by accessing the memory object during the operation of the first application server.
[0089] In an optional implementation, the non-essential dynamic data of the train operation on that day includes playback data or operation record data, and the non-essential dynamic data of the train operation on that day is accessed by accessing a corresponding database table.
[0090] In an optional implementation manner, if the service data is set as semi-dynamic data, the data processing unit 82 is further configured to:
[0091] If the first application server detects an insert, update, delete or query operation when accessing the unified application layer access interface, the operation is performed on the database deployed on the current standby database server.
[0092] In an optional implementation, the data processing unit 82 is further configured to:
[0093] The identifier of the current main database server is written into other servers in the main control center application server cluster and the standby control center application server cluster except the first application server, and database servers in the main control center database server cluster and the standby control center database server cluster.
[0094] Since the device is the device in the method in the embodiment of the present application, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0095] like Fig. 9As shown, based on the same inventive concept, an embodiment of the present application provides an ATS device, on which a data synchronization system is deployed. The data synchronization system includes a primary control center application server cluster, a primary control center database server cluster, a backup control center application server cluster and a backup control center database server cluster. A database is deployed on each database server in the primary control center database server cluster and the backup control center database server cluster; each server includes a processor and a memory.
[0096] The first processor 91 is configured to execute:
[0097] Obtaining the identification and update time of at least one database server, and determining the database server with the latest update time as the current main database server; wherein the first processor 91 is the processor of the first application server, and the first application server is the operating application server in the main control center application server cluster and the backup control center application server cluster;
[0098] When it is detected that the current main database server is disconnected and the standby database server is connected normally, the set business data stored in the first application server is written into the database deployed by the standby database server;
[0099] Among them, the standby database server is the other database servers in the main control center database server cluster and the standby control center database server cluster except the current main database server; the business data is set to be the necessary dynamic data for the train operation on that day;
[0100] The first memory 92 is configured to execute:
[0101] Store the business data of train operation; wherein the first memory 92 is the memory of the first application server.
[0102] In an optional implementation, the first processor 91 is further configured to:
[0103] The semi-dynamic data generated during the operation of the first application server is written into the database deployed by the standby database server.
[0104] In an optional implementation manner, if the first application server detects that the current primary database server and the standby database server are connected normally, the first processor 91 is further configured to:
[0105] The semi-dynamic data generated during the operation of the first application server is written into the database deployed by the standby database server and the database deployed by the current main database server.
[0106] In an optional implementation, if the business data is set to static data or non-essential dynamic data of the train's operation on that day, the first processor 91 is also used to: keep the static data and the non-essential dynamic data of the train's operation on that day unchanged on the server deployed by the current main database.
[0107] In an optional implementation, the static data is configuration data, the static data is mapped to a memory object of the first application server when the first application server is started, and the static data is accessed by accessing the memory object during the operation of the first application server.
[0108] In an optional implementation, the non-essential dynamic data of the train operation on that day includes playback data or operation record data, and the non-essential dynamic data of the train operation on that day is accessed by accessing a corresponding database table.
[0109] In an optional implementation manner, if the service data is set as semi-dynamic data, the first processor 91 is further configured to:
[0110] If the first application server detects an insert, update, delete or query operation when accessing the unified application layer access interface, the operation is performed on the database deployed on the current standby database server.
[0111] In an optional implementation, the first processor 91 is further configured to:
[0112] The identifier of the current main database server is written into other servers in the main control center application server cluster and the standby control center application server cluster except the first application server, and database servers in the main control center database server cluster and the standby control center database server cluster.
[0113] An embodiment of the present application also provides a computer storage medium, in which computer program instructions are stored. When the instructions are executed on a computer, the computer executes the steps of the above-mentioned data synchronization method applied to train control.
[0114] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0115] The present application is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the function specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.
[0116] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0117] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0118] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data synchronization method for train control, It is characterized in that Applied to ATS equipment, a data synchronization system is deployed on the ATS equipment, the data synchronization system includes a primary control center application server cluster, a primary control center database server cluster, a backup control center application server cluster and a backup control center database server cluster, and a database is deployed on each database server in the primary control center database server cluster and the backup control center database server cluster; the method includes: The first application server obtains the identification and update time of at least one database server, and determines the database server with the latest update time as the current main database server; wherein the first application server is an operating application server in the main control center application server cluster and the standby control center application server cluster; If the first application server detects that the current main database server is disconnected and the standby database server is connected normally, write the set business data stored in the first application server into the database deployed by the standby database server; Among them, the backup database server is the main control center database server cluster and other database servers in the backup control center database server cluster except the current main database server; the set business data is the necessary dynamic data for the train operation on that day.
2. The method according to claim 1, It is characterized in that The method further comprises: The first application server writes the semi-dynamic data generated during the operation of the first application server into the database deployed by the standby database server.
3. The method according to claim 1, It is characterized in that If the first application server detects that the current primary database server and the standby database server are connected normally, the method further includes: The first application server writes the semi-dynamic data generated during the operation of the first application server into the database deployed by the standby database server and the database deployed by the current main database server.
4. The method according to claim 1, It is characterized in that If the set business data is static data or non-essential dynamic data of the train running on that day, the method further includes: The static data and the non-essential dynamic data of the train operation on that day are kept unchanged on the server where the current main database is deployed.
5. The method according to claim 4, It is characterized in that The static data is configuration data, which is mapped to a memory object of the first application server when the first application server is started, and is accessed by accessing the memory object during the operation of the first application server.
6. The method according to claim 4, It is characterized in that The non-essential dynamic data of the train running on that day includes playback data or operation record data, and the non-essential dynamic data of the train running on that day is accessed by accessing a corresponding database table.
7. The method according to claim 1, It is characterized in that If the set service data is semi-dynamic data, the method further includes: If the first application server detects an insert, update, delete or query operation when accessing the unified application layer access interface, the operation is performed in the database deployed on the standby database server.
8. The method according to any one of claims 1 to 7, It is characterized in that The method further comprises: The identifier of the current main database server is written into other servers in the active control center application server cluster and the standby control center application server cluster except the first application server, and database servers in the active control center database server cluster and the standby control center database server cluster.
9. A data synchronization system, It is characterized in that It includes a main control center application server cluster, a main control center database server cluster, a standby control center application server cluster and a standby control center database server cluster, and a database is deployed on each database server in the main control center database server cluster and the standby control center database server cluster; the first application server is used to execute the method described in any one of claims 1-6, and the first application server is an operating application server in the main control center application server cluster and the standby control center application server cluster.
10. An ATS device, It is characterized in that The data synchronization system is deployed on the ATS device, and the data synchronization system includes a primary control center application server cluster, a primary control center database server cluster, a backup control center application server cluster and a backup control center database server cluster. A database is deployed on each database server in the primary control center database server cluster and the backup control center database server cluster; each server includes a processor and a memory: The first processor is configured to execute: Obtaining the identification and update time of at least one database server, and determining the database server with the latest update time as the current main database server; wherein the first processor is a processor of a first application server, and the first application server is an operating application server in the main control center application server cluster and the standby control center application server cluster; When it is detected that the connection of the current primary database server is disconnected and the connection of the standby database server is normal, the set business data stored in the database deployed by the current primary database server is written into the database deployed by the standby database server; The standby database server is the database server cluster of the main control center and other database servers in the database server cluster of the standby control center except the current main database server; the set business data is the necessary dynamic data for the train operation on that day; The first memory is configured to execute: Storing business data of train operation; wherein the first memory is the memory of the first application server.
Citation Information
Patent Citations
Server multi-center real-time hot standby switching device of automatic train monitoring system
CN106945691A
Dual-computer hot standby switching method and device, storage medium and electronic equipment
CN115883339A
Data processing method and device, equipment and storage medium
CN116627720A
Method for negat main spare board in communication equipment
CN1741404A
Cited By
Main-standby train supervision system, and main-standby switching method therefor
WO2026179254A1
