CN114051036A - Data synchronization method, device and equipment for rail transit signal system and storage medium - Google Patents

Data synchronization method, device and equipment for rail transit signal system and storage medium Download PDF

Info

Publication number
CN114051036A
CN114051036A CN202111117105.1A CN202111117105A CN114051036A CN 114051036 A CN114051036 A CN 114051036A CN 202111117105 A CN202111117105 A CN 202111117105A CN 114051036 A CN114051036 A CN 114051036A
Authority
CN
China
Prior art keywords
data
information
node
overall
data stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111117105.1A
Other languages
Chinese (zh)
Inventor
程远瑶
夏宏举
郭俊垚
李卓林
王紫成
张帅
孙凯迪
孙鹏远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CRSC Urban Rail Transit Technology Co Ltd
Original Assignee
CRSC Urban Rail Transit Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CRSC Urban Rail Transit Technology Co Ltd filed Critical CRSC Urban Rail Transit Technology Co Ltd
Priority to CN202111117105.1A priority Critical patent/CN114051036A/en
Publication of CN114051036A publication Critical patent/CN114051036A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1689Synchronisation and timing concerns
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention provides a data synchronization method, a device, equipment and a storage medium for a rail transit signal system, wherein the method comprises the following steps: under the condition that a first preset condition is met, the first node acquires state information of all station equipment and trains and generates all equipment state data; wherein the ensemble equipment state data includes ensemble information and a first ensemble information Identification (ID); writing the state data of all the devices into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for other nodes to carry out data synchronization; and updating a second overall information ID according to the first overall information ID, wherein the second overall information ID is used for recording the latest first overall information ID, so that data redundancy transmission is reduced, synchronous data is cached in a memory, and the real-time performance of data synchronization is ensured.

Description

