A data synchronization method, device and multi-level platform data synchronization system

By establishing secure tunnels between cross-level platforms and utilizing a timestamp-based incremental data synchronization algorithm, the problem of low data synchronization efficiency in cross-regional multi-level distributed platforms is solved, achieving efficient, stable, and reliable cross-regional data synchronization and ensuring data security and confidentiality.

CN115883583BActive Publication Date: 2025-11-21BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211335240.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-28
Publication Date
2025-11-21
Estimated Expiration
2042-10-28

AI Technical Summary

Technical Problem

Existing technologies cannot achieve efficient, stable, and reliable cross-regional data synchronization, especially in enterprise-level application software platforms that are deployed across regions and at multiple levels. They cannot meet the needs of diverse data types and require the introduction of external cloud storage or middleware.

Method used

By establishing a secure tunnel on the upper-level platform and using a timestamp-based incremental data synchronization algorithm, secure access and efficient synchronization of lower-level data service ports can be achieved, avoiding data ports from being exposed to the external network. Secure tunnel technology is used for data port forwarding, and timestamps are used to filter data to be synchronized, synchronizing only newly added or changed data.

Benefits of technology

It achieves efficient, stable, and reliable data synchronization across different platforms, improves synchronization efficiency, reduces reliance on external cloud storage and middleware, and ensures data security and confidentiality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883583B_ABST
    Figure CN115883583B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a data synchronization method, device and multi-level platform data synchronization system, and relates to the technical field of data synchronization. The method comprises the following steps: establishing a secure tunnel with a lower-level platform; receiving a data port service forwarded by the lower-level platform based on the secure tunnel; and synchronizing data from the lower-level platform based on the data port service and by using a timestamp-based incremental data synchronization algorithm. The method realizes efficient synchronization of ports across levels by forwarding data access ports based on secure tunnel technology, and solves the problem that existing methods cannot realize efficient, stable and reliable remote data synchronization requirements because other external cloud storage or middleware needs to be introduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data synchronization technology, and more specifically, to a data synchronization method, apparatus, and multi-level platform data synchronization system. Background Technology

[0002] With the rapid development of modern information technology and the increasing demand for cross-regional business data storage and retrieval, more and more enterprise application software platforms are adopting cross-regional multi-level distributed deployment solutions. Due to the diversity of business data sources, such as relational databases, NoSQL databases, files, and data channels, relying solely on external cloud storage solutions or message middleware cannot meet the growing demand for data types, and existing methods cannot achieve efficient, stable, and reliable cross-regional data synchronization. Summary of the Invention

[0003] The purpose of this application is to provide a data synchronization method, device, and multi-level platform data synchronization system. Based on secure tunnel technology, it forwards data access ports to achieve efficient cross-level port synchronization, solving the problem that existing methods require the introduction of other external cloud storage or middleware, thus failing to meet the requirements for efficient, stable, and reliable remote data synchronization.

[0004] This application provides a data synchronization method applied to a higher-level platform, the method comprising:

[0005] Establish a secure tunnel with the lower-level platform;

[0006] Based on the secure tunnel, the data port service forwarded by the lower-level platform is received;

[0007] Data is synchronized from the lower-level platform based on the data port service and using a timestamp-based incremental data synchronization algorithm.

[0008] In the above implementation process, by establishing a secure tunnel on the upper-level platform and forwarding the lower-level data service port based on the secure tunnel, secure access to the lower-level data port is realized. Furthermore, by using a timestamp-based incremental data synchronization algorithm, efficient synchronization of data between the upper and lower-level platforms is achieved. This solves the problem that existing methods require the introduction of other external cloud storage or middleware, thus failing to meet the requirements for efficient, stable, and reliable cross-regional data synchronization.

[0009] Furthermore, establishing a secure tunnel with the lower-level platform includes:

[0010] Receive the channel establishment request sent by the lower-level platform;

[0011] The lower-level platform is authenticated based on the established channel request;

[0012] If authentication is successful, a secure tunnel is established with the lower-level platform.

[0013] In the above implementation process, a secure tunnel is established through identity authentication, which ensures the security of data transmission through the data port and prevents the data port from being exposed to the external network.

