Data and control synchronization method and device for cascaded real-time system, and medium

By introducing a consistency service coordinator and a real-time message bus into a cascading real-time system in the field of urban rail transit, the consistency problem in data synchronization is solved, strong consistency and efficient control are achieved, and the reliability and efficiency of the system are improved.

CN119520545APending Publication Date: 2025-02-25CASCO SIGNAL (ZHENGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411669462.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art has failed to effectively solve the data consistency problem in data synchronization in the field of urban rail transit, resulting in inconsistent data representation between the center and the station.

Method used

A cascading real-time system is adopted, including a central server cluster, a station server cluster and a consistency service coordinator. The consistency service coordinator is based on the RAFT distributed consensus consistency algorithm to ensure strong consistency in data synchronization, and network communication between the center and the station is realized through the real-time message bus.

Benefits of technology

It realizes strong consistency in station-to-center data synchronization, ensures the effectiveness of control commands and feedback commands, improves the reliability and efficiency of the system, and reduces the workload of on-site engineering personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520545A_ABST
    Figure CN119520545A_ABST
Patent Text Reader

Abstract

The invention relates to a data and control synchronization method and device of a cascade real-time system and a medium, a cascade real-time system cross-cluster synchronization target node is determined according to a consistency service coordinator, and the method comprises the steps that any station server cluster master node synchronizes real-time data to a central server cluster master node; and a process of synchronous control from the master node of the central server cluster to the master node of the target station server cluster, wherein the master node of the station server cluster synchronizes all data and change data to the master node of the central server cluster, the standby node and the standby node of the station server cluster. And the station server cluster main node receives and processes the control command issued by the central server cluster main node or the control command issued by the station work station, and feeds back a control back correction command to the corresponding work station after processing is completed. Compared with the prior art, the method has the advantages that the consistency of data synchronization and the effectiveness of control command execution can be ensured, and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of urban rail transit, and in particular to a data and control synchronization method, equipment and medium for a cascade real-time system. Background Art

[0002] There are many system clusters in the field of urban rail transit, which can be divided into central system clusters and station system clusters according to their levels. The signal and monitoring system platform in the field of urban rail transit is responsible for data synchronization between stations and central server clusters. Usually, the entire urban rail transit line has many stations, and a central server cluster and multiple station server clusters will be built.

[0003] In the signal and monitoring system of urban rail transit, the station server cluster is usually responsible for station data management. In addition to central data management, the central server cluster also manages all or part of the station data. Therefore, the system needs to synchronize the real-time data between the central server set and the station server cluster to ensure the consistency of the representation of the central and station workstations.

[0004] There are many professional systems in the field of urban rail transit, which can be divided into integrated subsystems and interconnected subsystems according to the major categories. The integrated subsystems mainly include PSCADA, BAS, FAS, etc. The signal and monitoring system platform in the field of urban rail transit is based on the interface form of each subsystem and the system integration function realized after access. The debugging of many interfaces in stations and centers is bound to be a lot of work.

[0005] CN112653734A discloses a server cluster real-time master-slave control and data synchronization system and method, which connects multiple nodes of the server cluster, including: a node health monitoring module, a master-slave node control module and a master-slave data synchronization module, the node health detection module is used to monitor the working status of each node through the jumping square wave of the heartbeat line, the master-slave node control module selects and switches the master / slave node according to the working status of each node in combination with the judgment algorithm, and the master-slave data synchronization module performs data requests and data synchronization between the master node and the slave node through the data synchronization algorithm. It has a master-slave mutual exclusion function to avoid the failure of multiple master nodes. The master-slave data synchronization module performs data interaction and data update between the master node and the slave node through a dual-port RAM, with a short synchronization delay and a fast cluster service response. However, this method does not consider the consistency problem of data synchronization. Summary of the invention

[0006] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a data and control synchronization method, equipment and medium for a cascaded real-time system, so as to ensure the strong consistency of data synchronization from the station to the center and the effectiveness of issuing execution control commands and feedback return commands during the control process.

[0007] The purpose of the present invention can be achieved by the following technical solutions:

[0008] According to a first aspect of the present invention, a method for synchronizing data and control of a cascaded real-time system is provided, wherein the cascaded real-time system comprises a central server cluster, a station server cluster and a consistency service coordinator, and a target node for synchronization across clusters of the cascaded real-time system is determined by the consistency service coordinator;

[0009] The data synchronization method includes:

[0010] The station server cluster master node obtains the status of the central server cluster master node from the consistency service coordinator, and uses the central server cluster master node as the target node to synchronize the real-time full data and change data;

[0011] When the active node of the station server cluster obtains the message that the standby node of the central server cluster starts the connection, it actively synchronizes all data and changed data to the standby node of the central server cluster;

[0012] The active node of the station server cluster synchronizes all data to the standby node of the station server cluster in real time.

[0013] Control synchronization methods include:

[0014] The control command comes from the control synchronization of the control center workstation: the central server cluster master node obtains the control command issued by the control center workstation and determines the station to which the control command belongs, and obtains the status of the corresponding station server cluster master node from the consistency service coordinator, and sends the control command to the selected station server cluster master node; after the station server cluster master node receives the control command issued by the central server cluster master node, it processes the synchronization control command and sends the control command to the remote target object device. After the remote target object device executes the control command, it feeds back the return command to the station server cluster master node that sent the control command according to the context; the station server cluster master node synchronizes the return command to the central server cluster master node, and the central server cluster master node sends the return command to the corresponding control center workstation;

[0015] The control command comes from the control synchronization of the station workstation: the main node of the station server cluster receives and processes the control command issued by the station workstation, and sends the processed control command to the remote target object device. At the same time, the main node of the station server cluster receives and processes the return-to-school command from the remote target object device, and sends the return-to-school command to the corresponding station workstation.

[0016] As a preferred technical solution, the data and control synchronization method realizes network communication between the center and the station server cluster based on an autonomous and controllable real-time message bus. The real-time message bus supports object-oriented programming and uses reliable TCP / IP communication middleware.

[0017] As a preferred technical solution, the real-time message bus configuration data file is designed as a whole during system planning, and all clusters or workstations in the system use exactly the same bus configuration data file.

[0018] As a preferred technical solution, the consistency service coordinator is implemented based on the RAFT distributed consensus algorithm to ensure strong consistency of cluster data and credibility of global data status.

[0019] As a preferred technical solution, the main node of the station server cluster periodically synchronizes all data to the main node of the central server cluster, and synchronizes all data of the station server cluster periodically, wherein the duration of the synchronization period is customizable.

[0020] As a preferred technical solution, when the main node of the station server cluster synchronizes data with the main node of the central server cluster, and when the main node of the central server cluster synchronizes data with the backup node of the central server cluster, all data and changed data are synchronized strictly in time sequence to ensure the order of status data changes.

[0021] As a preferred technical solution, if the main node of the central server cluster fails to obtain the status of the main node of the station server cluster corresponding to the control command from the consistency service coordinator, the main node of the central server cluster directly feeds back the failed return-to-school information to the control center workstation and explains the cause of the occurrence.

[0022] As a preferred technical solution, in the control synchronization step where the control command originates from the control center workstation, if the station server cluster master node fails to send the control command to the remote target object device, the station server cluster master node directly feeds back the return-to-school command to the central server cluster master node, and the central server cluster master node sends the return-to-school command to the control center workstation.

[0023] As a preferred technical solution, the contents of the control command and the return-to-school command have a unique token identifier, which is used to track the entire process from the generation of the control command to the return of the return-to-school command.

[0024] According to a second aspect of the present invention, there is provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the method described above is implemented when the processor executes the program.

[0025] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the program implements the method described above when executed by a processor.

[0026] Compared with the prior art, the present invention has the following beneficial effects:

[0027] (1) The present invention adopts a consistency service coordinator implemented based on the RAFT distributed consensus algorithm. Through the consistency service coordinator, the strong consistency characteristics of cluster data can be guaranteed, and the credibility of the global data status can be guaranteed.

[0028] (2) The present invention distinguishes the sources of different control commands and adopts different control transmission paths, so as to correctly issue execution control commands and feedback return commands, thereby achieving efficient and reliable control.

[0029] (3) The present invention realizes real-time data synchronization and control between each station and the central server cluster based on a standardized platform, realizes station-level debugging and center-level sharing, effectively reduces the workload of on-site engineering personnel, and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A schematic diagram of the system architecture for realizing data and control synchronization in the present invention;

[0031] Figure 2 This is a schematic diagram of the data synchronization process from the main node of the station server cluster to the main node of the central server cluster;

[0032] Figure 3 This is a schematic diagram of the data synchronization process from the main node of the station server cluster to the standby node of the station server cluster;

[0033] Figure 4 A schematic diagram of the data synchronization process from the active node of the central server cluster to the standby node of the central server cluster;

[0034] Figure 5 It is a schematic diagram of the control synchronization process from the main node of the central server cluster to the main node of the station server cluster;

[0035] Figure 6 This is a schematic diagram of the process of returning to school when the master node of the central server cluster controls the synchronization failure to the master node of the station server cluster;

[0036] Figure 7 This is a schematic diagram of the process of returning to school when the master node of the station server cluster fails to control synchronization;

[0037] Figure 8 This is a schematic diagram of the control and return process of the main node of the station server cluster. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0039] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.

[0040] This embodiment provides a data and control synchronization method for a cascaded real-time system, wherein the cascaded real-time system includes a central server cluster, a station server cluster and a consistency service coordinator, and the target node for cross-cluster synchronization of the cascaded real-time system is determined by the consistency service coordinator.

[0041] The data and control synchronization method is based on an autonomous and controllable real-time message bus to realize network communication between the center and the station server cluster. The real-time message bus supports object-oriented programming, uses reliable TCP / IP communication middleware, and has the characteristics of a connection-oriented streaming network mode. The autonomous and controllable real-time message bus has the characteristics of safety and reliability, high performance, simple configuration, and flexible deployment. The real-time message bus configuration data file is designed as a whole during system planning, and all clusters or workstations in the system use exactly the same bus configuration data file.

[0042] The consistency service coordinator is implemented based on the RAFT distributed consensus algorithm. The service coordinator has the characteristics of strong consistency of cluster data and can ensure the complete consistency requirements of distributed data.

[0043] ①Data synchronization method

[0044] The data synchronization process includes the data synchronization process from the main node of the station server cluster to the main node of the central server cluster, the data synchronization process from the main node of the station server cluster to the standby node of the station server cluster, and the data synchronization process from the main node of the central server cluster to the standby node of the central server cluster.

[0045] S101, the station server cluster master node obtains the status of the central server cluster master node from the consistency service coordinator, and uses the central server cluster master node as the target node to synchronize the real-time full data and change data, such as Figure 2 shown.

