CN114579665A - Multi-cloud multi-activity data synchronization method and related equipment - Google Patents

Multi-cloud multi-activity data synchronization method and related equipment Download PDF

Info

Publication number
CN114579665A
CN114579665A CN202210197468.9A CN202210197468A CN114579665A CN 114579665 A CN114579665 A CN 114579665A CN 202210197468 A CN202210197468 A CN 202210197468A CN 114579665 A CN114579665 A CN 114579665A
Authority
CN
China
Prior art keywords
data
user change
target cloud
cloud
site
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
CN202210197468.9A
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.)
SHENZHEN SECURITIES INFORMATION CO Ltd
Original Assignee
SHENZHEN SECURITIES INFORMATION 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 SHENZHEN SECURITIES INFORMATION CO Ltd filed Critical SHENZHEN SECURITIES INFORMATION CO Ltd
Priority to CN202210197468.9A priority Critical patent/CN114579665A/en
Publication of CN114579665A publication Critical patent/CN114579665A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The embodiment of the application discloses a multi-cloud multi-activity data synchronization method, a data synchronization platform and a computer-storable medium, which are used for synchronizing data, so that when an irresistible fault occurs in a target cloud site, the data synchronization platform of the target cloud site can switch the access of a user to the target cloud site into the access to other sites. The method of the embodiment of the application comprises the following steps: after receiving the user change data, a data synchronization platform of the target cloud site judges whether the user change data is data generated by the target cloud site or data generated by other cloud sites except the target cloud site, the target cloud site is any one of the cloud sites, if the user change data is data generated by the target cloud site, the data synchronization platform of the target cloud site synchronizes the user change data to the other cloud sites, and when a switching trigger condition is met, the data synchronization platform of the target cloud site switches the access of the user to the target cloud site to the access of the other cloud sites except the target cloud site.

Description