Data synchronization method, device and equipment for rail transit signal system and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a data synchronization method, a data synchronization device, data synchronization equipment and a data synchronization storage medium for a rail transit signal system.
Background
In a rail transit signal system, data synchronization is needed between different station level nodes and between a main control center and a standby control center, and the rail transit signal control system has extremely high requirements on data synchronization such as reliability, instantaneity and the like. At present, a common data synchronization method among multiple nodes of a rail transit signal Control system is to synchronize data by connecting a Transmission Control Protocol (TCP) or an Internet Protocol (IP) with a Transmission private Protocol, and synchronize data among main and standby data centers by cold copy or cold switch.
With the development of signal system services, the data volume and data types between different nodes of a rail transit signal system are continuously increased, meanwhile, the requirements on the reliability and the real-time performance of the system are continuously improved, and the TCP/IP synchronization method based on the private protocol has the problems of data redundancy transmission, large network transmission pressure and the like.
Disclosure of Invention
The invention provides a data synchronization method, a data synchronization device, data synchronization equipment and a storage medium of a rail transit signal system, which are used for overcoming the defect of data redundancy transmission in the prior art, realizing real-time data synchronization and reducing the network transmission pressure in the data synchronization process.
The invention provides a data synchronization method of a rail transit signal system, which comprises the following steps:
under the condition that a first preset condition is met, the first node acquires state information of all station equipment and trains and generates all equipment state data; wherein the ensemble equipment state data includes ensemble information and a first ensemble information Identification (ID);
writing the state data of all the devices into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for other nodes to carry out data synchronization;
and updating a second overall information ID according to the first overall information ID, wherein the second overall information ID is used for recording the latest first overall information ID.
According to the data synchronization method for the rail transit signal system provided by the invention, the first preset condition comprises the following steps:
a first node receives all requests sent by other nodes; wherein the collective request is used to instruct the first node to update the collective device state data in the time series data stream;
or, when the first node is started, it is determined that the second ensemble information ID does not exist in the time-series data stream.
The data synchronization method of the rail transit signal system provided by the invention further comprises the following steps:
performing change detection on the basis of the cache data of the first node, and determining information to be synchronized on the basis of the result of the change detection;
and generating change data based on the information to be synchronized, and writing the change data into a time sequence data stream of the local memory of the first node, wherein the change data comprises change information and a change information ID.
The data synchronization method of the rail transit signal system provided by the invention further comprises the following steps:
responding to an overall cache data request sent by a standby machine of the first node, and packaging and sending overall data to the standby machine;
and performing change detection on the basis of the cache data of the first node, determining change cache information on the basis of the result of the change detection, and sending the change cache information to the standby machine.
The invention provides a data synchronization method of a rail transit signal system, which comprises the following steps:
under the condition that the first node is started or the failure is recovered, determining a time sequence data stream to be synchronized according to the synchronization configuration information; wherein the synchronization configuration information is used for indicating synchronization data of the first node;
determining whether a second whole information ID exists in the time sequence data stream to be synchronized;
when a second overall information ID exists in the time sequence data stream to be synchronized, the first node synchronizes overall equipment state data corresponding to the second overall information ID and change data behind the second overall information ID; alternatively, the first and second electrodes may be,
and when the second collective message ID does not exist in the time sequence data stream to be synchronized, the first node sends a collective request to a node corresponding to the time sequence data stream to be synchronized.
The data synchronization method of the rail transit signal system provided by the invention further comprises the following steps:
determining unconsumed data in the time sequence data stream to be synchronized according to the queue offset of the time sequence data stream to be synchronized;
synchronizing the unconsumed data.
The data synchronization method of the rail transit signal system provided by the invention further comprises the following steps:
responding to an overall cache data request sent by a standby machine of the first node, and packaging and sending overall data to the standby machine;
and performing change detection on the basis of the cache data of the first node, determining change cache information on the basis of the result of the change detection, and sending the change cache information to the standby machine.
The invention provides a data synchronization device of a rail transit signal system, which comprises:
the system comprises a whole equipment state data generation module, a first node and a second node, wherein the whole equipment state data generation module is used for acquiring state information of all station equipment and trains and generating whole equipment state data under the condition that a first preset condition is met; wherein the ensemble equipment state data includes ensemble information and a first ensemble information Identification (ID);
a data writing module, configured to write the whole device state data into a time sequence data stream of the local memory of the first node, where the time sequence data stream is used for performing data synchronization on other nodes;
and the ID updating module is used for updating a second overall information ID according to the first overall information ID, and the second overall information ID is used for recording the latest first overall information ID.
The invention provides a data synchronization device of a rail transit signal system, which comprises:
a module for determining a time sequence data stream to be synchronized, configured to determine the time sequence data stream to be synchronized according to synchronization configuration information when the first node is started or a failure is recovered; wherein the synchronization configuration information is used for indicating synchronization data of the first node;
the ID determining module is used for determining whether a second overall information ID exists in the time sequence data stream to be synchronized;
a data synchronization module, configured to synchronize, by the first node, overall device state data corresponding to a second overall information ID and change data subsequent to the second overall information ID when the second overall information ID exists in the to-be-synchronized time-series data stream; alternatively, the first and second electrodes may be,
and when the second collective message ID does not exist in the time sequence data stream to be synchronized, the first node sends a collective request to a node corresponding to the time sequence data stream to be synchronized.
The invention provides electronic equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the steps of the rail transit signal system data synchronization method when executing the program.
The invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the track traffic signal system data synchronization method.
The invention provides a computer program product comprising a computer program which, when being executed by a processor, carries out the steps of the method for data synchronization of a rail transit signal system.
According to the data synchronization method, device, equipment and storage medium of the rail transit signal system, data to be synchronized are stored in the time sequence data stream in the memory of the node for other nodes to synchronize, and under the condition that a first preset condition is met, all equipment state data are written in the time sequence data stream, so that data redundancy transmission is reduced, the synchronous data are cached in the memory, and the real-time performance of data synchronization is guaranteed.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a data synchronization method for a rail transit signal system according to the present invention;
fig. 2 is a schematic flow chart of a time-series data flow for writing change information into the local memory of the first node according to the present invention;
FIG. 3 is a second schematic flow chart of the data synchronization method for the rail transit signal system according to the present invention;
FIG. 4 is a schematic structural diagram of a data synchronization device of a rail transit signal system according to the present invention;
FIG. 5 is a second schematic structural diagram of a data synchronization device of a rail transit signal system according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a data synchronization method for a rail transit signal system according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step 100, under the condition that a first preset condition is met, the first node acquires state information of all station equipment and trains and generates all equipment state data; wherein the ensemble device state data includes ensemble information and a first ensemble information identification ID.
Optionally, in the track traffic signal system, each station may serve as a node, and the data center may also serve as a node, where data synchronization is performed between the nodes. The first node may be any one of the nodes in the rail transit signal system. It is understood that the first node may be a primary synchronizer of the data or a synchronized party of the data. In this embodiment, the first node, as a synchronized party of data, stores the data in a time sequence data stream of a local memory of the first node, so as to perform data synchronization on other nodes serving as a primary synchronizing party of the data.
And under the condition that a first preset condition is met, the first node acquires the state information of all the station equipment and the train and generates all the equipment state data. The global device status data includes global information and a first global information Identity (ID).
It should be noted that the generated overall device state data is written as one piece of data into a time sequence data stream of the local memory of the first node for being read by other nodes, and the time sequence data stream includes a plurality of pieces of data, and each piece of data is in a format of ID + Msg. It is understood that the first global information identity in the global device status data is ID and the global information in the global device status data is Msg. The Msg is specific data content and is formed by combining Key-value Key value pairs, the Key is a unique identifier of equipment or train attributes, and the value is a corresponding value of the Key.
Step 101, writing the whole device state data into a time sequence data stream of the local memory of the first node, wherein the time sequence data stream is used for other nodes to perform data synchronization.
Optionally, the IDs of the data in the time-series data stream are a sequence that increases with the data writing time, and the first overall information ID in the overall device status data needs to be generated based on the current maximum ID in the time-series data stream, for example, if the ID of the data in the time-series data stream is an arithmetic progression with 1 as a tolerance, and the ID of the currently written data is at most 100, then the ID of the overall device status data written at this time is 101, that is, the first overall information ID is 101.
And a step 102 of updating a second collective information ID for recording the latest first collective information ID based on the first collective information ID.
Alternatively, when synchronizing data in the time-series data stream of the first node, the other node cannot directly recognize that the data in the time-series data stream is the entire device status data, and therefore, when newly generating the entire device status data, it is necessary to record the ID of the data, that is, the first entire information ID, and update the second entire information ID based on the first entire information ID.
For example, if the first general information ID in the generated general device status data is 101, the second general information ID is updated to be 101.
When other nodes synchronize the data of the first node, whether second overall equipment state data exist in the time sequence data stream or not is searched, if not, the time sequence data stream is considered to have no overall equipment state data, at the moment, a message indicating the first node to update the overall equipment state data in the time sequence data stream is sent, and after the first node receives the message, the first node regenerates the overall equipment state data to be stored in the time sequence data stream and updates the second overall information ID.
According to the embodiment of the invention, the data to be synchronized is stored in the time sequence data stream in the memory of the node for other nodes to synchronize, and the state data of all equipment is written in the time sequence data stream under the condition that the first preset condition is met, so that the redundant transmission of the data is reduced, the synchronous data is cached in the memory, and the real-time property of data synchronization is ensured.
In one embodiment, the first preset condition includes:
a first node receives all requests sent by other nodes; wherein the collective request is used to instruct the first node to update the collective device state data in the time series data stream;
or, when the first node is started, it is determined that the second ensemble information ID does not exist in the time-series data stream.
Optionally, when the other nodes perform data synchronization on the first node as a master synchronization party of the data, when the state data of all the devices in the time-series data stream of the local memory of the first node cannot be acquired, the other nodes send all the messages to the first node, and when the first node receives all the messages, the first node acquires the state information of all the station devices and the train to generate the state data of all the devices. When the first node is activated, it is determined whether or not data having the same ID as a second general information ID exists in the time-series data stream, that is, whether or not the second general information ID exists in the time-series data stream, and when it is determined that the second general information ID does not exist in the time-series data stream, the first node acquires state information of the whole station equipment and the train, and generates the whole equipment state data.
In the embodiment of the invention, when the first node receives the overall request sent by other nodes or the first node is started and determines that the second overall information ID does not exist in the time sequence data stream, the first node acquires the state information of all station equipment and trains to generate the overall equipment state data, so that the data redundancy transmission is reduced, the synchronous data is cached in the memory, and the real-time property of data synchronization is ensured.
In one embodiment, the data synchronization method for the rail transit signal system further includes writing change information into a time series data stream of the local memory of the first node. Fig. 2 is a schematic flow chart of a time-series data flow for writing change information into the local memory of the first node according to an embodiment of the present invention, and as shown in fig. 2, the time-series data flow for writing change information into the local memory of the first node includes the following sub-steps:
200, performing change detection based on the cache data of the first node, and determining information to be synchronized based on the result of the change detection.
Step 201, generating change data based on the information to be synchronized, and writing the change data into a time sequence data stream of the local memory of the first node, where the change data includes change information and a change information ID.
Optionally, the time-series data stream of the local memory of the first node includes not only the state data of the whole device, but also the change data. The change data includes change information and a change information ID.
For example, the time-series data stream includes 4 pieces of data, the first piece of data is overall device status data, where the first overall information ID is 1, and the overall information includes status information a of device a, status information B of device B, status information C of device C, and status information D of device D; the second piece of data is change data, wherein the change ID of the second piece of data is 2, and the change information is change information delta a of the equipment A; the third piece of data is change data, wherein the change ID of the third piece of data is 3, and the change information is change information delta B of the equipment B; the fourth piece of data is change data, where the change ID of the fourth piece of data is 4, and the change information is change information Δ C of the device C.
The state information of the station equipment and the train stored in the cache data of the first node is subjected to change detection based on the cache data of the first node, so that the state change information of the station equipment and the train can be determined, and the information, namely the information to be synchronized, in the time sequence data stream stored in the memory of the first node is determined according to the change information. Generating change data based on information to be synchronized, and writing the change data into a time sequence data stream of the local memory of the first node, wherein the change information ID in the change data. The frequency of change detection of the first node can be configured according to requirements, so that the flexibility of data synchronization of the rail transit signal system is improved.
According to the embodiment of the invention, the first node determines the information to be synchronized through change detection, generates the change data based on the synchronization information, and stores the change data into the time sequence data stream, so that data redundancy transmission is reduced, the synchronization data is cached in the memory, and the real-time performance of data synchronization is ensured.
In one embodiment, the track traffic signal system data synchronization method further includes:
responding to an overall cache data request sent by a standby machine of the first node, and packaging and sending overall data to the standby machine;
and performing change detection on the basis of the cache data of the first node, determining change cache information on the basis of the result of the change detection, and sending the change cache information to the standby machine.
Optionally, the node cache adopts a redundancy backup mechanism, and when the slave node is started, a whole cache data request is sent to the host node. It can be understood that the first node is a master node, and the first node packages and sends all data to the standby machine after receiving an all-cache-data request sent by the standby machine, where the all data is all data of the first node, and includes queue data in a time-series data stream. And after receiving the whole data, the standby machine stores the change cache information.
In addition, the node cache adopts a mode of full synchronization and increment synchronization, and the increment synchronization process comprises the following steps: the first node performs change detection based on the cache data of the node, and determines change cache information based on a result of the change detection, for example, if the first node performs a write operation, the write operation generates change cache information, and sends the change cache information to the standby machine. And after receiving the change cache information, the standby machine stores the change cache information and updates the cache data of the standby machine.
According to the embodiment of the invention, the cache data is backed up in real time by adopting a mode of combining full synchronization with incremental synchronization between the main node and the slave node. When the slave node is started, carrying out full synchronization; after the full synchronization is finished, incremental synchronization is carried out, and the change cache information of the main node is synchronized into the slave nodes. And the reliability of data synchronization is ensured by adopting a main and standby redundancy mechanism.
Fig. 3 is a second flowchart of a data synchronization method for a rail transit signal system according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step 300, under the condition that the first node is started or the failure is recovered, determining a time sequence data stream to be synchronized according to the synchronization configuration information; wherein the synchronization configuration information is used for indicating synchronization data of the first node.
Optionally, the synchronization configuration information specifies information to be synchronized of the first node, that is, data information that needs to be synchronized when the first node is used as a primary synchronization party.
And when the first node is started or the failure is recovered, determining the time sequence data stream to be synchronized according to the synchronization configuration information.
Step 301, determining whether a second global information ID exists in the time sequence data stream to be synchronized.
Optionally, the second ensemble information ID is used to record the latest first ensemble information ID in the time-series data stream to be synchronized.
And the first node searches whether a second overall information ID exists in the time sequence data stream to be synchronized, and if the second overall information ID exists, overall equipment state data exists in the time sequence data stream to be synchronized.
Step 302, when a second global information ID exists in the time-series data stream to be synchronized, the first node synchronizes global device status data corresponding to the second global information ID and change data after the second global information ID; alternatively, the first and second electrodes may be,
and when the second collective message ID does not exist in the time sequence data stream to be synchronized, the first node sends a collective request to a node corresponding to the time sequence data stream to be synchronized.
Optionally, when there is a second global information ID in the time-series data stream to be synchronized, the current device status data may be determined according to the first node's global device status data corresponding to the second global information ID and the change data after the second global information ID, and therefore, the first node synchronizes the global device status data corresponding to the second global information ID and the change data after the second global information ID.
When the second overall message ID does not exist in the time-series data stream to be synchronized, the first node cannot perform data synchronization at this time, and therefore, an overall request for instructing the node corresponding to the time-series data stream to update the overall device state data in the time-series data stream is sent to the node corresponding to the time-series data stream to be synchronized. And after receiving the whole request, the nodes corresponding to the time sequence data stream to be synchronized generate whole state data and store the whole state data into the time sequence data stream to be synchronized so as to enable the first node to perform data synchronization.
In the embodiment of the present invention, when a first node is started or recovers from a failure, a time series data stream to be synchronized is determined according to synchronization configuration information, and when the second global message ID does not exist in the time series data stream to be synchronized, a global request is sent to a node corresponding to the time series data stream to be synchronized, and when the second global message ID exists in the time series data stream to be synchronized. And synchronizing the whole device state data corresponding to the second whole information ID and the changed data behind the second whole information ID reduces data redundant transmission, and the synchronous data is cached in a memory, so that the real-time performance of data synchronization is ensured.
In one embodiment, the track traffic signal system data synchronization method further includes:
determining unconsumed data in the time sequence data stream to be synchronized according to the queue offset of the time sequence data stream to be synchronized;
synchronizing the unconsumed data.
Optionally, when data in the time series data stream to be synchronized is newly added, the queue of the time series data stream may be shifted, the first node serves as a primary synchronization party, detects the queue shift of the time series data stream to be synchronized, determines newly added data, that is, unconsumed data, and synchronizes the unconsumed data.
According to the embodiment of the invention, the first node determines the unconsumed data according to the queue offset without synchronizing all data in the time sequence data stream, so that data redundancy transmission is reduced, the synchronous data is cached in the memory, and the real-time performance of data synchronization is ensured.
In one embodiment, the track traffic signal system data synchronization method further includes:
responding to an overall cache data request sent by a standby machine of the first node, and packaging and sending overall data to the standby machine;
and performing change detection on the basis of the cache data of the first node, determining change cache information on the basis of the result of the change detection, and sending the change cache information to the standby machine.
Optionally, the node cache adopts a redundancy backup mechanism, and when the slave node is started, a whole cache data request is sent to the host node. It can be understood that the first node is a master node, and the first node packages and sends all data to the standby machine after receiving an all-cache-data request sent by the standby machine, where the all data is all data of the first node, and includes queue data in a time-series data stream. And after receiving the whole data, the standby machine stores the change cache information.
In addition, the node cache adopts a mode of full synchronization and increment synchronization, and the increment synchronization process comprises the following steps: the first node performs change detection based on the cache data of the node, and determines change cache information based on a result of the change detection, for example, if the first node performs a write operation, the write operation generates change cache information, and sends the change cache information to the standby machine. And after receiving the change cache information, the standby machine stores the change cache information and updates the cache data of the standby machine.
According to the embodiment of the invention, the cache data is backed up in real time by adopting a mode of combining full synchronization with incremental synchronization between the main node and the slave node. When the slave node is started, carrying out full synchronization; after the full synchronization is finished, incremental synchronization is carried out, and the change cache information of the main node is synchronized into the slave nodes. And the reliability of data synchronization is ensured by adopting a main and standby redundancy mechanism.
The data synchronization device of the rail transit signal system provided by the invention is described below, and the data synchronization device of the rail transit signal system described below and the data synchronization method of the rail transit signal system described above can be referred to correspondingly.
Fig. 4 is a schematic structural diagram of a data synchronization apparatus of a rail transit signal system according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes an overall device status data generation module 410, a data writing module 420, and an ID updating module 430, wherein,
a total equipment state data generating module 410, configured to, when a first preset condition is met, obtain state information of all station equipment and trains by the first node, and generate total equipment state data; wherein the ensemble equipment state data includes ensemble information and a first ensemble information Identification (ID);
a data writing module 420, configured to write the entire device state data into a time sequence data stream of the local memory of the first node, where the time sequence data stream is used for performing data synchronization on other nodes;
an ID updating module 430, configured to update a second global information ID according to the first global information ID, where the second global information ID is used to record the latest first global information ID.
Optionally, the first preset condition includes:
a first node receives all requests sent by other nodes; wherein the collective request is used to instruct the first node to update the collective device state data in the time series data stream;
or, when the first node is started, it is determined that the second ensemble information ID does not exist in the time-series data stream.
Optionally, the data synchronization device of the rail transit signal system further includes a change information synchronization module, configured to:
performing change detection on the basis of the cache data of the first node, and determining information to be synchronized on the basis of the result of the change detection;
and generating change data based on the information to be synchronized, and writing the change data into a time sequence data stream of the local memory of the first node, wherein the change data comprises change information and a change information ID.
Optionally, the data synchronization device of the rail transit signal system further includes a backup module, configured to:
responding to an overall cache data request sent by a standby machine of the first node, and packaging and sending overall data to the standby machine;
and performing change detection on the basis of the cache data of the first node, determining change cache information on the basis of the result of the change detection, and sending the change cache information to the standby machine.
The data synchronization device of the rail transit signal system provided by the invention can realize each process realized by the method embodiments of fig. 1 to fig. 2, and achieve the same technical effect, and is not repeated here for avoiding repetition.
Fig. 5 is a second schematic structural diagram of a data synchronization apparatus of a rail transit signal system according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes a to-be-synchronized timing data stream determining module 510, an ID determining module 520, and a data synchronization module 530, wherein,
a to-be-synchronized timing data stream determining module 510, configured to determine, according to synchronization configuration information, a to-be-synchronized timing data stream when the first node is started or a failure is recovered; wherein the synchronization configuration information is used for indicating synchronization data of the first node;
an ID determining module 520, configured to determine whether a second global information ID exists in the to-be-synchronized time series data stream;
a data synchronization module 530, configured to, when a second global information ID exists in the to-be-synchronized time-series data stream, synchronize, by the first node, global device state data corresponding to the second global information ID and change data subsequent to the second global information ID; alternatively, the first and second electrodes may be,
and when the second collective message ID does not exist in the time sequence data stream to be synchronized, the first node sends a collective request to a node corresponding to the time sequence data stream to be synchronized.
Optionally, the track traffic signal system data synchronization device further includes an unconsumed data synchronization module, configured to:
determining unconsumed data in the time sequence data stream to be synchronized according to the queue offset of the time sequence data stream to be synchronized;
synchronizing the unconsumed data.
Optionally, the data synchronization device of the rail transit signal system further includes a backup module, configured to:
responding to an overall cache data request sent by a standby machine of the first node, and packaging and sending overall data to the standby machine;
and performing change detection on the basis of the cache data of the first node, determining change cache information on the basis of the result of the change detection, and sending the change cache information to the standby machine.
The data synchronization device of the rail transit signal system provided by the invention can realize each process realized by the method embodiment of fig. 3, and achieve the same technical effect, and is not repeated here for avoiding repetition.
Fig. 6 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 6: a processor (processor)610, a communication Interface (Communications Interface)620, a memory (memory)630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a method of track traffic signal system data synchronization, the method comprising:
under the condition that a first preset condition is met, the first node acquires state information of all station equipment and trains and generates all equipment state data; wherein the ensemble equipment state data includes ensemble information and a first ensemble information Identification (ID);
writing the state data of all the devices into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for other nodes to carry out data synchronization;
and updating a second overall information ID according to the first overall information ID, wherein the second overall information ID is used for recording the latest first overall information ID.
Alternatively, it comprises:
under the condition that the first node is started or the failure is recovered, determining a time sequence data stream to be synchronized according to the synchronization configuration information; wherein the synchronization configuration information is used for indicating synchronization data of the first node;
determining whether a second whole information ID exists in the time sequence data stream to be synchronized;
when a second overall information ID exists in the time sequence data stream to be synchronized, the first node synchronizes overall equipment state data corresponding to the second overall information ID and change data behind the second overall information ID; alternatively, the first and second electrodes may be,
and when the second collective message ID does not exist in the time sequence data stream to be synchronized, the first node sends a collective request to a node corresponding to the time sequence data stream to be synchronized.
In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to perform the track traffic signal system data synchronization method provided by the above methods, the method comprising:
under the condition that a first preset condition is met, the first node acquires state information of all station equipment and trains and generates all equipment state data; wherein the ensemble equipment state data includes ensemble information and a first ensemble information Identification (ID);
writing the state data of all the devices into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for other nodes to carry out data synchronization;
and updating a second overall information ID according to the first overall information ID, wherein the second overall information ID is used for recording the latest first overall information ID.
Alternatively, it comprises:
under the condition that the first node is started or the failure is recovered, determining a time sequence data stream to be synchronized according to the synchronization configuration information; wherein the synchronization configuration information is used for indicating synchronization data of the first node;
determining whether a second whole information ID exists in the time sequence data stream to be synchronized;
when a second overall information ID exists in the time sequence data stream to be synchronized, the first node synchronizes overall equipment state data corresponding to the second overall information ID and change data behind the second overall information ID; alternatively, the first and second electrodes may be,
and when the second collective message ID does not exist in the time sequence data stream to be synchronized, the first node sends a collective request to a node corresponding to the time sequence data stream to be synchronized.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the above-provided track traffic signal system data synchronization method, the method comprising:
under the condition that a first preset condition is met, the first node acquires state information of all station equipment and trains and generates all equipment state data; wherein the ensemble equipment state data includes ensemble information and a first ensemble information Identification (ID);
writing the state data of all the devices into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for other nodes to carry out data synchronization;
and updating a second overall information ID according to the first overall information ID, wherein the second overall information ID is used for recording the latest first overall information ID.
Alternatively, it comprises:
under the condition that the first node is started or the failure is recovered, determining a time sequence data stream to be synchronized according to the synchronization configuration information; wherein the synchronization configuration information is used for indicating synchronization data of the first node;
determining whether a second whole information ID exists in the time sequence data stream to be synchronized;
when a second overall information ID exists in the time sequence data stream to be synchronized, the first node synchronizes overall equipment state data corresponding to the second overall information ID and change data behind the second overall information ID; alternatively, the first and second electrodes may be,
and when the second collective message ID does not exist in the time sequence data stream to be synchronized, the first node sends a collective request to a node corresponding to the time sequence data stream to be synchronized.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A data synchronization method for a rail transit signal system is characterized by comprising the following steps:
under the condition that a first preset condition is met, the first node acquires state information of all station equipment and trains and generates all equipment state data; wherein the ensemble equipment state data includes ensemble information and a first ensemble information Identification (ID);
writing the state data of all the devices into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for other nodes to carry out data synchronization;
and updating a second overall information ID according to the first overall information ID, wherein the second overall information ID is used for recording the latest first overall information ID.
2. The rail transit signal system data synchronization method of claim 1, wherein the first preset condition comprises:
a first node receives all requests sent by other nodes; wherein the collective request is used to instruct the first node to update the collective device state data in the time series data stream;
or, when the first node is started, it is determined that the second ensemble information ID does not exist in the time-series data stream.
3. The rail transit signal system data synchronization method of claim 1, further comprising:
performing change detection on the basis of the cache data of the first node, and determining information to be synchronized on the basis of the result of the change detection;
and generating change data based on the information to be synchronized, and writing the change data into a time sequence data stream of the local memory of the first node, wherein the change data comprises change information and a change information ID.
4. The rail transit signal system data synchronization method of claim 1, further comprising:
responding to an overall cache data request sent by a standby machine of the first node, and packaging and sending overall data to the standby machine;
and performing change detection on the basis of the cache data of the first node, determining change cache information on the basis of the result of the change detection, and sending the change cache information to the standby machine.
5. A data synchronization method for a rail transit signal system is characterized by comprising the following steps:
under the condition that the first node is started or the failure is recovered, determining a time sequence data stream to be synchronized according to the synchronization configuration information; wherein the synchronization configuration information is used for indicating synchronization data of the first node;
determining whether a second whole information ID exists in the time sequence data stream to be synchronized;
when a second overall information ID exists in the time sequence data stream to be synchronized, the first node synchronizes overall equipment state data corresponding to the second overall information ID and change data behind the second overall information ID; alternatively, the first and second electrodes may be,
and when the second collective message ID does not exist in the time sequence data stream to be synchronized, the first node sends a collective request to a node corresponding to the time sequence data stream to be synchronized.
6. The rail transit signal system data synchronization method of claim 5, further comprising:
determining unconsumed data in the time sequence data stream to be synchronized according to the queue offset of the time sequence data stream to be synchronized;
synchronizing the unconsumed data.
7. The rail transit signal system data synchronization method of claim 5, further comprising:
responding to an overall cache data request sent by a standby machine of the first node, and packaging and sending overall data to the standby machine;
and performing change detection on the basis of the cache data of the first node, determining change cache information on the basis of the result of the change detection, and sending the change cache information to the standby machine.
8. A rail transit signal system data synchronizer, characterized by comprising:
the system comprises a whole equipment state data generation module, a first node and a second node, wherein the whole equipment state data generation module is used for acquiring state information of all station equipment and trains and generating whole equipment state data under the condition that a first preset condition is met; wherein the ensemble equipment state data includes ensemble information and a first ensemble information Identification (ID);
a data writing module, configured to write the whole device state data into a time sequence data stream of the local memory of the first node, where the time sequence data stream is used for performing data synchronization on other nodes;
and the ID updating module is used for updating a second overall information ID according to the first overall information ID, and the second overall information ID is used for recording the latest first overall information ID.
9. A rail transit signal system data synchronizer, characterized by comprising:
the system comprises a module for determining the time sequence data stream to be synchronized, which is used for determining the time sequence data stream to be synchronized according to the synchronization configuration information under the condition of starting or fault recovery of a first node; wherein the synchronization configuration information is used for indicating synchronization data of the first node;
the ID determining module is used for determining whether a second overall information ID exists in the time sequence data stream to be synchronized;
a data synchronization module, configured to synchronize, by the first node, overall device state data corresponding to a second overall information ID and change data subsequent to the second overall information ID when the second overall information ID exists in the to-be-synchronized time-series data stream; alternatively, the first and second electrodes may be,
and when the second collective message ID does not exist in the time sequence data stream to be synchronized, the first node sends a collective request to a node corresponding to the time sequence data stream to be synchronized.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor when executing the program implements the steps of the method for track traffic signal system data synchronization according to any of claims 1 to 4 or implements the steps of the method for track traffic signal system data synchronization according to any of claims 5 to 7.
11. A non-transitory computer readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the track traffic signal system data synchronization method according to one of claims 1 to 4 or the steps of the track traffic signal system data synchronization method according to one of claims 5 to 7.
CN202111117105.1A 2021-09-23 2021-09-23 Data synchronization method, device and equipment for rail transit signal system and storage medium Pending CN114051036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111117105.1A CN114051036A (en) 2021-09-23 2021-09-23 Data synchronization method, device and equipment for rail transit signal system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111117105.1A CN114051036A (en) 2021-09-23 2021-09-23 Data synchronization method, device and equipment for rail transit signal system and storage medium