[0014] Furthermore, the data port service for receiving data forwarded by the lower-level platform based on the secure tunnel includes:

[0015] Receive the port service list from the lower-level platform and register it locally;

[0016] Data is retrieved based on the registered data port.

[0017] In the above implementation process, the data port is restricted to local access and not exposed to the outside world, thus ensuring the security and concealment of the data port.

[0018] Furthermore, the method of synchronizing data from the lower-level platform using a timestamp-based incremental data synchronization algorithm includes:

[0019] Paginated query for data to be synchronized;

[0020] Record the timestamp of the last data entry on each page;

[0021] If the data to be synchronized is greater than one page, then query all data with the same timestamp and synchronize them.

[0022] Record the timestamp of the last piece of data to be synchronized, and use it as the data synchronization time point for the next data synchronization.

[0023] In the above implementation process, a timestamp-based incremental data synchronization algorithm was used to achieve efficient synchronization of the data to be synchronized. The first synchronization was a full synchronization, and subsequent synchronization was only performed on newly added or changed data, which improved the synchronization efficiency.

[0024] Furthermore, the paginated query data to be synchronized includes:

[0025] If this is not the first synchronization, then query data with timestamps greater than the data synchronization time point, and use that data as the data to be synchronized in the current iteration.

[0026] In the above implementation process, timestamps are used to filter out the data to be synchronized, so as to avoid data loss or duplication.

[0027] This application embodiment also provides a data synchronization device, the device comprising:

[0028] The secure tunnel establishment module is used to establish secure tunnels with lower-level platforms.

[0029] The port receiving module is used to receive data port services forwarded by the lower-level platform based on the secure tunnel;

[0030] The data synchronization module is used to synchronize data from the lower-level platform based on the data port service and using a timestamp-based incremental data synchronization algorithm.

[0031] In the above implementation process, by establishing a secure tunnel on the upper-level platform and forwarding the lower-level data service port based on the secure tunnel, secure access to the lower-level data port is realized. Furthermore, by using a timestamp-based incremental data synchronization algorithm, efficient synchronization of data between the upper and lower-level platforms is achieved. This solves the problem that existing methods require the introduction of other external cloud storage or middleware, thus failing to meet the requirements for efficient, stable, and reliable cross-regional data synchronization.

[0032] Furthermore, the secure tunnel establishment module includes:

[0033] The request receiving module is used to receive the channel establishment request sent by the lower-level platform;

[0034] The identity authentication module is used to authenticate the identity of the lower-level platform based on the established channel request;

[0035] The tunnel establishment module is used to establish a secure tunnel with the lower-level platform if authentication is successful.

[0036] In the above implementation process, a secure tunnel is established through identity authentication, which ensures the security of data transmission through the data port and prevents the data port from being exposed to the external network.

[0037] This application embodiment also provides a multi-level platform data synchronization system, the system comprising:

[0038] The primary platform is used to synchronize data with the secondary platform based on the aforementioned data synchronization method.

[0039] At least one secondary platform is used for data synchronization with multi-level platforms connected to the secondary platform;

[0040] At least one multi-level platform, including at least three levels, is used to report data ports to the corresponding secondary platforms to achieve data synchronization.

[0041] In the above implementation process, through multi-level deployment, the synchronization of data from all lower-level platforms can be completed, realizing multi-level data reporting.

[0042] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the data synchronization method described in any one of the above-described embodiments.

[0043] This application also provides a readable storage medium storing computer program instructions, which, when read and executed by a processor, perform the data synchronization method described in any one of the above-described embodiments. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 A flowchart illustrating a data synchronization method provided in an embodiment of this application;

[0046] Figure 2 A flowchart illustrating the establishment of a secure tunnel is provided for embodiments of this application.

[0047] Figure 3 A flowchart illustrating the specific implementation of data synchronization provided in this application's embodiments;

[0048] Figure 4 A flowchart illustrating the data port acquisition process provided in this application embodiment;

[0049] Figure 5 A data synchronization flowchart provided for embodiments of this application;

[0050] Figure 6 A flowchart of a timestamp-based incremental data synchronization algorithm provided for embodiments of this application;