Multi-cloud multi-activity data synchronization method and related equipment
Technical Field
The embodiment of the application relates to the field of data synchronization, in particular to a multi-cloud multi-activity data synchronization method, a data synchronization platform and a computer-readable storage medium.
Background
The existing stock quotation system is a multi-activity distributed system, a data synchronization platform of a target cloud site can achieve access of a user to the target cloud site, can receive user change data generated by the target cloud site, can synchronize the user change data to other cloud sites except the target cloud site, and when the target cloud site has an irresistible fault, the other cloud sites can be switched to the target cloud site, so that the user can continue to access the target cloud site.
However, switching is a combination of a series of strict operations, which requires a lot of manpower and material resources, the switching time is long, the waiting time of the user is long, and the user experience is affected to a certain extent. Therefore, a data synchronization method capable of solving the above problems is urgently needed.
Disclosure of Invention
The embodiment of the application provides a multi-cloud multi-activity data synchronization method, a data synchronization platform and a computer readable storage medium, which can synchronize data.
In a first aspect, an embodiment of the present application provides a multi-cloud and multi-live data synchronization method, including:
after receiving user change data, a data synchronization platform of the target cloud site judges whether the user change data is data generated by the target cloud site or data generated by other cloud sites except the target cloud site, wherein the target cloud site is any one of the plurality of cloud sites;
if the user change data is data generated by the target cloud site, a data synchronization platform of the target cloud site synchronizes the user change data to the other cloud sites;
when a switching trigger condition is met, the data synchronization platform of the target cloud site switches the access of the user to the target cloud site to the access to other cloud sites except the target cloud site.
Optionally, if the user change data is data generated by the target cloud site, the data synchronization platform of the target cloud site synchronizes the user change data to the other cloud sites, including:
if the user change data is data generated by the target cloud site, the data synchronization platform of the target cloud site judges whether the user change data contains a first published identifier, wherein the first published identifier is used for indicating that the target cloud site has sent the user change data to other cloud sites;
if the first published identification is not included, the data synchronization platform of the target cloud site sends the user change data to the other cloud sites;
and writing a first restored identifier to the user change data by a data synchronization platform of the target cloud site, wherein the first restored identifier is used for indicating that the target cloud site has synchronized the user change data to the other cloud sites.
Optionally, the method further includes:
if the user change data are data generated by other cloud sites, the data synchronization platform of the target cloud site judges whether the user change data are synchronized to the target cloud site;
if the user change data is not synchronized to the target cloud site, a data synchronization platform of the target cloud site synchronizes the user change data to the target cloud site;
and writing a second published identifier to the user change data by the data synchronization platform of the target cloud site, wherein the second published identifier is used for indicating that the other cloud sites have sent the user change data to the target cloud site.
Optionally, the determining, by the data synchronization platform of the target cloud site, whether the user change data is synchronized to the target cloud site includes:
the data synchronization platform of the target cloud site judges whether the user change data contains a second restored identifier, wherein the second restored identifier is used for indicating that the target cloud site has synchronized the user change data to the target cloud site;
if the second restored identifier is not included, the data synchronization platform of the target cloud site determines that the user change data is not synchronized to the target cloud site.
Optionally, if the user change data is data generated by the other cloud sites, the data synchronization platform of the target cloud site determines whether the user change data is synchronized to the target cloud site, and the method further includes:
the data synchronization platform of the target cloud site searches target user change data related to the user change data in a database of the target cloud site; wherein, the association means that the user change data and the data changed by the target user change data are the same data;
and if the time point of the user change data generation is later than the time point of the target user change data generation, the data synchronization platform of the target cloud site synchronizes the user change data to the database of the target cloud site.
Optionally, the synchronizing the user change data to the other cloud sites by the data synchronization platform of the target cloud site includes:
and the data synchronization platform of the target cloud site sends the user change data to the data synchronization platforms of the other cloud sites by using the subscribed message middleware, so that the data synchronization platforms of the other cloud sites synchronize the user change data to the databases of the other cloud sites.
Optionally, the sending, by the data synchronization platform of the target cloud site, the user change data to the data synchronization platforms of the other cloud sites by using a subscribed message middleware, so that the data synchronization platforms of the other cloud sites synchronize the user change data to the databases of the other cloud sites, where the sending includes:
and the data synchronization platform of the target cloud station sends the user change data to the data synchronization platforms of the other cloud stations by using the corresponding message middleware subscribed by the data synchronization platform of each cloud station, so that the data synchronization platforms of the other cloud stations synchronize the user change data to the databases of the other cloud stations.
In a second aspect, an embodiment of the present application provides a multi-cloud and multi-live data synchronization platform, including:
a determining unit, configured to determine, after receiving user change data, that the user change data is data generated by the target cloud station or data generated by another cloud station other than the target cloud station, where the target cloud station is any one of the multiple cloud stations;
a synchronization unit, configured to synchronize the user change data to the other cloud sites by a data synchronization platform of the target cloud site if the user change data is data generated by the target cloud site;
and the switching unit is used for switching the access of the user to the target cloud site to the access to other cloud sites except the target cloud site by the data synchronization platform of the target cloud site when a switching trigger condition is met.
In a third aspect, an embodiment of the present application provides a multi-cloud and multi-live data synchronization platform, including:
the system comprises a central processing unit, a memory, an input/output interface, a wired or wireless network interface and a power supply;
the memory is a transient memory or a persistent memory;
the central processor is configured to communicate with the memory and execute the instruction operations in the memory to perform the aforementioned cloudy multi-alive data synchronization method.
In a fourth aspect, the present application provides a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to execute the foregoing method for synchronizing data of multiple clouds and multiple livers.
In a fifth aspect, embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the foregoing method for synchronizing data of multiple clouds and multiple livers.
According to the technical scheme, the embodiment of the application has the following advantages: the data synchronization platform of the target cloud site can synchronize the user change data to other cloud sites, when the target cloud site has an irresistible fault, the data synchronization platform of the target cloud site can switch the access of the user to the target cloud site to the access of other cloud sites which do not have the fault, the user does not sense whether the switching is performed, and the use experience of the user is improved.
Drawings
Fig. 1 is a schematic diagram of an architecture of a multi-active distributed system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for synchronizing data of multiple clouds and multiple livers disclosed in an embodiment of the present application;
fig. 3 is a schematic flowchart of another multi-cloud and multi-active data synchronization method disclosed in an embodiment of the present application;
fig. 4 is a schematic flowchart of another multi-cloud and multi-active data synchronization method disclosed in the embodiment of the present application;
fig. 5 is a schematic structural diagram of a multi-cloud and multi-live data synchronization platform disclosed in an embodiment of the present application;
fig. 6 is a schematic structural diagram of another multi-cloud and multi-live data synchronization platform disclosed in an embodiment of the present application;
fig. 7 is a schematic structural diagram of another multi-cloud and multi-active data synchronization platform disclosed in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a multi-cloud multi-activity data synchronization method, a data synchronization platform and a computer readable storage medium, which can synchronize data, so that when an irresistible fault occurs in a target cloud site, the data synchronization platform of the target cloud site can switch the access of a user to the target cloud site to the access of other sites. The cloud service can be provided in a plurality of cloud ends, the multi-cloud service can be provided in a plurality of cities, and the multi-cloud service can be provided in a plurality of cities. The multi-cloud multi-activity data synchronization method can be referred to as a data synchronization method for short in the application.
Referring to fig. 1, an architecture of a multi-active distributed system according to an embodiment of the present application includes:
the target cloud site 101, the database 1011 of the target cloud site, the data synchronization platform 1012 of the target cloud site, the other cloud site 102, the data synchronization platform 1021 of the other cloud site, and the database 1022 of the other cloud site, wherein the target cloud site 101 includes the database 1011 of the target cloud site and the data synchronization platform 1012 of the target cloud site, and the other cloud site 102 includes the data synchronization platform 1021 of the other cloud site and the database 1022 of the other cloud site.
When data synchronization is performed, the data synchronization platform 1012 of the target cloud site may be connected with the database 1011 of the target cloud site and the data synchronization platform 1021 of other cloud sites, wherein the data synchronization platform 1021 of other cloud sites may also be connected with the database 1022 of other cloud sites.
The target cloud site 101 may be a computing server providing scalability in the cloud, and the database 1011 of the target cloud site 101 may be a computer software system storing and managing data in a data structure, which may provide user change data generated by the target cloud site 101 for the data synchronization platform 1012 of the target cloud site 101, and may also store user change data generated by other cloud sites 102. The data synchronization platform 1012 of the target cloud site may be a system providing a data synchronization service, and the data synchronization platform 1012 of the target cloud site may obtain the user change data from the database 1011 of the target cloud site and synchronize the user change data to the data synchronization platform 1021 of another cloud site, and may also obtain the user change data from the data synchronization platform 1021 of another cloud site and synchronize the user change data to the data synchronization platform 1012 of the target cloud site. The description of the other cloud sites is similar to that of the target cloud site and will not be described in detail here.
Referring to fig. 2 based on the multi-active distributed system shown in fig. 1, fig. 2 is a schematic flowchart of a multi-cloud multi-active data synchronization method disclosed in the embodiment of the present application, where the method includes:
201. after receiving the user change data, the data synchronization platform of the target cloud site judges whether the user change data is data generated by the target cloud site or data generated by other cloud sites except the target cloud site, wherein the target cloud site is any one of the plurality of cloud sites.
In this embodiment, the cloud and live refers to that when data synchronization is performed, the data synchronization platform of the target cloud site may receive user change data, which is sent by the monitoring device of the target cloud site and monitored from the database of the target cloud site, and may also receive user change data sent by the data synchronization platforms of other cloud sites. After receiving the user change data, the data synchronization platform of the target cloud site may determine, by using the key value database, whether the user change data is data generated by the target cloud site or data generated by another cloud site other than the target cloud site, where the target cloud site is any one of the plurality of cloud sites.
It can be understood that the monitoring device of the target cloud site is mainly responsible for monitoring data change data in the database of the site in the target cloud in real time, and may be an open source component mongoshare written in a golang language, an open source component Maxwell written in a Java language, or other application programs capable of monitoring data change data in the database, which is not limited herein.
It is further understood that the key-value database may be a Remote Dictionary service Remote Dictionary Server, may be a distributed cache system Memcache, or may be any key-value database capable of storing information for distinguishing whether the user change data is generated from a target cloud site or other cloud sites, and is not limited herein.
202. And if the user change data are data generated by the target cloud site, the data synchronization platform of the target cloud site synchronizes the user change data to other cloud sites.
If it is determined that the user change data is data generated by the target cloud site, the data synchronization platform of the target cloud site can send the user change data to the data synchronization platforms of other cloud sites by using the subscribed message middleware, so that the data synchronization platforms of other clouds can synchronize the user change data to databases of other clouds, and the purpose that the target cloud site and the other cloud sites have the same user change data is achieved.
It can be understood that the data synchronization platform can subscribe to the message middleware by establishing a network link through the code, and the message middleware can store and forward user change data of each cloud in real time, which may be Kafka, a rocktmq or a RabbitMQ, or any message middleware that can store and forward user change data of each cloud in real time, and is not limited herein. The message middleware may be a message middleware subscribed by all cloud sites together, or a message middleware subscribed by each cloud site, or any message middleware with a number greater than or equal to 1, where the specific number is not limited herein.
It should be understood that the existence of the message middleware enables each cloud site to utilize the message middleware to implement synchronization of user change data, and under the condition that each cloud site subscribes to the message middleware of each cloud site, each cloud site can implement high availability and high reliability of a process of synchronizing user change data.
203. When the switching triggering condition is met, the data synchronization platform of the target cloud site switches the access of the user to the target cloud site to the access to other cloud sites except the target cloud site.
When the switching triggering condition is met, the data synchronization platform of the target cloud site can switch the access of the user to the target cloud site to the access to other cloud sites except the target cloud site.
It can be understood that there are various situations that satisfy the switching triggering condition, for example, when the target cloud site has a failure of an irresistible factor, the user cannot access the target cloud site, and at this time, the data synchronization platform of the target cloud site can switch the access of the user to the target cloud site to the access of other cloud sites except the target cloud site, so that the access of the user may not be disconnected halfway.
In the embodiment of the application, the data synchronization platform of the target cloud site can synchronize the user change data to other cloud sites, when the target cloud site has a failure of an irresistible factor, the data synchronization platform of the target cloud site can switch the access of the user to the target cloud site to the access of other cloud sites which do not have the failure, the user does not perceive whether the switching is performed, and the use experience of the user is improved.
In the embodiment of the application, the data synchronization platform of the target cloud site has multiple synchronization modes for the user change data generated by other cloud sites, which are described below:
firstly, a data synchronization platform of a target cloud site directly synchronizes user change data generated by other cloud sites to the target cloud site. Referring to fig. 3 in detail, fig. 3 is a schematic flow chart of another data synchronization method disclosed in the embodiment of the present application, where the method includes:
301. the data synchronization platform of the target cloud site can receive user change data.
In this embodiment, when data synchronization is performed, the data synchronization platform of the target cloud site may receive user change data, which is sent by the monitoring device of the target cloud site and monitored from the database of the target cloud site, and may also receive user change data sent by the data synchronization platforms of other cloud sites. The target cloud site is any one of a plurality of cloud sites.
It can be understood that the monitoring device of the target cloud site is mainly responsible for monitoring data change data in the database of the site in the target cloud in real time, and may be an open source component mongoshare written in a golang language, an open source component Maxwell written in a Java language, or other application programs capable of monitoring data change data in the database, which is not limited herein.
Taking a securities quotation system as an example, the securities quotation system is a multi-activity distributed system, that is, the securities quotation system can be deployed in multiple cities, if the securities quotation system is deployed in multiple cloud ends, cloud services can be provided by multiple cloud providers in multiple cities, multiple activities can be beijing, shanghai and chengdu, multiple clouds can be Tencent clouds and Huawuyun, and certainly, multiple activities can also be other cities capable of deploying the securities quotation system, and multiple clouds can also be other cloud servers capable of providing cloud services for the securities quotation system, which is not limited in detail here. The database of the target cloud site is used for storing user change data generated when a user logs in a security quotation system and performs business operation, and may be a relational database Mysql, a non-relational database mongosdb, or any database which can store user change data and support a monitoring device maxwell or mongoshake of the cloud site to monitor the user change data in the database of the cloud site in real time, and the specific details are not limited here. The user change data may be changed user basic information, account information, optional share block and optional share block share information, or any changed information representing user identity or behavior information of the user performing service operation, and is not limited herein.
302. The data synchronization platform of the target cloud site can judge whether the user change data is data generated by the target cloud site or data generated by other cloud sites except the target cloud site.
After receiving the user change data, the data synchronization platform of the target cloud site may determine, by using the key value database, whether the user change data is data generated by the target cloud site or data generated by other cloud sites other than the target cloud site. If the data generated by the target cloud site is determined, the step 303 is executed, and if the data generated by other cloud sites is determined, the step 307 is executed.
It is understood that the key-value database may be a Remote Dictionary service Remote Dictionary Server, may be a distributed cache system Memcache, or may be any key-value database capable of storing information for distinguishing whether the user change data is generated from a target cloud site or other cloud sites, and is not limited herein.
303. The data synchronization platform of the target cloud site judges whether the user change data contains a first published identification, wherein the first published identification is used for indicating that the target cloud site sends the user change data to other cloud sites.
The data synchronization platform of the target cloud site may determine whether the user change data includes a first published identifier, where the first published identifier is used to indicate that the target cloud site has sent the user change data to the data synchronization platform of another cloud site. If the first published identification is not included, steps 304 and 305 are performed, and if the first published identification is included, step 306 is performed.
304. The data synchronization platform of the target cloud site sends the user change data to the data synchronization platforms of other cloud sites, so that the data synchronization platforms of other clouds synchronize the user change data to databases of other cloud sites.
The data synchronization platform of the target cloud site can send the user change data to the data synchronization platforms of other cloud sites by using the subscribed message middleware, so that the data synchronization platforms of other clouds synchronize the user change data to the databases of other cloud sites.
It can be understood that the data synchronization platform can subscribe to the message middleware by establishing a network link through the code, and the message middleware can store and forward user change data of each cloud in real time, which may be Kafka, a rocktmq or a RabbitMQ, or any message middleware that can store and forward user change data of each cloud in real time, and is not limited herein. The message middleware may be a message middleware subscribed by all cloud sites together, or a message middleware subscribed by each cloud site, or any message middleware with a number greater than or equal to 1, where the specific number is not limited herein.
It should be understood that, the existence of the message middleware enables each cloud station to utilize the message middleware to implement synchronization of user change data, and under the condition that each cloud station subscribes to the message middleware of each cloud station, each cloud station can implement high availability and high reliability of a process of synchronizing user change data.
305. The data synchronization platform of the target cloud site writes a first restored identifier to the user change data, and the first restored identifier is used for indicating that the target cloud site has synchronized the user change data to other cloud sites.
After the data synchronization platform of the other cloud synchronizes the user change data to the database of the other cloud site, the data synchronization platform of the target cloud site may write a first restored identifier to the user change data, where the first restored identifier is used to indicate that the target cloud site has synchronized the user change data to the other cloud site.
306. And the data synchronization platform of the target cloud site does not send the user change data to other cloud sites.
The data synchronization platform of the target cloud site may not send the user change data to the data synchronization platforms of other cloud sites.
307. And the data synchronization platform of the target cloud site judges whether the user change data contains a second restored identifier, wherein the second restored identifier is used for indicating that the target cloud site has synchronized the user change data to the target cloud site.
The data synchronization platform of the target cloud site may determine whether the user change data includes a second restored identifier, where the second restored identifier is used to indicate that the target cloud site has synchronized the user change data to the target cloud site. If the second restored identity is not included, steps 308 and 309 are performed, and if the second restored identity is included, step 310 is performed.
308. And the data synchronization platform of the target cloud site synchronizes the user change data to the database of the target cloud site.
The data synchronization platform of the target cloud site can synchronize the user change data to the database of the target cloud site.
309. And writing a second published identification for the user change data by a data synchronization platform of the target cloud site, wherein the second published identification is used for indicating that other cloud sites have sent the user change data to the target cloud site.
After the user change data is synchronized to the database of the target cloud site, the data synchronization platform of the target cloud site may write a second published identifier to the user change data, where the second published identifier is used to indicate that other cloud sites have sent the user change data to the data synchronization platform of the target cloud site.
310. The data synchronization platform of the target cloud site does not synchronize the user change data to the target cloud site.
The data synchronization platform of the target cloud site may not synchronize the user change data to the database of the target cloud site.
311. When the switching triggering condition is met, the data synchronization platform of the target cloud site switches the access of the user to the target cloud site to the access to other cloud sites.
When the switching triggering condition is met, the data synchronization platform of the target cloud site can switch the access of the user to the target cloud site to the access to other cloud sites.
In this embodiment, the data synchronization platform of the target cloud site may synchronize the user change data to other cloud sites, and may implement real-time synchronization of the user change data of each cloud site. When the failure of the nonreactive factors occurs in the target cloud site, as long as the message middleware of one cloud site is available, the stability of the data synchronization system can be realized, and the data synchronization platform of the target cloud site can switch the access of the user to the target cloud site to the access of other cloud sites which do not fail, so that the user can perform business operation without perceiving whether the switching is performed, and the use experience of the user is improved. And, after the failure is relieved, the data synchronization can be automatically continued from the breakpoint. It can also be understood that the number of cloud sites can be dynamically expanded, enabling highly expanded capability of multi-cloud deployment.
And secondly, the data synchronization platform of the target cloud site firstly judges whether the user change data generated by other cloud sites is the latest change data, and if so, the user change data generated by other cloud sites are synchronized to the target cloud site. Referring to fig. 4, fig. 4 is a schematic flow chart of another data synchronization method disclosed in the embodiment of the present application, where the method includes:
401. the data synchronization platform of the target cloud site can receive user change data.
402. The data synchronization platform of the target cloud site can judge whether the user change data is data generated by the target cloud site or data generated by other cloud sites except the target cloud site.
If the data is determined to be generated by the target cloud site, step 403 is executed, and if the data is determined to be generated by other cloud sites, step 407 is executed.
403. The data synchronization platform of the target cloud site judges whether the user change data contains a first published identification, wherein the first published identification is used for indicating that the target cloud site sends the user change data to other cloud sites.
404. The data synchronization platform of the target cloud site sends the user change data to the data synchronization platforms of other cloud sites, so that the data synchronization platforms of other clouds synchronize the user change data to databases of other cloud sites.
405. The data synchronization platform of the target cloud site writes a first restored identifier to the user change data, and the first restored identifier is used for indicating that the target cloud site has synchronized the user change data to other cloud sites.
406. And the data synchronization platform of the target cloud site does not send the user change data to other cloud sites.
Steps 401 to 406 in this embodiment are similar to steps 301 and 306 in the embodiment shown in fig. 3, and are not described here again.
407. A data synchronization platform of the target cloud site searches target user change data related to the user change data in a database of the target cloud site; here, the association means that the user change data and the data changed by the target user change data are the same data.
In this embodiment, a user may access different cloud sites, and when the user accesses other cloud sites and performs a certain service operation, and for data change caused by the service operation, and when the user change data of the other cloud sites is inconsistent with the user change data of the current cloud site, the data synchronization platform of the target cloud site performs conflict processing. The data synchronization platform of the target cloud site can search target user change data related to the user change data in a database of the target cloud site; here, the association means that the user variation data and the data to which the target user variation data varies are the same data.
The same data is data corresponding to a certain service operation performed by the user, such as change data of the self-selected stock block, for example, change transaction amount data of buying and selling, and is not limited herein.
408. And the data synchronization platform of the target cloud site judges whether the time point of the generation of the user change data is later than the time point of the generation of the target user change data.
After the target user change data associated with the user change data is searched, the data synchronization platform of the target cloud site can judge whether the time point of the user change data generation is later than the time point of the target user change data generation. If the time point of the target user change data generation is later, step 409 is executed, and if the time point of the target user change data generation is not later, step 412 is executed.
It will be appreciated that determining the later user variation data at the time of generation ensures real-time and accuracy of data synchronization.
409. And the data synchronization platform of the target cloud site judges whether the user change data contains a second restored identifier, wherein the second restored identifier is used for indicating that the target cloud site has synchronized the user change data to the target cloud site.
410. And the data synchronization platform of the target cloud site synchronizes the user change data to the database of the target cloud site.
411. And writing a second published identification for the user change data by a data synchronization platform of the target cloud site, wherein the second published identification is used for indicating that other cloud sites have sent the user change data to the target cloud site.
412. The data synchronization platform of the target cloud site does not synchronize the user change data to the target cloud site.
413. When the switching triggering condition is met, the data synchronization platform of the target cloud site switches the access of the user to the target cloud site to the access to other cloud sites.
Steps 409 to 413 in this embodiment are similar to steps 307 and 311 in the embodiment shown in fig. 3, and detailed description thereof is omitted here.
In this embodiment, the data synchronization platform of the target cloud site may synchronize the user change data generated by the target cloud site to other cloud sites, and may also synchronize the user change data generated by other cloud sites to the target cloud site, so that real-time synchronization of the user change data of each cloud site may be achieved. When the failure of the nonreactive factors occurs in the target cloud site, as long as the message middleware of one cloud site is available, the stability of the data synchronization system can be realized, and the data synchronization platform of the target cloud site can switch the access of the user to the target cloud site to the access of other cloud sites which do not fail, so that the user can perform business operation without perceiving whether the switching is performed, and the use experience of the user is improved. And, after the failure is relieved, the data synchronization can be automatically continued from the breakpoint. It can also be understood that the number of cloud sites can be dynamically expanded, enabling highly expanded capability of multi-cloud deployment. Meanwhile, when the user change data are inconsistent, the user change data with later generation time can be subjected to data synchronization, and the real-time performance and accuracy of the data synchronization are realized.
The data synchronization method in the embodiment of the present application is described above, and referring to fig. 5, a data synchronization platform in the embodiment of the present application is described below, where an embodiment of the data synchronization platform in the embodiment of the present application includes:
a determining unit 501, configured to determine, after receiving the user change data, that the user change data is data generated by a target cloud station or data generated by another cloud station other than the target cloud station, where the target cloud station is any one of multiple cloud stations;
a synchronization unit 502, configured to synchronize the user change data to other cloud sites by a data synchronization platform of the target cloud site if the user change data is data generated by the target cloud site;
the switching unit 503 is configured to, when the switching trigger condition is met, switch the access of the user to the target cloud site to the access of other cloud sites except the target cloud site by the data synchronization platform of the target cloud site.
In the embodiment of the application, the data synchronization platform of the target cloud site can synchronize the user change data to other cloud sites, when the target cloud site has an irresistible fault, the data synchronization platform of the target cloud site can switch the access of the user to the target cloud site to the access of other cloud sites which do not have the fault, the user does not sense whether the switching is performed, and the use experience of the user is improved.
Referring to fig. 6, the data synchronization platform in the embodiment of the present application is described in detail below, and another embodiment of the data synchronization platform in the embodiment of the present application includes:
a determining unit 601, configured to determine, after receiving the user change data, whether the user change data is data generated by a target cloud station or data generated by a cloud station other than the target cloud station, where the target cloud station is any one of the multiple cloud stations;
a synchronizing unit 602, configured to synchronize the user change data to other cloud sites if the user change data is data generated by the target cloud site;
a switching unit 603, configured to switch, when a switching trigger condition is met, access of the user to the target cloud site to access to a cloud site other than the target cloud site;
the synchronization unit 602 is specifically configured to determine whether the user change data includes a first published identifier if the user change data is data generated by a target cloud site, where the first published identifier is used to indicate that the target cloud site has sent the user change data to other cloud sites, and if the user change data does not include the first published identifier, the data synchronization platform of the target cloud site sends the user change data to other cloud sites, and the data synchronization platform of the target cloud site writes a first restored identifier for the user change data, where the first restored identifier is used to indicate that the target cloud site has synchronized the user change data to other cloud sites.
The data synchronization platform further comprises: the determination unit 604 is arranged to determine the position of the cell,
the determining unit 601 is specifically configured to determine whether the user change data is synchronized to the target cloud site if the user change data is data generated by other cloud sites;
the synchronization unit 602 is specifically configured to synchronize the user change data to the target cloud site if the user change data is not synchronized to the target cloud site;
the synchronizing unit 602 is specifically configured to write a second published identifier to the user change data, where the second published identifier is used to indicate that the other cloud sites have sent the user change data to the target cloud site.
The determining unit 601 is specifically configured to determine whether the user changed data includes a second restored identifier, where the second restored identifier is used to indicate that the target cloud site has synchronized the user changed data to the target cloud site;
a determining unit 604, configured to determine that the user change data is not synchronized to the target cloud site if the second restored identifier is not included.
The data synchronization platform further comprises:
a searching unit 605, configured to search, in a database of a target cloud site, target user change data associated with user change data; wherein, the association means that the data changed by the user change data and the target user change data are the same data;
the synchronizing unit 602 is specifically configured to synchronize the user change data to the database of the target cloud site if the time point of the user change data generation is later than the time point of the target user change data generation.
The synchronization unit 602 is specifically configured to send the user change data to the data synchronization platform of another cloud site by using the subscribed message middleware, so that the data synchronization platform of the other cloud site synchronizes the user change data to the database of the other cloud site.
The synchronization unit 602 is specifically configured to send the user change data to the data synchronization platforms of other cloud sites by using the corresponding message middleware subscribed by the data synchronization platform of each cloud site, so that the data synchronization platforms of the other cloud sites synchronize the user change data to the databases of the other cloud sites.
In this embodiment, each unit in the data synchronization platform performs the operations of the data synchronization platform in the embodiments shown in fig. 2 to fig. 4, which are not described herein again in detail.
Referring to fig. 7, another embodiment of the data synchronization platform in the embodiment of the present application includes:
a central processing unit 701, a memory 705, an input/output interface 704, a wired or wireless network interface 703 and a power supply 702;
memory 705 is a transient storage memory or a persistent storage memory;
the central processor 701 is configured to communicate with the memory 705 and execute the operations of the instructions in the memory 705 to perform the methods described in the embodiments of fig. 2, 3, and 4.
The embodiment of the present application also provides a computer-readable storage medium, which includes instructions, when the instructions are executed on a computer, the instructions cause the computer to execute the method in the foregoing embodiments shown in fig. 2, fig. 3 and fig. 4.
The embodiment of the present application also provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the method in the foregoing embodiments shown in fig. 2, fig. 3 and fig. 4.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in 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 application. 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 the like.