Publications (1)

Publication Number Publication Date
CN114051036A true CN114051036A (en) 2022-02-15

Family

ID=80204647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111117105.1A Pending CN114051036A (en) 2021-09-23 2021-09-23 Data synchronization method, device and equipment for rail transit signal system and storage medium

Country Status (1)

Country Link
CN (1) CN114051036A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880404A (en) * 2022-07-13 2022-08-09 南瑞轨道交通技术有限公司 Group model quasi-delay synchronization method of rail transit distributed database

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005052769A1 (en) * 2003-11-28 2005-06-09 Matsushita Electric Industrial Co.,Ltd. Data processing device
CN109032837A (en) * 2018-06-15 2018-12-18 华为技术有限公司 The method and apparatus of data backup
CN109194720A (en) * 2018-08-15 2019-01-11 京信通信系统(中国)有限公司 Standby machine method of data synchronization, device and computer equipment
CN109246247A (en) * 2018-10-31 2019-01-18 广州市百果园信息技术有限公司 Address book synchronization method, device, computer storage medium and terminal
CN110866158A (en) * 2019-11-14 2020-03-06 北京沃东天骏信息技术有限公司 Information updating method, device, system, storage medium and electronic equipment
WO2020140661A1 (en) * 2019-01-04 2020-07-09 深圳壹账通智能科技有限公司 Data synchronization method and system
CN112118130A (en) * 2020-08-25 2020-12-22 通号城市轨道交通技术有限公司 Self-adaptive distributed cache master/standby state information switching method and device
CN112633740A (en) * 2020-12-30 2021-04-09 北京城市轨道交通咨询有限公司 Urban rail transit network safety evaluation method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005052769A1 (en) * 2003-11-28 2005-06-09 Matsushita Electric Industrial Co.,Ltd. Data processing device
CN109032837A (en) * 2018-06-15 2018-12-18 华为技术有限公司 The method and apparatus of data backup
CN109194720A (en) * 2018-08-15 2019-01-11 京信通信系统(中国)有限公司 Standby machine method of data synchronization, device and computer equipment
CN109246247A (en) * 2018-10-31 2019-01-18 广州市百果园信息技术有限公司 Address book synchronization method, device, computer storage medium and terminal
WO2020140661A1 (en) * 2019-01-04 2020-07-09 深圳壹账通智能科技有限公司 Data synchronization method and system
CN110866158A (en) * 2019-11-14 2020-03-06 北京沃东天骏信息技术有限公司 Information updating method, device, system, storage medium and electronic equipment
CN112118130A (en) * 2020-08-25 2020-12-22 通号城市轨道交通技术有限公司 Self-adaptive distributed cache master/standby state information switching method and device
CN112633740A (en) * 2020-12-30 2021-04-09 北京城市轨道交通咨询有限公司 Urban rail transit network safety evaluation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
汤石男;李冰;: "基于云平台的城市轨道交通综合监控系统方案", 城市轨道交通研究, no. 05, 10 May 2020 (2020-05-10) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880404A (en) * 2022-07-13 2022-08-09 南瑞轨道交通技术有限公司 Group model quasi-delay synchronization method of rail transit distributed database

