CN109254997B - Data synchronization method, system, computer device and readable storage medium - Google Patents

Data synchronization method, system, computer device and readable storage medium Download PDF

Info

Publication number
CN109254997B
CN109254997B CN201810981195.0A CN201810981195A CN109254997B CN 109254997 B CN109254997 B CN 109254997B CN 201810981195 A CN201810981195 A CN 201810981195A CN 109254997 B CN109254997 B CN 109254997B
Authority
CN
China
Prior art keywords
data
architecture model
synchronization
server
stored
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
CN201810981195.0A
Other languages
Chinese (zh)
Other versions
CN109254997A (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.)
Guangzhou China Dci Co ltd
Original Assignee
Guangzhou China Dci 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 Guangzhou China Dci Co ltd filed Critical Guangzhou China Dci Co ltd
Priority to CN201810981195.0A priority Critical patent/CN109254997B/en
Publication of CN109254997A publication Critical patent/CN109254997A/en
Application granted granted Critical
Publication of CN109254997B publication Critical patent/CN109254997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a data synchronization method, which comprises the following steps: acquiring a task list, wherein the task list comprises at least one synchronous task carrying an architecture model identifier; inquiring first data which is stored by a first synchronous server and corresponds to the architecture model identification according to the architecture model identification; and sending a synchronization request, the inquired first data and the architecture model identification to a second synchronization server, wherein the synchronization request is used for indicating the second synchronization server to inquire second data which is stored by the second synchronization server and corresponds to the architecture model identification according to the architecture model identification, and updating the second data into the first data. The scheme of the invention can effectively improve the data synchronization efficiency.

Description