Claims (10)

1. The multi-cloud and multi-activity data synchronization method is applied to a multi-activity distributed system, wherein the multi-activity distributed system comprises a plurality of cloud sites, and each cloud site comprises a database and a data synchronization platform;
the method comprises the following steps:
after receiving user change data, a data synchronization platform of the target cloud site judges whether the user change data is data generated by the target cloud site or data generated by other cloud sites except the target cloud site, wherein the target cloud site is any one of the plurality of cloud sites;
if the user change data is data generated by the target cloud site, a data synchronization platform of the target cloud site synchronizes the user change data to the other cloud sites;
when a switching triggering condition is met, the data synchronization platform of the target cloud site switches the access of the user to the target cloud site to the access to other cloud sites except the target cloud site.
2. The method according to claim 1, wherein if the user change data is data generated by the target cloud site, the synchronizing the user change data to the other cloud sites by a data synchronization platform of the target cloud site comprises:
if the user change data is data generated by the target cloud site, the data synchronization platform of the target cloud site judges whether the user change data contains a first published identifier, wherein the first published identifier is used for indicating that the target cloud site has sent the user change data to other cloud sites;
if the first published identification is not included, the data synchronization platform of the target cloud site sends the user change data to the other cloud sites;
and writing a first restored identifier to the user change data by a data synchronization platform of the target cloud site, wherein the first restored identifier is used for indicating that the target cloud site has synchronized the user change data to the other cloud sites.
3. The method for synchronizing data according to claim 1 or 2, wherein the method further comprises:
if the user change data is data generated by other cloud sites, the data synchronization platform of the target cloud site judges whether the user change data is synchronized to the target cloud site;
if the user change data is not synchronized to the target cloud site, a data synchronization platform of the target cloud site synchronizes the user change data to the target cloud site;
and writing a second published identifier to the user change data by the data synchronization platform of the target cloud site, wherein the second published identifier is used for indicating that the other cloud sites have sent the user change data to the target cloud site.
4. The method according to claim 3, wherein the step of determining whether the user change data is synchronized to the target cloud site by the data synchronization platform of the target cloud site comprises:
the data synchronization platform of the target cloud site judges whether the user change data contains a second restored identifier, wherein the second restored identifier is used for indicating that the target cloud site has synchronized the user change data to the target cloud site;
if the second restored identifier is not included, the data synchronization platform of the target cloud site determines that the user change data is not synchronized to the target cloud site.
5. The multi-cloud multi-activity data synchronization method according to claim 4, wherein if the user change data is data generated by the other cloud sites, the data synchronization platform of the target cloud site determines whether the user change data is synchronized to the target cloud site, and the method further includes:
the data synchronization platform of the target cloud site searches target user change data related to the user change data in a database of the target cloud site; wherein, the association means that the user change data and the data changed by the target user change data are the same data;
and if the time point of the user change data generation is later than the time point of the target user change data generation, the data synchronization platform of the target cloud site synchronizes the user change data to the database of the target cloud site.
6. The method according to claim 1 or 2, wherein the step of synchronizing the user change data to the other cloud sites by the data synchronization platform of the target cloud site comprises:
and the data synchronization platform of the target cloud site sends the user change data to the data synchronization platforms of the other cloud sites by using the subscribed message middleware, so that the data synchronization platforms of the other cloud sites synchronize the user change data to the databases of the other cloud sites.
7. The method according to claim 6, wherein the step of sending the user change data to the data synchronization platforms of the other cloud sites by the data synchronization platform of the target cloud site through a subscribed message middleware, so that the data synchronization platforms of the other cloud sites synchronize the user change data to the databases of the other cloud sites comprises:
and the data synchronization platform of the target cloud site sends the user change data to the data synchronization platforms of the other cloud sites by using the corresponding message middleware subscribed by the data synchronization platform of each cloud site, so that the data synchronization platforms of the other cloud sites synchronize the user change data to the databases of the other cloud sites.
8. A data synchronization platform, comprising:
the judging unit is used for judging whether the user change data is data generated by the target cloud station or data generated by other cloud stations except the target cloud station after receiving the user change data, wherein the target cloud station is any one of the plurality of cloud stations;
a synchronization unit, configured to synchronize the user change data to the other cloud sites if the user change data is data generated by the target cloud site;
and the switching unit is used for switching the access of the user to the target cloud site to the access to other cloud sites except the target cloud site when the switching triggering condition is met.
9. A data synchronization platform, comprising:
the system comprises a central processing unit, a memory, an input/output interface, a wired or wireless network interface and a power supply;
the memory is a transient memory or a persistent memory;
the central processor is configured to communicate with the memory and execute the operations of the instructions in the memory to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 7.
CN202210197468.9A 2022-03-01 2022-03-01 Multi-cloud multi-activity data synchronization method and related equipment Pending CN114579665A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210197468.9A CN114579665A (en) 2022-03-01 2022-03-01 Multi-cloud multi-activity data synchronization method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210197468.9A CN114579665A (en) 2022-03-01 2022-03-01 Multi-cloud multi-activity data synchronization method and related equipment