Similar Documents

Publication Publication Date Title
US10834186B2 (en) Disaster recovery switchover method and system, and node
CN103077242B (en) The method of a kind of fulfillment database server two-node cluster hot backup
CN101809558B (en) System and method for remote asynchronous data replication
CN103530362B (en) A kind of computer data reading/writing method for many copies distributed system
US20180150501A1 (en) Database system, server device, computer program product, and information processing method
CN105574109A (en) Database synchronizing method and equipment and system
WO2016177231A1 (en) Dual-control-based active-backup switching method and device
CN112583512B (en) Time synchronization device and method
CN105407117A (en) Distributed data backup method, device and system
CN106802892A (en) For the method and apparatus of master/slave data consistency verification
CN112190924A (en) Data disaster tolerance method, device and computer readable medium
CN108228581B (en) Zookeeper compatible communication method, server and system
CN111190767B (en) Method and device for realizing LSDB (Low-pass-band database) master-slave synchronization in OSPF (open shortest Path first) protocol
CN112804332A (en) Message processing system, method, device, equipment and computer readable storage medium
CN114051036A (en) Data synchronization method, device and equipment for rail transit signal system and storage medium
CN104281631A (en) Distributed database system and data synchronization method and nodes thereof
CN113572561B (en) Method, apparatus, communication system and medium for clock synchronization
CN112929438B (en) Business processing method and device of double-site distributed database
CN112783694B (en) Long-distance disaster recovery method for high-availability Redis
CN107528703B (en) Method and equipment for managing node equipment in distributed system
CN111352959B (en) Data synchronous remedying and storing method and cluster device
CN106951443B (en) Method, equipment and system for synchronizing copies based on distributed system
CN112612851A (en) Multi-center data synchronization method and device
CN107404511B (en) Method and device for replacing servers in cluster
CN113515574B (en) Data synchronization method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination