[go: up one dir, main page]

CN114051036B - Rail transit signal system data synchronization method, device, equipment and storage medium - Google Patents

Rail transit signal system data synchronization method, device, equipment and storage medium Download PDF

Info

Publication number
CN114051036B
CN114051036B CN202111117105.1A CN202111117105A CN114051036B CN 114051036 B CN114051036 B CN 114051036B CN 202111117105 A CN202111117105 A CN 202111117105A CN 114051036 B CN114051036 B CN 114051036B
Authority
CN
China
Prior art keywords
data
information
node
data stream
synchronized
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.)
Active
Application number
CN202111117105.1A
Other languages
Chinese (zh)
Other versions
CN114051036A (en
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/CN114051036B/en
Publication of CN114051036A publication Critical patent/CN114051036A/en
Application granted granted Critical
Publication of CN114051036B publication Critical patent/CN114051036B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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 OR CALCULATING; 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

本发明提供一种轨道交通信号系统数据同步方法、装置、设备及存储介质,其中所述方法包括:在满足第一预设条件的情况下,所述第一节点获取全体车站设备和列车的状态信息,生成全体设备状态数据;其中,所述全体设备状态数据包括全体信息和第一全体信息身份标识ID;将所述全体设备状态数据写入所述第一节点本地内存的时序数据流中,所述时序数据流用于供其他节点进行数据同步;根据所述第一全体信息ID更新第二全体信息ID,所述第二全体信息ID用于记录最新的第一全体信息ID,减少了数据冗余传输,同步数据缓存在内存中,保证了数据同步的实时性。

The present invention provides a rail transit signal system data synchronization method, device, equipment and storage medium, wherein the method comprises: when a first preset condition is met, the first node obtains the status information of all station equipment and trains, and generates all equipment status data; wherein the all equipment status data includes all information and a first all information identity ID; the all equipment status data is written into a time series data stream in the local memory of the first node, and the time series data stream is used for data synchronization by other nodes; the second all information ID is updated according to the first all information ID, and the second all information ID is used to record the latest first all information ID, thereby reducing redundant data transmission, caching the synchronized data in the memory, and ensuring the real-time performance of data synchronization.

Description

Method, device, equipment and storage medium for synchronizing data of rail transit signal system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for synchronizing data in a rail transit signal system.
Background
In the rail traffic signal system, data synchronization is needed between nodes at different station levels and between the main control center and the standby control center, and the rail traffic signal control system has extremely high requirements on reliability, instantaneity and the like for data synchronization. The data synchronization method commonly used among the multiple nodes of the current track traffic signal control system is to synchronize data through a transmission control protocol (Transmission Control Protocol, TCP) or an internet protocol (Internet Protocol, IP) connected with a transmission private protocol, and synchronize data among the main data center and the standby data center in a cold copy or cold switching mode.
With the development of signal system business, the data volume and data types among different nodes of the track traffic signal system are continuously increased, and meanwhile, the requirements on the reliability and the real-time performance of the system are continuously improved, and the problems of redundant data transmission, high network transmission pressure and the like exist in the TCP/IP synchronization method based on the private protocol.
Disclosure of Invention
The invention provides a data synchronization method, device, equipment and storage medium of a rail transit signal system, which are used for solving the defect of redundant data transmission in the prior art, realizing real-time data synchronization and reducing 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 all equipment state data comprises all information and a first all information Identity (ID);
Writing the whole equipment state data into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for data synchronization of other nodes;
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 of the rail transit signal system provided by the invention, the first preset condition comprises:
The first node receives a whole request sent by other nodes, wherein the whole request is used for indicating the first node to update whole equipment state data in the time sequence data stream;
Or in case of the first node being started, determining 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 based on the cache data of the first node, and determining information to be synchronized based on 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 change information ID.
The data synchronization method of the rail transit signal system provided by the invention further comprises the following steps:
Responding to a whole cache data request sent by a standby machine of the first node, and packaging and sending whole data to the standby machine;
and performing change detection based on the cache data of the first node, determining change cache information based on 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:
determining a time sequence data stream to be synchronized according to synchronization configuration information under the condition that a first node is started or fails to recover, wherein the synchronization configuration information is used for indicating synchronization data of the first node;
determining whether a second overall information ID exists in the time sequence data stream to be synchronized;
in the case that a second global information ID exists in the time sequence data stream to be synchronized, the first node synchronizes the global equipment state data corresponding to the second global information ID and the change data after the second global information ID, or
And under the condition that the second whole message ID does not exist in the time sequence data stream to be synchronized, the first node sends a whole request to the 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;
And 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 a whole cache data request sent by a standby machine of the first node, and packaging and sending whole data to the standby machine;
and performing change detection based on the cache data of the first node, determining change cache information based on 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 traffic 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 whole station equipment and trains and generating whole equipment state data under the condition that a first preset condition is met, and the whole equipment state data comprises whole information and a first whole information Identity (ID);
The data writing module is used for writing the whole equipment 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 data synchronization of 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 traffic signal system, which comprises:
The system comprises a to-be-synchronized time sequence data stream determining module, a synchronization data stream determining module and a synchronization data stream determining module, wherein the to-be-synchronized time sequence data stream determining module is used for determining a to-be-synchronized time sequence data stream according to synchronization configuration information under the condition that the first node is started or fails to recover, and the synchronization configuration information is used for indicating synchronization data of the first node;
An ID determining module, configured to determine whether a second global information ID exists in the time-series data stream to be synchronized;
A data synchronization module for synchronizing, in the case where a second global information ID exists in the time-series data stream to be synchronized, global equipment status data corresponding to the second global information ID and change data after the second global information ID by the first node, or
And under the condition that the second whole message ID does not exist in the time sequence data stream to be synchronized, the first node sends a whole request to the node corresponding to the time sequence data stream to be synchronized.
The invention provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the data synchronization method of the rail transit signal system when executing the program.
The present invention provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the rail transit signal system data synchronization method.
The present invention provides a computer program product comprising a computer program which when executed by a processor implements the steps of the rail transit signal system data synchronization method.
According to the method, the device, the equipment and the storage medium for synchronizing the data of the rail transit signal system, the data to be synchronized is stored in the time sequence data stream in the node memory, so that other nodes can synchronize, and under the condition that the first preset condition is met, the state data of all equipment is written in the time sequence data stream, so that the data redundancy transmission is reduced, the synchronized data is cached in the memory, and the real-time performance of the data synchronization is ensured.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for synchronizing data of a rail transit signal system according to the present invention;
FIG. 2 is a flow chart of a time sequence data flow for writing change information into a local memory of the first node according to the present invention;
FIG. 3 is a second flowchart of a method for synchronizing data of a rail transit signal system according to the present invention;
Fig. 4 is a schematic structural diagram of a data synchronization device of a track traffic signal system provided by the invention;
FIG. 5 is a second schematic diagram of a data synchronization device of a track traffic signal system according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic flow chart of a data synchronization method of a track traffic signal system according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
And 100, under the condition that a first preset condition is met, the first node acquires state information of all the station equipment and trains and generates all the equipment state data, wherein the all the equipment state data comprises all the information and a first all the information Identity (ID).
Optionally, in the rail traffic signal system, each station may be a node, and the data center may also be a node, where data synchronization is performed between the nodes. The first node may be any node in a rail traffic signal system. It will be appreciated that the first node may be either the primary or the synchronized party to the data. In this embodiment, the first node as the synchronized party of the data stores the data into the time sequence data stream of the local memory of the first node, so that other nodes as the master synchronization party of the data can perform data synchronization.
And under the condition that the first preset condition is met, the first node acquires the state information of all the station equipment and trains and generates all the equipment state data. The corporate device status data includes corporate information and a first corporate information identity (Identity document, ID).
It should be noted that, the generated overall device state data is written as one piece of data into the time sequence data stream of the local memory of the first node for reading by other nodes, and the time sequence data stream contains a plurality of pieces of data, and each piece of data adopts a format of id+msg. It will be appreciated that the identity of the first global information in the global device state data is ID and the global information in the global device state data is Msg. Msg is specific data content, is formed by combining Key-value Key value pairs, and is a unique identifier of equipment or train attribute, and value is a corresponding value of the Key.
Step 101, writing the whole equipment state data into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for data synchronization of other nodes.
Optionally, the ID of the data in the time-series data stream is a sequence increasing with the writing time of the data, the first global information ID in the global device state data needs to be generated based on the current maximum ID in the time-series data stream, for example, the ID of the data in the time-series data stream is an arithmetic progression with a tolerance of 1, and the ID of the currently written data is 100 at the maximum, and then the ID of the global device state data written at this time is 101, that is, the first global information ID is 101.
Step 102, 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, since other nodes cannot directly recognize that data in the time-series data stream is the overall device state data when synchronizing the data in the time-series data stream of the first node, it is necessary to record the ID of the data, that is, the first overall information ID, and update the second overall information ID based on the first overall information ID when newly generating the overall device state data.
For example, if the first overall information ID in the overall device status data is 101, the second overall information ID is updated to 101.
When other nodes synchronize the data of the first node, the other nodes find whether the second global information ID exists in the time sequence data stream, if not, the first node sends a message indicating that the first node updates the global equipment state data in the time sequence data stream, and after receiving the message, the first node regenerates the global equipment state data and stores the generated global equipment state data in the time sequence data stream, and updates the second global information ID.
According to the embodiment of the invention, the data to be synchronized is stored in the time sequence data stream in the node memory for other nodes to synchronize, and the whole equipment state data is written in the time sequence data stream under the condition that the first preset condition is met, so that the data redundancy transmission is reduced, the synchronized data is cached in the memory, and the real-time performance of the data synchronization is ensured.
In one embodiment, the first preset condition includes:
The first node receives a whole request sent by other nodes, wherein the whole request is used for indicating the first node to update whole equipment state data in the time sequence data stream;
Or in case of the first node being started, determining that the second ensemble information ID does not exist in the time-series data stream.
Optionally, when the other nodes act as a master synchronization party of the data to synchronize the data of the first node, when the total equipment state data in the time sequence data stream of the local memory of the first node cannot be acquired, the total information is sent to the first node, and when the total information is received by the first node, the first node acquires the state information of the total station equipment and the train and generates the total equipment state data. In addition, when the first node is started, it is determined whether or not there is data having the same ID as the second overall information ID in the time-series data stream, that is, whether or not there is the second overall information ID in the time-series data stream, and when it is determined that there is no second overall information ID in the time-series data stream, the first node acquires the status information of all the station equipment and trains, and generates overall equipment status data.
In the embodiment of the invention, when the first node receives the whole requests sent by other nodes or the first node is started, and the second whole information ID does not exist in the time sequence data stream, the first node acquires the state information of the whole station equipment and the train and generates the whole equipment state data, thereby reducing the data redundancy transmission, buffering the synchronous data in the memory and ensuring the real-time performance of the data synchronization.
In one embodiment, the method for synchronizing data of the track traffic signal system further includes writing the change information into a time sequence data stream of the local memory of the first node. Fig. 2 is a schematic flow chart of a time sequence data stream for writing change information into the local memory of the first node according to an embodiment of the present invention, as shown in fig. 2, the time sequence data stream for writing change information into the local memory of the first node includes the following sub-steps:
And 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, wherein the change data comprises change information and change information ID.
Optionally, the time sequence data stream of the local memory of the first node includes not only the whole equipment state data but also the change data. The change data includes change information and change information ID.
For example, the time sequence data stream includes 4 pieces of data, a first piece of data is overall device state data, wherein the first overall information ID is 1, the overall information includes state information a of device A, state information B of device B, state information C of device C, and state information D of device D, a second piece of data is change data, wherein the change ID of the second piece of data is 2, the change information is change information Δa of device A, a third piece of data is change data, wherein the change ID of the third piece of data is 3, the change information is change information Δb of device B, and a fourth piece of data is change data, wherein the change ID of the fourth piece of data is 4, and the change information is change information Δc of device C.
The state information of the station equipment and the train is stored in the cache data of the first node, the state change information of the station equipment and the train can be determined based on the change detection of the cache data of the first node, and the information in the time sequence data stream which needs to be stored in the memory of the first node, namely the information to be synchronized, is determined according to the change information. And generating change data based on the information to be synchronized, writing the change data into a time sequence data stream of the local memory of the first node, and changing the change information ID in the change data. The frequency of the change detection of the first node can be configured according to requirements, so that the flexibility of the data synchronization of the rail traffic signal system is improved.
According to the embodiment of the invention, the first node determines the information to be synchronized through the change detection, generates the change data based on the synchronization information, and stores the change data into the time sequence data stream, so that the redundant transmission of data 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 a whole cache data request sent by a standby machine of the first node, and packaging and sending whole data to the standby machine;
and performing change detection based on the cache data of the first node, determining change cache information based on the result of the change detection, and sending the change cache information to the standby machine.
Optionally, the node cache adopts a redundant backup mechanism, and when the slave node starts, a whole cache data request is sent to the host node. It can be understood that the first node is a master node, and after receiving a total cache data request sent by the standby machine, the first node packages and sends the total data to the standby machine, wherein the total data is all data of the first node, and includes queue data in a time sequence data stream. And after the standby machine receives the whole data, the standby machine stores the change cache information.
In addition, the node cache adopts a mode of full synchronization and incremental synchronization, and the incremental synchronization process comprises the steps that a first node performs change detection based on cache data of the node, and determines change cache information based on a result of the change detection, for example, the first node performs write operation, the write operation generates change cache information, and the change cache information is sent to the standby machine. And after the standby machine receives the change cache information, the change cache information is stored and updated to cache data of the standby machine.
In 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 master node and the slave node. And after the full-volume synchronization is finished, performing incremental synchronization, and synchronizing the change cache information of the master node into the slave node. And a main and standby redundancy mechanism is adopted to ensure the reliability of data synchronization.
Fig. 3 is a second flowchart of a data synchronization method of a track traffic signal system according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
And 300, determining a time sequence data stream to be synchronized according to synchronization configuration information under the condition that a first node is started or fails to recover, 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 the primary synchronization party.
And when the first node is started or fails to recover, 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 global information ID is used to record the latest first global information ID in the time-series data stream to be synchronized.
The first node searches whether the second whole information ID exists in the time sequence data stream to be synchronized, and if the second whole information ID exists, the first node searches whether the second whole information ID exists in the time sequence data stream to be synchronized.
Step 302, in the case that there is a second global information ID in the time-series data stream to be synchronized, the first node synchronizes global device state data corresponding to the second global information ID and change data after the second global information ID, or
And under the condition that the second whole message ID does not exist in the time sequence data stream to be synchronized, the first node sends a whole request to the node corresponding to the time sequence data stream to be synchronized.
Optionally, in the case that the second global information ID exists in the time-series data stream to be synchronized, the current device state data may be determined according to the global device state data corresponding to the second global information ID and the change data after the second global information ID by the first node, so that the first node synchronizes the global device state data corresponding to the second global information ID and the change data after the second global information ID.
When the second total message ID does not exist in the time sequence data stream to be synchronized, the first node cannot perform data synchronization at this time, and therefore, a total request is sent to the node corresponding to the time sequence data stream to be synchronized, where the total request is used to instruct the node corresponding to the time sequence data stream to update the total device state data in the time sequence data stream. And after receiving the total request, the node corresponding to the time sequence data stream to be synchronized generates total state data and stores the total 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 invention, under the condition that the first node is started or fails to recover, the time sequence data stream to be synchronized is determined according to the synchronization configuration information, and a whole request is sent to the node corresponding to the time sequence data stream to be synchronized under the condition that the second whole information ID does not exist in the time sequence data stream to be synchronized, and under the condition that the second whole information ID exists in the time sequence data stream to be synchronized. And synchronizing the whole equipment state data corresponding to the second whole information ID and the change data after the second whole information ID, so that the data redundancy transmission is reduced, and the synchronous data is cached in the memory, thereby ensuring the real-time performance of data synchronization.
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;
And synchronizing the unconsumed data.
Optionally, when there is a new increase in data in the time-series data stream to be synchronized, the queue of the time-series data stream will shift, and the first node serves as a master synchronization party to detect the shift of the queue of the time-series data stream to be synchronized, determine the newly increased data, i.e. the unconsumed data, and synchronize the unconsumed data.
According to the embodiment of the invention, the first node determines the unconsumed data according to the queue offset, and does not need to synchronize all data in the time sequence data stream, so that redundant data transmission is reduced, 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 a whole cache data request sent by a standby machine of the first node, and packaging and sending whole data to the standby machine;
and performing change detection based on the cache data of the first node, determining change cache information based on the result of the change detection, and sending the change cache information to the standby machine.
Optionally, the node cache adopts a redundant backup mechanism, and when the slave node starts, a whole cache data request is sent to the host node. It can be understood that the first node is a master node, and after receiving a total cache data request sent by the standby machine, the first node packages and sends the total data to the standby machine, wherein the total data is all data of the first node, and includes queue data in a time sequence data stream. And after the standby machine receives the whole data, the standby machine stores the change cache information.
In addition, the node cache adopts a mode of full synchronization and incremental synchronization, and the incremental synchronization process comprises the steps that a first node performs change detection based on cache data of the node, and determines change cache information based on a result of the change detection, for example, the first node performs write operation, the write operation generates change cache information, and the change cache information is sent to the standby machine. And after the standby machine receives the change cache information, the change cache information is stored and updated to cache data of the standby machine.
In 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 master node and the slave node. And after the full-volume synchronization is finished, performing incremental synchronization, and synchronizing the change cache information of the master node into the slave node. And a main and standby redundancy mechanism is adopted to ensure the reliability of data synchronization.
The track traffic signal system data synchronization device provided by the invention is described below, and the track traffic signal system data synchronization device described below and the track traffic signal system data synchronization method described above can be correspondingly referred to each other.
Fig. 4 is a schematic structural diagram of a data synchronization device of a rail transit signal system according to an embodiment of the present invention, and as shown in fig. 4, the device includes a global device status data generating module 410, a data writing module 420 and an ID updating module 430, wherein,
The overall equipment state data generating module 410 is configured to, when a first preset condition is met, obtain state information of overall station equipment and trains by the first node, and generate overall equipment state data, where the overall equipment state data includes overall information and a first overall information identity ID;
a data writing module 420, configured to write the overall device state data into a time-series data stream of the local memory of the first node, where the time-series data stream is used for data synchronization by other nodes;
the ID updating module 430 is 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:
The first node receives a whole request sent by other nodes, wherein the whole request is used for indicating the first node to update whole equipment state data in the time sequence data stream;
Or in case of the first node being started, determining that the second ensemble information ID does not exist in the time-series data stream.
Optionally, the data synchronization device of the rail traffic signal system further comprises a change information synchronization module, configured to:
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;
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 change information ID.
Optionally, the data synchronization device of the rail traffic signal system further comprises a backup module, configured to:
Responding to a whole cache data request sent by a standby machine of the first node, and packaging and sending whole data to the standby machine;
and performing change detection based on the cache data of the first node, determining change cache information based on 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 2 and achieve the same technical effects, and in order to avoid repetition, the description is omitted here.
Fig. 5 is a second schematic structural diagram of a data synchronization device of a track traffic signal system according to an embodiment of the present invention, as shown in fig. 5, the device includes a timing data stream determining module 510 to be synchronized, an ID determining module 520, and a data synchronizing module 530, where,
A to-be-synchronized time-series data stream determining module 510, configured to determine a to-be-synchronized time-series data stream according to synchronization configuration information when a first node is started or fails to recover, where the synchronization configuration information is used to indicate synchronization data of the first node;
An ID determining module 520, configured to determine whether a second global information ID exists in the time-series data stream to be synchronized;
A data synchronization module 530 for synchronizing, in the case where a second global information ID exists in the time-series data stream to be synchronized, global device state data corresponding to the second global information ID and change data after the second global information ID, or
And under the condition that the second whole message ID does not exist in the time sequence data stream to be synchronized, the first node sends a whole request to the node corresponding to the time sequence data stream to be synchronized.
Optionally, the data synchronization device of the rail traffic signal system further comprises 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;
And synchronizing the unconsumed data.
Optionally, the data synchronization device of the rail traffic signal system further comprises a backup module, configured to:
Responding to a whole cache data request sent by a standby machine of the first node, and packaging and sending whole data to the standby machine;
and performing change detection based on the cache data of the first node, determining change cache information based on 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 in order to avoid repetition, the description is omitted here.
Fig. 6 illustrates a physical schematic diagram of an electronic device, which may include a processor 610, a communication interface Communications Interface, a memory 630, and a communication bus 640, as shown in fig. 6, where 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 rail transit signal system data synchronization 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 all equipment state data comprises all information and a first all information Identity (ID);
Writing the whole equipment state data into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for data synchronization of other nodes;
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.
Or comprises:
determining a time sequence data stream to be synchronized according to synchronization configuration information under the condition that a first node is started or fails to recover, wherein the synchronization configuration information is used for indicating synchronization data of the first node;
determining whether a second overall information ID exists in the time sequence data stream to be synchronized;
in the case that a second global information ID exists in the time sequence data stream to be synchronized, the first node synchronizes the global equipment state data corresponding to the second global information ID and the change data after the second global information ID, or
And under the condition that the second whole message ID does not exist in the time sequence data stream to be synchronized, the first node sends a whole request to the node corresponding to the time sequence data stream to be synchronized.
Further, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or 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 a method of synchronizing rail transit signal system data 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 all equipment state data comprises all information and a first all information Identity (ID);
Writing the whole equipment state data into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for data synchronization of other nodes;
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.
Or comprises:
determining a time sequence data stream to be synchronized according to synchronization configuration information under the condition that a first node is started or fails to recover, wherein the synchronization configuration information is used for indicating synchronization data of the first node;
determining whether a second overall information ID exists in the time sequence data stream to be synchronized;
in the case that a second global information ID exists in the time sequence data stream to be synchronized, the first node synchronizes the global equipment state data corresponding to the second global information ID and the change data after the second global information ID, or
And under the condition that the second whole message ID does not exist in the time sequence data stream to be synchronized, the first node sends a whole request to the 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 having stored thereon a computer program which, when executed by a processor, is implemented to perform the above-provided rail traffic signal system data synchronization 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 all equipment state data comprises all information and a first all information Identity (ID);
Writing the whole equipment state data into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for data synchronization of other nodes;
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.
Or comprises:
determining a time sequence data stream to be synchronized according to synchronization configuration information under the condition that a first node is started or fails to recover, wherein the synchronization configuration information is used for indicating synchronization data of the first node;
determining whether a second overall information ID exists in the time sequence data stream to be synchronized;
in the case that a second global information ID exists in the time sequence data stream to be synchronized, the first node synchronizes the global equipment state data corresponding to the second global information ID and the change data after the second global information ID, or
And under the condition that the second whole message ID does not exist in the time sequence data stream to be synchronized, the first node sends a whole request to the node corresponding to the time sequence data stream to be synchronized.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention, and not for limiting the same, and although the present invention has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present invention.

Claims (9)

1. A method for synchronizing data of a rail transit signal system, comprising:
under the condition that a first preset condition is met, a first node acquires state information of all station equipment and trains and generates all equipment state data, wherein the all equipment state data comprises all information and a first all information Identity (ID);
Writing the whole equipment state data into a time sequence data stream of a local memory of the first node, wherein the time sequence data stream is used for data synchronization of other nodes;
Updating 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, and when other nodes synchronize the data of the first node, it is searched whether the second global information ID exists in the time-series data stream, if not, it is considered that there is no global device state data in the time-series data stream, at this time, a message indicating that the first node updates the global device state data in the time-series data stream is sent, and after receiving the message, the first node regenerates a global device state data and stores the global device state data in the time-series data stream, and updates the second global information ID;
Further comprises:
Responding to a whole cache data request sent by a standby machine of the first node, and packaging and sending whole data to the standby machine;
and performing change detection based on the cache data of the first node, determining change cache information based on the result of the change detection, and sending the change cache information to the standby machine.
2. The method for synchronizing data of a rail transit signal system according to claim 1, wherein the first preset condition comprises:
The first node receives a whole request sent by other nodes, wherein the whole request is used for indicating the first node to update whole equipment state data in the time sequence data stream;
Or in case of the first node being started, determining that the second ensemble information ID does not exist in the time-series data stream.
3. The method for synchronizing data of a rail transit signal system of claim 1, further comprising:
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;
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 change information ID.
4. A method for synchronizing data of a rail transit signal system, comprising:
determining a time sequence data stream to be synchronized according to synchronization configuration information under the condition that a first node is started or fails to recover, wherein the synchronization configuration information is used for indicating synchronization data of the first node;
Determining whether a second overall information ID exists in the time sequence data stream to be synchronized or not, wherein the second overall information ID is used for recording the latest first overall information ID in the time sequence data stream to be synchronized;
In the case that a second global information ID exists in the time sequence data stream to be synchronized, the first node synchronizes the global equipment state data corresponding to the second global information ID and the change data after the second global information ID, or
When the second total information ID does not exist in the time sequence data stream to be synchronized, the first node cannot perform data synchronization at this time, so that a total request is sent to a node corresponding to the time sequence data stream to be synchronized, the total request is used for indicating the node corresponding to the time sequence data stream to be synchronized to update total equipment state data in the time sequence data stream, and the node corresponding to the time sequence data stream to be synchronized generates total state data after receiving the total request and stores the total state data in the time sequence data stream to be synchronized for the first node to perform data synchronization;
Further comprises:
Responding to a whole cache data request sent by a standby machine of the first node, and packaging and sending whole data to the standby machine;
and performing change detection based on the cache data of the first node, determining change cache information based on the result of the change detection, and sending the change cache information to the standby machine.
5. The method for synchronizing data of a rail transit signal system of claim 4, 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;
And synchronizing the unconsumed data.
6. A track traffic signal system data synchronization device, 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 whole station equipment and trains and generating whole equipment state data under the condition that a first preset condition is met, and the whole equipment state data comprises whole information and a first whole information Identity (ID);
The data writing module is used for writing the whole equipment 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 data synchronization of other nodes;
An ID updating module, 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, and when other nodes synchronize data of the first node, it is searched whether the second global information ID exists in the time-series data stream, if not, it is considered that there is no global device state data in the time-series data stream, at this time, a message indicating that the first node updates the global device state data in the time-series data stream is sent, and after receiving the message, the first node regenerates global device state data, stores the global device state data in the time-series data stream, and updates the second global information ID;
Further comprises:
Responding to a whole cache data request sent by a standby machine of the first node, and packaging and sending whole data to the standby machine;
and performing change detection based on the cache data of the first node, determining change cache information based on the result of the change detection, and sending the change cache information to the standby machine.
7. A track traffic signal system data synchronization device, comprising:
The system comprises a to-be-synchronized time sequence data stream determining module, a synchronization data stream determining module and a synchronization data stream determining module, wherein the to-be-synchronized time sequence data stream determining module is used for determining a to-be-synchronized time sequence data stream according to synchronization configuration information under the condition that a first node is started or fails to recover, and the synchronization configuration information is used for indicating synchronization data of the first node;
An ID determining module, configured to determine whether a second global information ID exists in the time-series data stream to be synchronized, where the second global information ID is used to record a latest first global information ID in the time-series data stream to be synchronized;
A data synchronization module for synchronizing, in the case where a second global information ID exists in the time-series data stream to be synchronized, global equipment status data corresponding to the second global information ID and change data after the second global information ID by the first node, or
When the second total information ID does not exist in the time sequence data stream to be synchronized, the first node cannot perform data synchronization at this time, so that a total request is sent to a node corresponding to the time sequence data stream to be synchronized, the total request is used for indicating the node corresponding to the time sequence data stream to be synchronized to update total equipment state data in the time sequence data stream, and the node corresponding to the time sequence data stream to be synchronized generates total state data after receiving the total request and stores the total state data in the time sequence data stream to be synchronized for the first node to perform data synchronization;
Further comprises:
Responding to a whole cache data request sent by a standby machine of the first node, and packaging and sending whole data to the standby machine;
and performing change detection based on the cache data of the first node, determining change cache information based on the result of the change detection, and sending the change cache information to the standby machine.
8. 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 rail transit signal system data synchronization method of any one of claims 1 to 3 or the steps of the rail transit signal system data synchronization method of any one of claims 4 or 5.
9. A non-transitory computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor realizes the steps of the rail transit signal system data synchronization method of any one of claims 1 to 3 or the steps of the rail transit signal system data synchronization method of any one of claims 4 or 5.
CN202111117105.1A 2021-09-23 2021-09-23 Rail transit signal system data synchronization method, device, equipment and storage medium Active CN114051036B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN114051036A CN114051036A (en) 2022-02-15
CN114051036B true CN114051036B (en) 2024-12-13

Family

ID=80204647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111117105.1A Active CN114051036B (en) 2021-09-23 2021-09-23 Rail transit signal system data synchronization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114051036B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114706885A (en) * 2022-03-08 2022-07-05 通号城市轨道交通技术有限公司 Information synchronization method and device, electronic equipment and storage medium
CN114880404A (en) * 2022-07-13 2022-08-09 南瑞轨道交通技术有限公司 Group model quasi-delay synchronization method of rail transit distributed database

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246247A (en) * 2018-10-31 2019-01-18 广州市百果园信息技术有限公司 Address book synchronization method, device, computer storage medium and terminal

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6928526B1 (en) * 2002-12-20 2005-08-09 Datadomain, Inc. Efficient data storage system
KR101037006B1 (en) * 2003-11-28 2011-05-25 파나소닉 주식회사 Data processing device
KR100622621B1 (en) * 2004-10-08 2006-09-19 (주)제너시스템즈 Method and system for synchronizing configuration data between main system and sub-system in dual IP communication system in operation-standby mode
CN100463444C (en) * 2005-07-20 2009-02-18 中兴通讯股份有限公司 Method for main and spare synchronization of call data
CN106815329A (en) * 2016-12-29 2017-06-09 网易无尾熊(杭州)科技有限公司 A kind of data cached update method and device
CN109032837A (en) * 2018-06-15 2018-12-18 华为技术有限公司 The method and apparatus of data backup
CN109359222B (en) * 2018-08-06 2021-07-06 杭州复杂美科技有限公司 Data storage method and system, equipment and storage medium
CN109194720A (en) * 2018-08-15 2019-01-11 京信通信系统(中国)有限公司 Standby machine method of data synchronization, device and computer equipment
CN109788053B (en) * 2019-01-04 2022-04-29 深圳壹账通智能科技有限公司 Data synchronization method and system
CN112350946B (en) * 2019-08-08 2024-04-16 华为技术有限公司 Data caching method and device
CN110866158B (en) * 2019-11-14 2021-01-26 北京沃东天骏信息技术有限公司 Information updating method, device, system, storage medium and electronic equipment
CN112118130B (en) * 2020-08-25 2023-07-21 通号城市轨道交通技术有限公司 Self-adaptive distributed cache active-standby state information switching method and device
CN112633740B (en) * 2020-12-30 2024-04-26 北京城市轨道交通咨询有限公司 Urban rail transit network safety evaluation method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246247A (en) * 2018-10-31 2019-01-18 广州市百果园信息技术有限公司 Address book synchronization method, device, computer storage medium and terminal

Also Published As

Publication number Publication date
CN114051036A (en) 2022-02-15

Similar Documents

Publication Publication Date Title
CN115486052B (en) Data storage method, system and storage medium
JP6745884B2 (en) Data synchronization method, device and system
CN102142008B (en) Method and system for implementing distributed memory database, token controller and memory database
CN103077242B (en) The method of a kind of fulfillment database server two-node cluster hot backup
US9934242B2 (en) Replication of data between mirrored data sites
CN112804332B (en) Message processing system, method, device, equipment and computer readable storage medium
US20180150501A1 (en) Database system, server device, computer program product, and information processing method
CN103530362B (en) A kind of computer data reading/writing method for many copies distributed system
EP2378718A1 (en) Method, node and system for controlling version in distributed system
CN111291008B (en) Data processing method, device, system, electronic equipment and computer storage medium
WO2018014650A1 (en) Distributed database data synchronisation method, related apparatus and system
CN106911728A (en) The choosing method and device of host node in distributed system
CN109976941B (en) A data recovery method and device
CN114051036B (en) Rail transit signal system data synchronization method, device, equipment and storage medium
CN111190767B (en) Method and device for realizing LSDB (Low-pass-band database) master-slave synchronization in OSPF (open shortest Path first) protocol
CN105338078A (en) Data storage method and device used for storing system
CN113190620B (en) Method, device, equipment and storage medium for synchronizing data between Redis clusters
CN111460029A (en) Data synchronization method and device
CN112749123A (en) Method, apparatus and computer program product for managing a file system
CN106873902B (en) File storage system, data scheduling method and data node
CN113515574B (en) Data synchronization method and device
WO2019109257A1 (en) Log management method, server and database system
CN112783694B (en) Long-distance disaster recovery method for high-availability Redis
CN112988880A (en) Data synchronization method and device, electronic equipment and computer storage medium
CN107528703B (en) Method and equipment for managing node equipment in distributed system

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
GR01 Patent grant
GR01 Patent grant