[0051] Figure 7 This is a structural block diagram of a data synchronization device provided in an embodiment of this application;

[0052] Figure 8 A structural block diagram of another data synchronization device provided in the embodiments of this application;

[0053] Figure 9 This application provides a data synchronization device based on SSH secure tunnel technology.

[0054] Figure 10 This is a structural block diagram of a multi-level platform data synchronization system provided in an embodiment of this application.

[0055] icon:

[0056] 100-Secure Tunnel Establishment Module; 101-Request Receiving Module; 102-Identity Authentication Module; 103-Tunnel Establishment Module; 200-Port Receiving Module; 201-Registration Module; 202-Data Retrieval Module; 300-Data Synchronization Module; 301-Pagination Query Module; 302-Recording Module; 303-Data Query Module; 304-Data Synchronization Time Point Recording Module. Detailed Implementation

[0057] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0058] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0059] Example 1

[0060] Please refer to Figure 1 , Figure 1 A flowchart illustrating a data synchronization method provided in this application embodiment. This method is applied to a higher-level platform and specifically includes the following steps:

[0061] Step S100: Establish a secure tunnel with the lower-level platform;

[0062] Step S200: Receive data port services forwarded by the lower-level platform based on the secure tunnel;

[0063] Step S300: Synchronize data from the lower-level platform based on the data port service and using a timestamp-based incremental data synchronization algorithm.

[0064] By establishing a secure tunnel on the upper-level platform and forwarding the lower-level data service ports based on the secure tunnel, secure access to the lower-level data ports is achieved. Furthermore, an incremental data synchronization algorithm based on timestamps is used to achieve efficient synchronization of data between the upper and lower-level platforms. This solves the problem that existing methods require the introduction of other external cloud storage or middleware, thus failing to meet the requirements for efficient, stable, and reliable cross-regional data synchronization.

[0065] Among them, such as Figure 2 The flowchart shown illustrates the establishment of a secure tunnel. Step S100 may specifically include the following steps:

[0066] Step S101: Receive the channel establishment request sent by the lower-level platform;

[0067] Step S102: Authenticate the identity of the lower-level platform based on the established channel request;

[0068] Step S103: If authentication is successful, a secure tunnel is established with the lower-level platform.

[0069] like Figure 3 The diagram shows the specific implementation flowchart of data synchronization. When the upper-level platform starts up, it establishes a secure tunnel server and starts the service registry, waiting for the lower-level platform to establish a connection.

[0070] The lower-level platform initiates a channel establishment request to the upper-level platform. After starting up, the lower-level platform receives the manually configured address and service port of the upper-level platform, and then sends a secure channel establishment request to the upper-level platform along with its identity information.

[0071] Identity authentication involves the upper-level platform verifying the identity information of the lower-level platform. If the verification fails, the connection request to the lower-level platform is disconnected. If the verification is successful, a secure tunnel is established.

[0072] When establishing a secure tunnel between upper and lower level platforms, the specific type of tunnel depends on the server-side technical implementation and is not limited here.

[0073] like Figure 4 The diagram shown is a flowchart for data port acquisition. Step S200 may specifically include:

[0074] Step S201: Receive the port service list from the lower-level platform and register it locally;

[0075] Step S202: Retrieve data based on the registered data port.

[0076] The lower-level platform forwards its own data port service list (data port) to the upper-level platform through a secure tunnel. The upper-level platform forwards the registration center service port to its local machine and then adds the service port description information it reported to the registration center by accessing the registration center service that was forwarded to its local machine.

[0077] The service ports of the registration center on the upper-level platform and the data port service lists reported by the lower-level platform are all restricted to local access (such as 127.0.0.1) and do not need to be exposed to the outside world, which fully ensures the security and concealment of the data ports.

[0078] The upper-level platform retrieves data by forwarding it to the local data port. The upper-level platform can obtain the list of data port services that have been reported to this level platform by accessing its own platform's registration center.

[0079] Data can be retrieved based on the forwarded data port. The calling method varies depending on the port service type. For example, if the reported service is an RPC (Remote Procedure Call) port, a corresponding client is used for connection. If it is a database port service, JDBC (Java Database Connectivity) can be used to pull data. If it is a WebSocket (a long-connection protocol for full-duplex communication over a single TCP connection), a corresponding client can also be used to retrieve data.

[0080] Synchronizing data using a timestamp-based incremental synchronization algorithm would incur significant resource and time overhead due to the full data synchronization process. In contrast, the timestamp-based incremental synchronization algorithm only performs a batch full synchronization on the first attempt, and then only synchronizes newly added or changed data, greatly improving synchronization efficiency.

[0081] like Figure 5 The diagram shown is a data synchronization flowchart. Step S300 may specifically include the following steps:

[0082] Step S301: Query the data to be synchronized in pages;

[0083] Step S302: Record the timestamp of the last piece of data to be synchronized on each page;

[0084] Step S303: If the data to be synchronized is greater than 1 page, then query all data with the same timestamp and synchronize them;

[0085] like Figure 6 The diagram shows the flowchart of the incremental data synchronization algorithm based on timestamps. A timestamp is the creation or update time of the last piece of data on the page.

[0086] Step S304: Record the timestamp of the last piece of data to be synchronized, and use it as the data synchronization time point for the next data synchronization.

[0087] Each time data is successfully synchronized, the upper-level platform records the data synchronization time (the update time of the last piece of data). The next synchronization request will query data with timestamps greater than this time. At this time, if there is data on the second page with the same update time as the last piece of data on the first page, it will be excluded, resulting in data synchronization loss. Therefore, when the data to be synchronized is greater than one page, it is necessary to query all records on subsequent pages with the same timestamp as the last piece of data on the first page.

[0088] The synchronization record contains the synchronization status and the last synchronization time, which is the update time of the last piece of data. Subsequent data synchronization will be queried based on this time.

[0089] For paginated queries of data to be synchronized, there are two scenarios:

[0090] The first approach is to query all data to be synchronized if it is the first time synchronizing.

[0091] The second approach is to query data whose timestamps are greater than the data synchronization time point if it is not the first synchronization. This data will then be used as the data to be synchronized in the current iteration.

[0092] The data synchronization time point is the creation or update time of the last data when the last synchronization was completed. This query retrieves data with a timestamp greater than the data synchronization time point to ensure that previously synchronized data is not synchronized repeatedly. If there is no previous synchronization record (first synchronization), it can be omitted, and all records will be queried.

[0093] Pagination sorting criteria: Ensure the sorting order is fixed, using (synchronization time + creation time + UUID) for sorting.

[0094] Synchronization time: The time it takes for this data to be synchronized from the lower-level platform.

[0095] Creation time: The actual creation time or update time of this data.

[0096] Uuid: The unique identifier of this data.

[0097] By establishing secure tunnels between upper and lower level platforms and forwarding data service ports between them based on these secure tunnels, secure access to upper and lower level data ports is achieved. Efficient synchronization of data between upper and lower level platforms is achieved through a timestamp-based incremental data synchronization algorithm. Furthermore, no other external cloud storage or middleware devices are introduced into the technical architecture, reducing the cost and complexity of multi-level data synchronization.

[0098] Example 2

[0099] This application provides a data synchronization device applied to the data synchronization method described in embodiment 1, such as... Figure 7 The diagram shown is a structural block diagram of a data synchronization device, which includes, but is not limited to:

[0100] The secure tunnel establishment module 100 is used to establish a secure tunnel with the lower-level platform.

[0101] Port receiving module 200 is used to receive data port services forwarded by the lower-level platform based on the secure tunnel;

[0102] The data synchronization module 300 is used to synchronize data from the lower-level platform based on the data port service and using a timestamp-based incremental data synchronization algorithm.

[0103] By establishing a secure tunnel on the upper-level platform and forwarding the lower-level data service ports based on the secure tunnel, secure access to the lower-level data ports is achieved. Furthermore, an incremental data synchronization algorithm based on timestamps is used to achieve efficient synchronization of data between the upper and lower-level platforms. This enables efficient, stable, and reliable cross-regional data synchronization, solving the problem that existing methods require the introduction of other external cloud storage or middleware, thus failing to meet the requirements for efficient, stable, and reliable cross-regional data synchronization.

[0104] like Figure 8 The diagram shown is a structural block diagram of another data synchronization device, wherein the secure tunnel establishment module 100 includes:

[0105] The request receiving module 101 is used to receive the channel establishment request sent by the lower-level platform;

[0106] The identity authentication module 102 is used to authenticate the identity of the lower-level platform based on the established channel request;

[0107] The tunnel establishment module 103 is used to establish a secure tunnel with the lower-level platform if the authentication is successful.

[0108] By establishing a secure tunnel through identity authentication, the security of data transmission through the data port is ensured, and the data port is prevented from being exposed to the external network.

[0109] The port receiving module 200 includes, but is not limited to:

[0110] The registration module 201 is used to receive the port service list of the lower-level platform and register it locally;

[0111] The data retrieval module 202 is used to retrieve data based on the registered data port.

[0112] In a secure tunnel, data synchronization is achieved through a data port, enhancing the security and confidentiality of the data port.

[0113] The data synchronization module 300 includes:

[0114] The pagination query module 301 is used for pagination query of data to be synchronized.

[0115] If this is not the first synchronization, then query data with timestamps greater than the data synchronization time point, and use that data as the data to be synchronized in the current iteration.

[0116] Recording module 302 is used to record the timestamp of the last piece of data on each page;

[0117] The data query module 303 is used to query all data with the same timestamp and synchronize them if the data to be synchronized is greater than 1 page.

[0118] The data synchronization time point recording module 304 is used to record the timestamp of the last piece of data to be synchronized, and use it as the data synchronization time point for the next data synchronization.

[0119] Synchronizing data using a timestamp-based incremental synchronization algorithm would incur significant resource and time overhead due to the full data synchronization process. In contrast, the timestamp-based incremental synchronization algorithm only performs a batch full synchronization on the first attempt, and then only synchronizes newly added or changed data, greatly improving synchronization efficiency.

[0120] For example, such as Figure 9 As shown, this is a data synchronization device based on SSH secure tunnel technology. SSH, or SecureShell, is a security protocol built on the application layer. It is relatively reliable and is a protocol specifically designed to provide security for remote login sessions and other network services.

[0121] The upper-level platform consists of three components: an SSH server, a registration center, and a data synchronization mechanism; the lower-level platform consists of three components: an SSH client, a registration service, and a data service port, as detailed below:

[0122] The SSH server is primarily responsible for enabling tunnel service listening, which is used to receive requests from lower-level platforms to establish secure tunnel connections.

[0123] The SSH client is primarily responsible for establishing a secure tunnel with the SSH server on the parent platform. After successfully establishing the secure tunnel, it forwards the local data port service (port) to the parent platform and forwards the service registry port of the parent platform to this platform for reporting service information.

[0124] The registry center component is used to receive and maintain the list of port services registered by lower-level platforms to the upper-level platform.

[0125] The registration service component is used to report the service types and target ports reported by this platform to the registration center of the superior platform.

[0126] The data synchronization component retrieves incremental data based on timestamps and stores it on the local platform by registering the data port with the lower-level platform, thus completing the data synchronization task of the lower-level platform.

[0127] The data service port is used to retrieve data records from the local platform, and is called by the upper-level platform through the forwarded port.

[0128] By establishing secure tunnels between upper and lower level platforms and forwarding data service ports through these tunnels, secure access to upper and lower level data interfaces is achieved. A timestamp-based incremental data synchronization algorithm enables efficient data synchronization between upper and lower level platforms without the need for external storage or middleware. This solves the problem that existing methods require external cloud storage or middleware, thus failing to meet the requirements for efficient, stable, and reliable cross-regional data synchronization.

[0129] This application also provides a multi-level platform data synchronization system, such as... Figure 10 The diagram shown is a structural block diagram of a multi-level platform data synchronization system, which includes:

[0130] A primary platform is used to synchronize data with a secondary platform based on the data synchronization method described in Example 1.

[0131] At least one secondary platform is used for data synchronization with multi-level platforms connected to the secondary platform;

[0132] At least one multi-level platform, including at least three levels, is used to report data ports to the corresponding secondary platforms to achieve data synchronization.