Publications (1)

Publication Number Publication Date
CN114579665A true CN114579665A (en) 2022-06-03

Family

ID=81772088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210197468.9A Pending CN114579665A (en) 2022-03-01 2022-03-01 Multi-cloud multi-activity data synchronization method and related equipment

Country Status (1)

Country Link
CN (1) CN114579665A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302619A (en) * 2023-05-18 2023-06-23 成方金融科技有限公司 Cross-site multi-activity processing method, device, apparatus and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302619A (en) * 2023-05-18 2023-06-23 成方金融科技有限公司 Cross-site multi-activity processing method, device, apparatus and storage medium
CN116302619B (en) * 2023-05-18 2023-09-05 成方金融科技有限公司 Cross-site multi-activity processing method, device, apparatus and storage medium

Similar Documents

Publication Publication Date Title
CN103019960B (en) Distributed caching method and system
CN111309550A (en) Data acquisition method, system, equipment and storage medium of application program
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
US11588890B2 (en) System, method and apparatus having a redundant cluster for processing data
CN109325056A (en) A kind of big data processing method and processing device, communication equipment
CN108875035B (en) Data storage method of distributed file system and related equipment
CN114579665A (en) Multi-cloud multi-activity data synchronization method and related equipment
EP3786802A1 (en) Method and device for failover in hbase system
CN115934414A (en) Data backup method, data recovery method, device, equipment and storage medium
US11128622B2 (en) Method for processing data request and system therefor, access device, and storage device
CN111404737B (en) Disaster recovery processing method and related device
CN112000850B (en) Method, device, system and equipment for processing data
CN110554992B (en) Distributed metadata path management method, system, terminal and storage medium
CN107291575B (en) Processing method and equipment for data center fault
US20160085638A1 (en) Computer system and method of identifying a failure
CN110958287A (en) Operation object data synchronization method, device and system
CN112685486B (en) Data management method and device for database cluster, electronic equipment and storage medium
CN114844771A (en) Monitoring method, device, storage medium and program product for micro-service system
CN110134547B (en) Middleware-based repeated data deleting method and related device
CN104156358B (en) A kind of batch read method of table for database, device and system
CN104834724A (en) Method and device for synchronizing database
CN114676145B (en) Data processing method and data collation system
CN115168366B (en) Data processing method, data processing device, electronic equipment and storage medium
KR20130024221A (en) Method of restoring file and system for the same
CN117632445B (en) Request processing method and device, task execution 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