Data synchronization method, system, computer device and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data synchronization method, system, computer device, and readable storage medium.
Background
In an enterprise's internet environment, data integration of multiple systems is often required, and data and changes in one system need to be synchronized to other systems in a timely manner.
At present, when different application systems need to perform data synchronization, in order to avoid omission, the two systems are always scanned respectively and are synchronized after different data of the two systems are compared.
The existing synchronization method needs to spend a lot of time on scanning a comparison database and finding different data records each time, and the efficiency is low.
Disclosure of Invention
The invention aims to provide a data synchronization method, a data synchronization system, a computer device and a readable storage medium, which can improve the synchronization efficiency.
The purpose of the invention is realized by the following technical scheme:
a method of data synchronization, the method comprising:
acquiring a task list, wherein the task list comprises at least one synchronous task carrying an architecture model identifier;
inquiring first data which is stored by a first synchronous server and corresponds to the architecture model identification according to the architecture model identification;
sending a synchronization request, the queried first data and the architecture model identification to a second synchronization server;
the synchronization request is used for instructing the second synchronization server to query second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data to the first data.
In one embodiment, the method further comprises:
monitoring data updating of the first synchronization server, acquiring an architecture model identifier corresponding to the data updating when the data updating of the first synchronization server is monitored, and generating a synchronization task according to the acquired architecture model identifier.
In one embodiment, the method further comprises:
and deleting the synchronization task corresponding to the sent architecture model identifier in the task list when receiving a receipt message which represents that the synchronization request is successfully sent and is returned by the second synchronization server.
In one embodiment, the method further comprises:
and when a receipt message representing that the synchronization request is successfully sent is not received within a preset time, the first data and the architecture model identification are repeatedly sent to the second synchronization server, the sending times are recorded, and when the sending times reach a preset time, the first data and the architecture model identification are stopped being sent to the second synchronization server.
In one embodiment, the querying, according to the architecture model identifier of the synchronization task, first data stored by the first synchronization server and corresponding to the architecture model identifier includes:
inquiring a data model which is stored by a first synchronization server and corresponds to the architecture model identification according to the architecture model identification of the synchronization task;
and querying first data, which is stored by the first synchronization server and corresponds to the data model and the architecture model identification, by combining the data model and the architecture model identification.
A method of data synchronization, the method comprising:
receiving first data sent by a first synchronous server and an architecture model identifier corresponding to the first data;
querying second data corresponding to the architecture model identification and stored by a second synchronous server according to the architecture model identification;
updating the second data to the first data.
In one embodiment, said querying second data stored by a second synchronization server and corresponding to the architecture model identification according to the architecture model identification comprises:
inquiring a data model which is stored by a second synchronous server and corresponds to the architecture model identification according to the architecture model identification;
and querying second data stored by the second synchronous server and corresponding to the data model and the architecture model identification in combination with the data model and the architecture model identification.
A data synchronization system, the system comprising:
the task acquisition module is used for acquiring a task list, wherein the task list comprises at least one synchronous task carrying an architecture model identifier;
the first query module is used for querying first data which is stored by a first synchronous server and corresponds to the architecture model identification according to the architecture model identification;
the export module is used for sending a synchronization request, the inquired first data and the architecture model identification to a second synchronization server;
the synchronization request is used for instructing the second synchronization server to query second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data to the first data.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a task list, wherein the task list comprises at least one synchronous task carrying an architecture model identifier;
inquiring first data which is stored by a first synchronous server and corresponds to the architecture model identification according to the architecture model identification;
sending a synchronization request, the queried first data and the architecture model identification to a second synchronization server;
the synchronization request is used for instructing the second synchronization server to query second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data to the first data.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a task list, wherein the task list comprises at least one synchronous task carrying an architecture model identifier;
inquiring first data which is stored by a first synchronous server and corresponds to the architecture model identification according to the architecture model identification;
sending a synchronization request, the queried first data and the architecture model identification to a second synchronization server;
the synchronization request is used for instructing the second synchronization server to query second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data to the first data.
According to the scheme of the invention, the task list is obtained, the task list comprises at least one synchronous task carrying an architecture model identifier, first data which is stored by a first synchronous server and corresponds to the architecture model identifier is inquired according to the architecture model identifier, and the incidence relation between the first data and the architecture model identifier is established, so that a data structure is not damaged in the data synchronization process, only the first data needs to be synchronized, and the synchronization efficiency can be effectively improved; and sending a synchronization request, the inquired first data and the architecture model identifier to a second synchronization server, wherein the synchronization request is used for indicating the second synchronization server to inquire second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data into the first data, and only the second data corresponding to the architecture model identifier needs to be replaced by the first data without comparing the data of the whole system, so that the data amount scanned in the synchronization process can be effectively reduced, the cost is reduced, and the synchronization efficiency is improved.
Drawings
FIG. 1 is a diagram of an exemplary data synchronization method;
FIG. 2 is a flow diagram illustrating a method for data synchronization in one embodiment;
FIG. 3 is a flow diagram illustrating a method for data synchronization in one embodiment;
FIG. 4 is a flow diagram illustrating a method for data synchronization in one embodiment;
FIG. 5 is a flow diagram that illustrates a method for data synchronization in one embodiment;
FIG. 6 is a flow chart illustrating a data synchronization method according to another embodiment;
FIG. 7 is a block diagram of the structure of a data synchronization system in one embodiment;
FIG. 8 is a block diagram of the structure of a data synchronization system in one embodiment;
FIG. 9 is a block diagram of the structure of a data synchronization system in one embodiment;
FIG. 10 is a block diagram showing the construction of a data synchronization system in another embodiment;
FIG. 11 is a block diagram of the structure of a data synchronization system in one embodiment;
FIG. 12 is a diagram showing an internal structure of a computer device in one embodiment;
fig. 13 is an internal structural view of a computer device in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the detailed description and specific examples, while indicating the scope of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
The data synchronization method provided by the application can be applied to the application environment shown in fig. 1. Wherein the first synchronization server 102 communicates with the second synchronization server 104 via a network. The first synchronization server 102 acquires a task list, wherein the task list comprises at least one synchronization task carrying an architecture model identifier; the first synchronization server 102 inquires first data which is stored by the first synchronization server and corresponds to the architecture model identification according to the architecture model identification; the first synchronization server 102 sends a synchronization request, the queried first data and the architecture model identifier to the second synchronization server 104, where the synchronization request is used to instruct the second synchronization server 104 to query, according to the architecture model identifier, second data corresponding to the architecture model identifier and stored by the second synchronization server 104, and update the second data to the first data. The server may be implemented by an independent server or a server cluster composed of a plurality of servers. Those skilled in the art will appreciate that the data synchronization method provided in the present application can be applied not only to the application environment shown in fig. 1, but also to various computers or servers.
In one embodiment, as shown in fig. 2, a data synchronization method is provided, which is described by taking the method as an example applied to the server 104 in fig. 1, and includes the following steps:
step S101, a task list is obtained, wherein the task list comprises at least one synchronous task carrying an architecture model identifier;
specifically, different synchronization tasks have different task types, some task types need to synchronize all first data corresponding to the architecture model identifiers of the tasks, some task types need to synchronize only part of first data corresponding to the architecture model identifiers of the tasks, and the corresponding task types can be correspondingly queried according to the architecture model identifiers.
Step S102, inquiring first data which is stored by a first synchronous server and corresponds to the architecture model identification according to the architecture model identification;
specifically, since the data structures of the first synchronization server and the second synchronization server may be different, it is necessary to establish an association relationship corresponding to the same architecture model identifier, so that the data structures in the first synchronization server and the second synchronization server can be prevented from being damaged, and the corresponding data can be synchronized.
Step S103, sending a synchronization request, the inquired first data and the architecture model identification to a second synchronization server;
the synchronization request is used for instructing the second synchronization server to query second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data to the first data.
Specifically, after the first data and the architecture model identifier are obtained, the data can be exported.
In the data synchronization method, a task list is obtained, wherein the task list comprises at least one synchronization task carrying an architecture model identifier, first data which is stored by a first synchronization server and corresponds to the architecture model identifier is inquired according to the architecture model identifier, and an association relation between the first data and the architecture model identifier is established, so that a data structure is not damaged in a data synchronization process, only the first data needs to be synchronized, and the synchronization efficiency can be effectively improved; and sending a synchronization request, the inquired first data and the architecture model identifier to a second synchronization server, wherein the synchronization request is used for indicating the second synchronization server to inquire second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data into the first data, and only the second data corresponding to the architecture model identifier needs to be replaced by the first data without comparing the data of the whole system, so that the data amount scanned in the synchronization process can be effectively reduced, the cost is reduced, and the synchronization efficiency is improved.
In one embodiment, as shown in fig. 3, the method further includes:
step S100, monitoring data updating of the first synchronization server, acquiring an architecture model identifier corresponding to the data updating when the data updating of the first synchronization server is monitored, and generating a synchronization task according to the acquired architecture model identifier.
Specifically, each time the first synchronization server data is updated, a synchronization task is established, and when the synchronization of the first data corresponding to the synchronization task is completed, the corresponding synchronization task is deleted.
In one embodiment, as shown in fig. 3, the method further includes:
and step S104, deleting the synchronization task corresponding to the sent architecture model identifier in the task list when receiving a receipt message which represents that the synchronization request is sent successfully and is returned by the second synchronization server.
Specifically, when the first data corresponding to the architecture model identifier has completed the process of deriving synchronization, the synchronization task corresponding to the original task list can be deleted, thereby avoiding the next repeated synchronization and saving resources.
In one embodiment, as shown in fig. 3, the method further includes:
step S105, when a receipt message indicating that the synchronization request is successfully sent is not received by the second synchronization server within a preset time, the first data and the architecture model identifier are repeatedly sent to the second synchronization server, the sending times are recorded, and when the sending times reach a preset time, the first data and the architecture model identifier are stopped being sent to the second synchronization server.
Specifically, when the network fails to be accessed due to a network failure, the first data cannot be exported, and at this time, if the first synchronization server continuously executes the sending task, the memory is always occupied, and the first synchronization server may crash.
In one embodiment, as shown in fig. 4, the querying, according to the architecture model identifier of the synchronization task, first data stored by the first synchronization server and corresponding to the architecture model identifier includes:
step S1021, according to the architecture model identification of the synchronization task, inquiring a data model which is stored by a first synchronization server and corresponds to the architecture model identification;
step S1022, querying, by combining the data model and the architecture model identifier, first data stored by the first synchronization server and corresponding to the data model and the architecture model identifier.
Specifically, a corresponding data model is set, so that the position and the data updating condition of each first data in the first synchronization server can be conveniently searched.
In one embodiment, as shown in fig. 5, there is provided a data synchronization method, the method comprising:
step S201, receiving first data sent by a first synchronous server and an architecture model identifier corresponding to the first data;
step S202, inquiring second data which is stored by a second synchronous server and corresponds to the architecture model identification according to the architecture model identification;
step S203, updating the second data to the first data.
Specifically, since the data structures of the first synchronization server and the second synchronization server may be different, the data structures of the first synchronization server and the second synchronization server may need to be corresponding to the association relationship between the same architecture model identifiers, so that the data structures of the first synchronization server and the second synchronization server can be prevented from being damaged, and the corresponding data can be synchronized.
In one embodiment, as shown in fig. 6, the querying the second data stored by the second synchronization server and corresponding to the architecture model identification according to the architecture model identification includes:
step S2021, inquiring a data model which is stored by a second synchronous server and corresponds to the architecture model identification according to the architecture model identification;
step S2022, querying second data stored by the second synchronization server and corresponding to the data model and the architecture model identifier by combining the data model and the architecture model identifier.
Specifically, a corresponding data model is set, so that the position and the data change condition of each first data in the first synchronization server can be conveniently searched.
It should be understood that although the various steps in the flow charts of fig. 2-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 7, there is provided a data synchronization system, the system comprising:
a task obtaining module 101, configured to obtain a task list, where the task list includes at least one synchronous task carrying an architecture model identifier;
a first query module 102, configured to query, according to the architecture model identifier, first data stored by a first synchronization server and corresponding to the architecture model identifier;
an export module 103, configured to send a synchronization request, the queried first data, and the architecture model identifier to a second synchronization server;
the synchronization request is used for instructing the second synchronization server to query second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data to the first data.
In one embodiment, as shown in fig. 8, the data synchronization system further includes:
the task obtaining module 100 is configured to monitor data update of the first synchronization server, obtain an architecture model identifier corresponding to the data update when it is monitored that the data update occurs in the first synchronization server, and generate a synchronization task according to the obtained architecture model identifier.
In one embodiment, as shown in fig. 8, the data synchronization system further includes:
a deleting module 104, configured to delete the synchronization task corresponding to the sent architecture model identifier in the task list when receiving a receipt message indicating that the synchronization request is successfully sent back from the second synchronization server.
A recording module 105, configured to repeatedly send the first data and the architecture model identifier to the second synchronization server and record the sending times when a receipt message indicating that the sending of the synchronization request is successful is not received by the second synchronization server within a preset time, and stop sending the first data and the architecture model identifier to the second synchronization server when the sending times reaches a preset time.
In one embodiment, as shown in fig. 9, the first query module 102 includes:
a first query unit 1021, configured to query, according to the architecture model identifier of the synchronization task, a data model stored in a first synchronization server and corresponding to the architecture model identifier;
a second querying unit 1022, configured to query, in combination with the data model and the architecture model identifier, the first data stored by the first synchronization server and corresponding to the data model and the architecture model identifier.
In one embodiment, as shown in fig. 10, there is provided a data synchronization system, the system comprising:
a receiving module 201, configured to receive first data sent by a first synchronization server and an architecture model identifier corresponding to the first data;
a second query module 202, configured to query, according to the architecture model identifier, second data stored by a second synchronization server and corresponding to the architecture model identifier;
an updating module 203, configured to update the second data to the first data.
In one embodiment, as shown in fig. 11, the second query module 202 includes:
a third query unit 2021, configured to query, according to the architecture model identifier, a data model stored by the second synchronization server and corresponding to the architecture model identifier;
a fourth querying unit 2022, configured to query, by combining the data model and the architecture model identifier, second data stored by the second synchronization server and corresponding to the data model and the architecture model identifier.
For specific limitations of the data synchronization system, reference may be made to the above limitations of the data synchronization method, which are not described herein again. The various modules in the data synchronization system described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 12. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data related to data synchronization. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data synchronization method.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 13. The computer device includes a processor, a memory, a network interface, a display screen, and an input system connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data synchronization method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input system of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the configurations shown in fig. 12-13 are only block diagrams of some of the configurations relevant to the present application, and do not constitute a limitation on the computing devices to which the present application may be applied, and that a particular computing device may include more or less components than shown in the figures, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: acquiring a task list, wherein the task list comprises at least one synchronous task carrying an architecture model identifier; inquiring first data which is stored by a first synchronous server and corresponds to the architecture model identification according to the architecture model identification; sending a synchronization request, the queried first data and the architecture model identification to a second synchronization server; the synchronization request is used for instructing the second synchronization server to query second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data to the first data.
In one embodiment, the method further includes monitoring data update of the first synchronization server when the processor executes the computer program, acquiring an architecture model identifier corresponding to the data update when it is monitored that the data update occurs in the first synchronization server, and generating the synchronization task according to the acquired architecture model identifier.
In one embodiment, the method further includes deleting the synchronization task corresponding to the sent architecture model identifier in the task list when receiving a response message indicating that the sending of the synchronization request is successful returned by the second synchronization server when the processor executes the computer program.
In one embodiment, when the processor executes the computer program, the method further includes, when a receipt message indicating that the second synchronization server returns a successful transmission of the synchronization request is not received within a preset time, repeatedly transmitting the first data and the architecture model identifier to the second synchronization server and recording the number of transmissions, and when the number of transmissions reaches a preset number, stopping transmitting the first data and the architecture model identifier to the second synchronization server.
In one embodiment, the querying, by the processor, the first data stored by the first synchronization server and corresponding to the architecture model identifier according to the architecture model identifier of the synchronization task when the computer program is executed includes: inquiring a data model which is stored by a first synchronization server and corresponds to the architecture model identification according to the architecture model identification of the synchronization task; and querying first data, which is stored by the first synchronization server and corresponds to the data model and the architecture model identification, by combining the data model and the architecture model identification.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: receiving first data sent by a first synchronous server and an architecture model identifier corresponding to the first data; querying second data corresponding to the architecture model identification and stored by a second synchronous server according to the architecture model identification; updating the second data to the first data.
In one embodiment, the processor, when executing the computer program, querying second data stored by a second synchronization server and corresponding to the architecture model identifier according to the architecture model identifier comprises: inquiring a data model which is stored by a second synchronous server and corresponds to the architecture model identification according to the architecture model identification; and querying second data stored by the second synchronous server and corresponding to the data model and the architecture model identification in combination with the data model and the architecture model identification.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a task list, wherein the task list comprises at least one synchronous task carrying an architecture model identifier; inquiring first data which is stored by a first synchronous server and corresponds to the architecture model identification according to the architecture model identification; sending a synchronization request, the queried first data and the architecture model identification to a second synchronization server; the synchronization request is used for instructing the second synchronization server to query second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data to the first data.
In one embodiment, when the computer program is executed by the processor, the method further includes monitoring data update of the first synchronization server, acquiring an architecture model identifier corresponding to the data update when it is monitored that the data update occurs in the first synchronization server, and generating a synchronization task according to the acquired architecture model identifier.
In one embodiment, when the computer program is executed by a processor, the method further includes deleting the synchronization task corresponding to the sent architecture model identifier in the task list when receiving a response message indicating that the synchronization request is sent successfully returned by the second synchronization server.
In one embodiment, when the computer program is executed by the processor, the method further includes, when a response message indicating that the synchronization request is successfully sent back is not received by the second synchronization server within a preset time, repeatedly sending the first data and the architecture model identifier to the second synchronization server and recording the sending times, and when the sending times reaches a preset number, stopping sending the first data and the architecture model identifier to the second synchronization server.
In one embodiment, the computer program, when executed by a processor, queries a first synchronization server for first data corresponding to an architecture model identification of the synchronization task based on the architecture model identification comprises: inquiring a data model which is stored by a first synchronization server and corresponds to the architecture model identification according to the architecture model identification of the synchronization task; and querying first data, which is stored by the first synchronization server and corresponds to the data model and the architecture model identification, by combining the data model and the architecture model identification.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving first data sent by a first synchronous server and an architecture model identifier corresponding to the first data; querying second data corresponding to the architecture model identification and stored by a second synchronous server according to the architecture model identification; updating the second data to the first data.
In one embodiment, the computer program, when executed by the processor, queries a second synchronization server stored second data corresponding to the architecture model identification according to the architecture model identification comprises: inquiring a data model which is stored by a second synchronous server and corresponds to the architecture model identification according to the architecture model identification; and querying second data stored by the second synchronous server and corresponding to the data model and the architecture model identification in combination with the data model and the architecture model identification.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for synchronizing data, the method comprising:
acquiring a task list, wherein the task list comprises at least one synchronous task carrying an architecture model identifier;
inquiring first data which is stored by a first synchronous server and corresponds to the architecture model identification according to the architecture model identification; the first data is a plurality of data; the querying, according to the architecture model identifier, first data stored by a first synchronization server and corresponding to the architecture model identifier includes: inquiring a data model which is stored by a first synchronization server and corresponds to the architecture model identification according to the architecture model identification of the synchronization task; querying first data, which is stored by the first synchronization server and corresponds to the data model and the architecture model identification, by combining the data model and the architecture model identification;
sending a synchronization request, the queried first data and the architecture model identification to a second synchronization server;
the synchronization request is used for instructing the second synchronization server to query second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data to the first data.
2. The data synchronization method of claim 1, further comprising:
monitoring data updating of the first synchronization server, acquiring an architecture model identifier corresponding to the data updating when the data updating of the first synchronization server is monitored, and generating a synchronization task according to the acquired architecture model identifier.
3. The data synchronization method of claim 1, further comprising:
and deleting the synchronization task corresponding to the sent architecture model identifier in the task list when receiving a receipt message which represents that the synchronization request is successfully sent and is returned by the second synchronization server.
4. The data synchronization method of claim 1, further comprising:
and when a receipt message representing that the synchronization request is successfully sent is not received within a preset time, the first data and the architecture model identification are repeatedly sent to the second synchronization server, the sending times are recorded, and when the sending times reach a preset time, the first data and the architecture model identification are stopped being sent to the second synchronization server.
5. A method for synchronizing data, the method comprising:
receiving first data sent by a first synchronous server and an architecture model identifier corresponding to the first data; the first data is a plurality of data; the query process of the first data comprises the following steps: the first synchronization server inquires a data model which is stored by the first synchronization server and corresponds to the architecture model identification according to the architecture model identification of the synchronization task, and inquires first data which is stored by the first synchronization server and corresponds to the data model and the architecture model identification by combining the data model and the architecture model identification;
querying second data corresponding to the architecture model identification and stored by a second synchronous server according to the architecture model identification;
updating the second data to the first data.
6. The data synchronization method of claim 5, wherein the querying the second data corresponding to the architecture model identification stored by the second synchronization server according to the architecture model identification comprises:
inquiring a data model which is stored by a second synchronous server and corresponds to the architecture model identification according to the architecture model identification;
and querying second data stored by the second synchronous server and corresponding to the data model and the architecture model identification in combination with the data model and the architecture model identification.
7. A data synchronization system, the system comprising:
the task acquisition module is used for acquiring a task list, wherein the task list comprises at least one synchronous task carrying an architecture model identifier;
the first query module is used for querying first data which is stored by a first synchronous server and corresponds to the architecture model identification according to the architecture model identification; the first data is a plurality of data;
the first query module is specifically configured to query, according to the architecture model identifier of the synchronization task, a data model stored by a first synchronization server and corresponding to the architecture model identifier; querying first data, which is stored by the first synchronization server and corresponds to the data model and the architecture model identification, by combining the data model and the architecture model identification;
the export module is used for sending a synchronization request, the inquired first data and the architecture model identification to a second synchronization server;
the synchronization request is used for instructing the second synchronization server to query second data, which is stored by the second synchronization server and corresponds to the architecture model identifier, according to the architecture model identifier, and update the second data to the first data.
8. The data synchronization system of claim 7, further comprising:
and the task acquisition module is used for monitoring data updating of the first synchronization server, acquiring an architecture model identifier corresponding to the data updating when the data updating of the first synchronization server is monitored, and generating a synchronization task according to the acquired architecture model identifier.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201810981195.0A 2018-08-27 2018-08-27 Data synchronization method, system, computer device and readable storage medium Active CN109254997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810981195.0A CN109254997B (en) 2018-08-27 2018-08-27 Data synchronization method, system, computer device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810981195.0A CN109254997B (en) 2018-08-27 2018-08-27 Data synchronization method, system, computer device and readable storage medium

Publications (2)

Publication Number Publication Date
CN109254997A CN109254997A (en) 2019-01-22
CN109254997B true CN109254997B (en) 2020-12-11

Family

ID=65049656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810981195.0A Active CN109254997B (en) 2018-08-27 2018-08-27 Data synchronization method, system, computer device and readable storage medium

Country Status (1)

Country Link
CN (1) CN109254997B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112398882A (en) * 2019-08-12 2021-02-23 久瓴(江苏)数字智能科技有限公司 Multi-screen synchronization method, system, device, computer equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2184688A1 (en) * 2008-11-06 2010-05-12 Amadeus s.a.s Method of integrating in real time large volumes of updates in a database
CN106649378B (en) * 2015-11-02 2020-07-14 北大方正集团有限公司 Data synchronization method and device
CN106980625B (en) * 2016-01-18 2020-08-04 阿里巴巴集团控股有限公司 Data synchronization method, device and system
CN107301196A (en) * 2017-05-03 2017-10-27 北京小度信息科技有限公司 Method of data synchronization, device, equipment and monitoring server
CN107590207B (en) * 2017-08-24 2020-09-01 阿里巴巴集团控股有限公司 Data synchronization method and device and electronic equipment
CN107656970A (en) * 2017-08-31 2018-02-02 郑州云海信息技术有限公司 A kind of method of data synchronization, device and server
CN108228814B (en) * 2017-12-29 2022-02-15 泰康保险集团股份有限公司 Data synchronization method and device

Also Published As

Publication number Publication date
CN109254997A (en) 2019-01-22

Similar Documents

Publication Publication Date Title
CN110008118B (en) Page data testing method and device, computer equipment and storage medium
CN108769212B (en) Data synchronization method and device, computer equipment and storage medium
CN108834086B (en) Method and device for sending short message, computer equipment and storage medium
CN110753099B (en) Distributed cache system and cache data updating method
CN109460252B (en) Configuration file processing method and device based on git and computer equipment
CN111708586B (en) Application starting configuration item loading method and device, computer equipment and storage medium
CN108446172B (en) Data calling method and device, computer equipment and storage medium
CN111475376B (en) Method, apparatus, computer device and storage medium for processing test data
CN110555041A (en) Data processing method, data processing device, computer equipment and storage medium
CN110781214A (en) Database reading and writing method and device, computer equipment and storage medium
CN111159233B (en) Distributed caching method, system, computer equipment and storage medium
CN108965383B (en) File synchronization method and device, computer equipment and storage medium
CN109389299B (en) Workflow process deployment method, workflow process deployment device, computer equipment and storage medium
WO2022222438A1 (en) Profile state synchronization method and apparatus, terminal, server, and storage medium
CN112632375B (en) Session information processing method, server and storage medium
CN113094076A (en) Version iteration method, device, equipment and medium based on version control
CN111190609B (en) Service processing method, device, equipment and storage medium
CN108965450B (en) Service request response method, device, computer equipment and storage medium
CN110557398B (en) Service request control method, device, system, computer equipment and storage medium
CN109254997B (en) Data synchronization method, system, computer device and readable storage medium
CN109697112B (en) Distributed intensive one-stop operating system and implementation method
CN108389124B (en) Data processing method, data processing device, computer equipment and storage medium
CN110457614B (en) Data increment updating method and device for reducing data concurrency and computer equipment
CN112070585A (en) Order state unified management method and device, computer equipment and storage medium
CN113064732A (en) Distributed system and management method thereof

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