[0046] The station server cluster master node periodically synchronizes all data with the central server cluster master node, and synchronizes all data of the station server cluster periodically, where the duration of the synchronization cycle can be customized. The station server cluster master node also synchronizes the change data with the central server cluster master node, that is, the real-time data dynamically acquired based on event-driven.

[0047] S102, when the station server cluster active node obtains the message that the central server cluster standby node starts the connection, it actively synchronizes all data and changed data to the central server cluster standby node, such as Figure 3 shown.

[0048] After the active node of the central server cluster finds that the standby node of the central server cluster has started the connection, it will actively synchronize all the data of the local node to the standby node of the central server cluster, and subsequently synchronize the changed data to the standby node of the central server cluster in real time.

[0049] S103, the station server cluster active node synchronizes the full data station server cluster standby node in real time, such as Figure 4 shown.

[0050] Since the station server cluster is usually small in scale (less than 50,000), the active node of the station server cluster can synchronize all data to the standby node of the station server cluster in real time.

[0051] When the main node of the station server cluster synchronizes data with the main node of the central server cluster, and when the main node of the central server cluster synchronizes data with the backup node of the central server cluster, all data and changed data are synchronized strictly in time sequence to ensure the order of status data changes and the stability of the timing of data change actions.

[0052] ②Control synchronization method

[0053] S201, control commands come from the control synchronization of the control center workstation:

[0054] The master node of the central server cluster obtains the control command issued by the control center workstation and determines the station to which the control command belongs. When the station to which the control belongs is a collection station, the state of the corresponding master node of the station server cluster is obtained from the consistency service coordinator, and the master node is used as the target node for synchronous control, and the control command is issued to the selected master node of the station server cluster;

[0055] After receiving the control command sent by the master node of the central server cluster, the master node of the station server cluster processes the synchronization control command and sends the control command to the remote target object device. After the remote target object device executes the control command, it feeds back the return command to the master node of the station server cluster that sent the control command according to the context;

[0056] The station server cluster master node synchronizes the return-to-school command to the central server cluster master node, and the central server cluster master node sends the return-to-school command to the corresponding control center workstation, such as Figure 5 shown.

[0057] If the master node of the central server cluster fails to obtain the status of the master node of the station server cluster corresponding to the control command from the consistency service coordinator, the master node of the central server cluster directly feeds back the failed return to school information to the control center workstation and explains the cause of the occurrence, such as Figure 6 shown.

[0058] If the station server cluster master node fails to send a control command to the remote target object device, the station server cluster master node directly feeds back a return command to the central server cluster master node, and the central server cluster master node sends the return command to the control center workstation. Figure 7 shown.

[0059] S202, control command comes from the control synchronization of the station workstation:

[0060] The station server cluster master node receives and processes the control command from the station workstation, and sends the processed control command to the remote target object device. At the same time, the station server cluster master node receives and processes the return command from the remote target object device, and sends the return command to the corresponding station workstation, such as Figure 8 shown.

[0061] The content of the control command and the return command has a unique token, which is used to track the entire process from the generation of the control command to the return of the return command.

[0062] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0063] Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.

[0064] The processing unit performs the various methods and processes described above, such as methods S101-S102, S201-S202. For example, in some embodiments, methods S101-S102, S201-S202 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of methods S101-S102, S201-S202 described above may be executed. Alternatively, in other embodiments, the CPU may be configured to execute methods S101-S102, S201-S202 by any other appropriate means (e.g., by means of firmware).

[0065] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0066] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0067] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0068] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for synchronizing data and control of a cascaded real-time system, characterized in that: The cascade real-time system includes a central server cluster, a station server cluster and a consistency service coordinator, and the target node for cross-cluster synchronization of the cascade real-time system is determined by the consistency service coordinator; The data synchronization method includes: The station server cluster master node obtains the status of the central server cluster master node from the consistency service coordinator, and uses the central server cluster master node as the target node to synchronize the real-time full data and change data; When the active node of the station server cluster obtains the message that the standby node of the central server cluster starts the connection, it actively synchronizes all data and changed data to the standby node of the central server cluster; The active node of the station server cluster synchronizes all data to the standby node of the station server cluster in real time; Control synchronization methods include: The control command comes from the control synchronization of the control center workstation: the central server cluster master node obtains the control command issued by the control center workstation and determines the station to which the control command belongs, and obtains the status of the corresponding station server cluster master node from the consistency service coordinator, and sends the control command to the selected station server cluster master node; after the station server cluster master node receives the control command issued by the central server cluster master node, it processes the synchronization control command and sends the control command to the remote target object device. After the remote target object device executes the control command, it feeds back the return command to the station server cluster master node that sent the control command according to the context; the station server cluster master node synchronizes the return command to the central server cluster master node, and the central server cluster master node sends the return command to the corresponding control center workstation; The control command comes from the control synchronization of the station workstation: the main node of the station server cluster receives and processes the control command issued by the station workstation, and sends the processed control command to the remote target object device. At the same time, the main node of the station server cluster receives and processes the return-to-school command from the remote target object device, and sends the return-to-school command to the corresponding station workstation.

2. The method for synchronizing data and control of a cascaded real-time system according to claim 1, characterized in that: The data and control synchronization method realizes network communication between the center and the station server cluster based on an autonomous and controllable real-time message bus. The real-time message bus supports object-oriented programming and uses reliable TCP / IP communication middleware.

3. The method for synchronizing data and control of a cascaded real-time system according to claim 2, characterized in that: The real-time message bus configuration data file is designed as a whole during system planning, and all clusters or workstations in the system use exactly the same bus configuration data file.

4. The method for synchronizing data and control of a cascaded real-time system according to claim 1, characterized in that: The consistency service coordinator is implemented based on the RAFT distributed consensus algorithm to ensure strong consistency of cluster data and credibility of global data status.

5. The method for synchronizing data and control of a cascaded real-time system according to claim 1, characterized in that: The station server cluster master node periodically synchronizes all data with the central server cluster master node, and synchronizes all data of the station server cluster periodically, wherein the duration of the synchronization period is customizable.

6. The method for synchronizing data and control of a cascaded real-time system according to claim 1, characterized in that: When the main node of the station server cluster synchronizes data with the main node of the central server cluster, and when the main node of the central server cluster synchronizes data with the backup node of the central server cluster, all data and changed data are synchronized strictly in time sequence to ensure the order of status data changes.

7. The method for synchronizing data and control of a cascaded real-time system according to claim 1, characterized in that: If the master node of the central server cluster fails to obtain the status of the master node of the station server cluster corresponding to the control command from the consistency service coordinator, the master node of the central server cluster directly feeds back the failed return-to-school information to the control center workstation and explains the cause of the occurrence.

8. The method for synchronizing data and control of a cascaded real-time system according to claim 1, characterized in that: In the control synchronization step where the control command originates from the control center workstation, if the station server cluster master node fails to send the control command to the remote target object device, the station server cluster master node directly feeds back the return command to the central server cluster master node, and the central server cluster master node sends the return command to the control center workstation.

9. The method for synchronizing data and control of a cascaded real-time system according to claim 1, characterized in that: The contents of the control command and the return-to-school command have a unique token identifier, which is used to track the entire process from the generation of the control command to the return of the return-to-school command.

10. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 9 is implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.