[0133] Figure 10 The three-level platforms 3a and 3b report data to the second-level platform 2a, and the second-level platform 2a reports data to the first-level platform. The first-level platform realizes data synchronization and obtains all data from all levels of platforms. Moreover, the platforms at all levels can be geographically connected, thus realizing secure access across levels and regions.

[0134] In a multi-level deployment scenario, each platform only needs to report its own data port to the upper-level platform, and the upper-level platform's synchronization service will synchronize the data to the local machine. Based on this mode, the synchronization task of all lower-level platform data can be completed in the end.

[0135] Secure data access is achieved across levels (regions) through data access port forwarding based on secure tunneling technology; efficient data synchronization is achieved through timestamp-based incremental data synchronization algorithms; and multi-level data reporting is achieved through a multi-level deployment architecture.

[0136] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the data synchronization method described in any one of the above-described embodiments.

[0137] This application also provides a readable storage medium storing computer program instructions, which, when read and executed by a processor, perform the data synchronization method described in any one of the above-described embodiments.

[0138] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0139] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0140] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0141] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0142] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0143] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A data synchronization method, characterized in that, Applied to a higher-level platform, the method includes: Establish a secure tunnel with the lower-level platform; Based on the secure tunnel, the data port service forwarded by the lower-level platform is received; Based on the data port service and using a timestamp-based incremental data synchronization algorithm, data is synchronized from the lower-level platform. Specifically: the data to be synchronized is queried in pages; the timestamp of the last data item on each page is recorded; if the data to be synchronized is more than one page, all data with the same timestamp are retrieved and synchronized; the timestamp of the last data item to be synchronized is recorded and used as the data synchronization time point for the next data synchronization.

2. The data synchronization method according to claim 1, characterized in that, The establishment of a secure tunnel with the lower-level platform includes: Receive the channel establishment request sent by the lower-level platform; The lower-level platform is authenticated based on the established channel request; If authentication is successful, a secure tunnel is established with the lower-level platform.

3. The data synchronization method according to claim 1, characterized in that, The data port service for receiving data forwarded by the lower-level platform based on the secure tunnel includes: Receive the port service list from the lower-level platform and register it locally; Data is retrieved based on the registered data port.

4. The data synchronization method according to claim 1, characterized in that, The method further includes: If this is not the first synchronization, then query data with timestamps greater than the data synchronization time point, and use that data as the data to be synchronized in the current iteration.

5. A data synchronization device, characterized in that, The device includes: The secure tunnel establishment module is used to establish secure tunnels with lower-level platforms. The port receiving module is used to receive data port services forwarded by the lower-level platform based on the secure tunnel; The data synchronization module is used to synchronize data from the lower-level platform based on the data port service and using a timestamp-based incremental data synchronization algorithm. Specifically, it performs the following steps: page-based query for data to be synchronized; records the timestamp of the last data item on each page; if the data to be synchronized is greater than one page, it queries and synchronizes all data with the same timestamp; and records the timestamp of the last data item to be synchronized, which is used as the data synchronization time point for the next data synchronization.

6. The data synchronization device according to claim 5, characterized in that, The secure tunnel establishment module includes: The request receiving module is used to receive the channel establishment request sent by the lower-level platform; The identity authentication module is used to authenticate the identity of the lower-level platform based on the established channel request; The tunnel establishment module is used to establish a secure tunnel with the lower-level platform if authentication is successful.

7. A multi-level platform data synchronization system, characterized in that, The system includes: A primary platform is used to achieve data synchronization with a secondary platform based on the data synchronization method described in any one of claims 1-4; At least one secondary platform is used for data synchronization with multi-level platforms connected to the secondary platform; At least one multi-level platform, including at least three levels, is used to report data ports to the corresponding secondary platforms to achieve data synchronization.

8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the data synchronization method according to any one of claims 1 to 4.

9. A readable storage medium, characterized in that, The readable storage medium stores computer program instructions, which, when read and executed by a processor, perform the data synchronization method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Data backup system and method

    CN106790446A

  • Platform data management method and system, computer and readable storage medium

    CN113965365A

  • Data synchronization method and related product

    CN114157677A