Cross-border data synchronization method and device, nonvolatile storage medium and electronic equipment

By using trigger mechanisms and data synchronization logs in the database, cross-border data synchronization is achieved efficient, secure and compliant with cross-border data synchronization, solving the problems of inefficiency, high security risks and compliance challenges in traditional methods.

CN120075242APending Publication Date: 2025-05-30AISINO CORPORATION
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411864926.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The traditional cross-border data synchronization method has problems such as low data transmission efficiency, high security risks, compliance challenges and waste of resources.

Method used

Through the database trigger mechanism, a database synchronization log is created. Users can selectively synchronize designated data and formulate data filtering rules according to their own data protection laws and regulations. When the synchronization conditions are met, the local database accesses the data synchronization log of the target database through the network to complete data synchronization.

Benefits of technology

It realizes efficient and secure transmission of cross-border data synchronization, ensures that the data synchronization process complies with the data protection regulations of various countries, reduces legal risks, and reduces resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075242A_ABST
    Figure CN120075242A_ABST
Patent Text Reader

Abstract

The invention provides a cross-border data synchronization method and device, a nonvolatile storage medium and electronic equipment, and the method comprises the steps: setting a local server synchronization database in a local server, and receiving cross-border data needing to be synchronized; the method comprises the following steps: acquiring data tables needing to be synchronized and fields needing to be synchronized in each data table needing to be synchronized according to business requirements and related requirements of a national data method; creating a dynamic database log, and granting an accessible permission to a synchronous database user; creating a trigger for recording data change for each data table needing to be synchronized; setting a triggering condition of cross-border data synchronization in the local server; when the triggering condition of the cross-border data synchronization is met, executing the cross-border data synchronization; and recording a cross-border data synchronization log to a local server synchronization database, thereby realizing efficient and safe cross-border data synchronization according with the national data protection method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data synchronization, and in particular, to a method, device, non-volatile storage medium, and electronic device for cross-border data synchronization. Background Art

[0002] With the development of globalization and the Internet, activities such as cross-border e-commerce, telecommuting, and international cooperation have become increasingly frequent, and a large amount of data generated by these activities needs to be synchronized between servers in different countries or regions.

[0003] The traditional data synchronization method has the following problems:

[0004] 1. The data transmission efficiency is low, especially in the cross-border network environment.

[0005] 2. There are security risks during data transmission, such as being intercepted or tampered with.

[0006] 3. Due to national security considerations and differences in data protection regulations in different countries, data synchronization faces compliance challenges.

[0007] 4. The traditional method of synchronizing the entire database table contains a large amount of invalid data, resulting in low data transmission effectiveness, wasting a large amount of network resources and storage resources, and causing a sharp increase in operating costs. Summary of the Invention

[0008] The purpose of this application is to use the trigger mechanism of the database to create a database synchronization log through a special algorithm. Users can selectively synchronize specified data according to business needs and can formulate data filtering rules according to the rules of the local data protection law, and finally form a data synchronization log. When the data synchronization condition (such as time period, time point, or data volume) is triggered, the local database will start the data synchronization service, access the data synchronization log in the target database through the network, and complete the data synchronization according to the log record. It realizes the efficient and secure transmission of data and ensures that the data synchronization process complies with the data protection regulations of each country.

[0009] According to one aspect of the embodiments of the present invention, a method for cross-border data synchronization is provided, including: setting up a local server synchronization database on the local server for receiving cross-border data to be synchronized; obtaining the data tables to be synchronized and the fields to be synchronized in each of the data tables to be synchronized according to business requirements and relevant requirements of the domestic data law; creating a dynamic database log and granting access rights to the synchronization database user; creating a trigger for recording data changes for each of the data tables to be synchronized; setting the trigger condition for the cross-border data synchronization on the local server; when the trigger condition for the cross-border data synchronization is met, performing the cross-border data synchronization; and recording the cross-border data synchronization log into the local server synchronization database.

[0010] Optionally, the setting up a local server synchronization database on the local server includes: defining the address, port, user, password, and data instance of the target server.

[0011] Optionally, the creating a trigger for recording data changes for each of the data tables to be synchronized includes: creating a data addition trigger for the data table; creating a data modification trigger for the data table; and creating a data deletion trigger for the data table.

[0012] Optionally, the setting the trigger condition for the cross-border data synchronization on the local server includes: a time point or a periodic time point.

[0013] Optionally, the performing the cross-border data synchronization when the trigger condition for the cross-border data synchronization is met includes: the local server accessing the data dynamic log table in the target database through the network; comparing the target database timestamp with the corresponding time field value in the table in the target database, obtaining all records before the current time, and parsing the corresponding values in each record.

[0014] According to another aspect of the embodiments of the present invention, a cross-border data synchronization device is further provided, including: a setting module for setting up a local server synchronization database on the local server to receive cross-border data to be synchronized; an obtaining module for obtaining the data tables to be synchronized and the field information to be synchronized in each of the data tables to be synchronized according to business requirements and relevant requirements of the domestic data law; a creating module for creating a dynamic database log and granting access rights to the synchronization database user; a trigger creating module for creating a trigger for recording data changes for each of the data tables to be synchronized; a setting trigger condition module for setting the trigger condition for the cross-border data synchronization on the local server; an executing module for performing the cross-border data synchronization when the trigger condition for the cross-border data synchronization is met; and a recording module for recording the cross-border data synchronization log into the local server synchronization database.

[0015] Optionally, the trigger creation module includes: a data addition trigger creation module, a data modification trigger creation module, and a data deletion trigger creation module.

[0016] Optionally, the execution module is used for the local server to access the data dynamic log table in the target database through the network; compare the target database timestamp with the corresponding time field value of the table in the target database, obtain all records before the current time, and parse the corresponding values in each record.

[0017] According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium for storing a program, wherein when the program runs, it controls the device where the non-volatile storage medium is located to execute the above-mentioned cross-border data synchronization method.

[0018] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a memory and a processor, the processor is used to run the program stored in the processor, wherein when the program runs, it executes the above-mentioned cross-border data synchronization method.

[0019] Compared with the prior art, the advantages of the present application are as follows:

[0020] 1. Through the database dynamic log method, the "minimization" of cross-border data synchronization is realized, the efficiency of cross-border data synchronization is improved, and resource consumption is effectively reduced.

[0021] 2. By means of data table authorization and dynamic data logs, it is ensured that only the recorded data can be synchronized, protecting the security of the original data.

[0022] 3. Ensure that the data synchronization process complies with the data protection regulations of various countries, reducing legal risks.

[0023] 4. It is not restricted by the database type and can achieve cross-type data synchronization. Description of the Drawings

[0024] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and the illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:

[0025] Figure 1 is a flowchart of a cross-border data synchronization method according to an embodiment of the present invention;

[0026] Figure 2 is a command processing flowchart according to an embodiment of the present invention;

[0027] Figure 3 is a schematic diagram of a cross-border data synchronization device according to an embodiment of the present invention;

[0028] Figure 4 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. Detailed implementation manners

[0029] In order to enable those skilled in the art of the present technology to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.

[0030] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data used in appropriate cases can be interchanged so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0031] According to an embodiment of the present invention, a method embodiment for cross-border data synchronization is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from here.

[0032] This application makes special settings by using the triggers of the database, creates cross-border database synchronization logs. Users can selectively synchronize specified data according to business needs and can formulate data filtering rules according to the rules of the data protection law of their own country. Then, according to the dynamic database logs, the cross-border data that needs to be synchronized in the target database is synchronized to the local server synchronization database.

[0033] See Figure 1 , the method for cross-border data synchronization is as follows:

[0034] In S101, database setting. Set the local server synchronization database on the local server to receive the cross-border data that needs to be synchronized, and define the address, port, user, password, and data instance of the target server.

[0035] In S102, set the trigger. Specifically, first delimit the data scope. According to business needs and relevant requirements of the national data law, obtain the data tables to be synchronized and the fields to be synchronized in each data table to be synchronized. Follow the "minimum scope principle" to clarify the data scope to be synchronized and reduce the network resource consumption of data synchronization.

[0036] In S103, create a dynamic database log (e.g., data_logs) and grant access permission to the synchronization database user (e.g., Sync_user):

[0037] GRANT ALL PRIVILEGES ON my_database.data_logs TO 'Sync_user'@'localhost';

[0038] The fields of the dynamic database log data_logs are as follows:

[0039] xid operation TB operate_time operate_id operate_params

[0040] In S104, create a trigger for each data table to be synchronized to record data changes. Specifically, assume that the database table Table_A is a user table and its data fields are as follows:

[0041] id name phone email Address profession

[0042] Then:

[0043] Create a data insertion trigger for Table_A:

[0044] / / data_logs data dynamic log

[0045] CREATE TRIGGER Table_A_insert_trigger

[0046] AFTER INSERT ON Table_A

[0047] FOR EACH ROW

[0048] BEGIN

[0049] INSERT INTO data_logs(id,operation,TB,operate_time,operate_id,operate_params) VALUES(NULL,'insert','Table_A',NOW(),new.id,CONCAT('Insert: id=',NEW.id,',name=',NEW.name,',phone=',LEFT(NEW.phone,6)+xxxxx,',email=',NEW.email,',profession=',NEW.profession,'));

[0050] END;

[0051] Note: When a new data is added to the data table Table_A in the target database, a data record is added to the data_logs (dynamic data log table) in the target database. Among them, the phone field contains the phone number. To comply with local data security laws, the first 6 digits are automatically taken and replaced by 5 "x". The Address field is the address field and belongs to the privacy field, and the database log does not collect it.

[0052] Create a data modification trigger for Table_A:

[0053] CREATE TRIGGER Table_A_update_trigger

[0054] AFTER UPDATE ON Table_A

[0055] FOR EACH ROW

[0056] BEGIN

[0057] INSERT INTO user_logs(id,operation,TB,operate_time,operate_id,operate_params) VALUES(NULL,'update','Table_A',NOW(),NEW.id,CONCAT('Update: id=',NEW.id,',name=',NEW.name,',phone=',LEFT(NEW.phone,6)+xxxxx,',email=',NEW.email,',profession=',NEW.profession,'));

[0058] END;

[0059] Description: After the data in the data table Table_A in the target database is updated, a data record is added to the data_logs (dynamic data log table) in the target database. Among them, the phone field contains the phone number. According to the Data Security Law, the first 6 digits are automatically taken and replaced with 5 "x". The Address field is the address field and belongs to the privacy field, so the database log does not collect it.

[0060] Create a data deletion trigger for Table_A:

[0061] CREATE TRIGGER Table_A_delete_trigger

[0062] AFTER DELETE ON Table_A

[0063] FOR EACH ROW

[0064] BEGIN

[0065] INSERT INTO data_logs(id,operation,TB,operate_time,perate_id,operate_params) VALUES(NULL,'delete','Table_A',NOW(),new.id,CONCAT('Delete: id=',OLD.id,',name=',OLD.name,',phone=',LEFT(OLD.phone,6)+xxxxx,',email=',OLD.email,',profession=',OLD.profession,''));

[0066] END;

[0067] In S105, set the data synchronization conditions. Set the trigger conditions for cross-border data synchronization on the local server, which can be periodic or at a specific time point.

[0068] In S106, perform cross-border data synchronization. When the cross-border data synchronization condition is triggered, the local server accesses the data dynamic log table data_logs in the target database through the network. Compare the local timestamp (considering the time difference factor, it needs to be based on the target database time) with the value of the operate_time field in the data_logs table in the target database to obtain all records before the current time, and parse the value of operation in each record. Continuing with Table_A as an example:

[0069] When Operation = "insert", obtain the field information in TB as "Table_A". According to the content in operate_params, the standard SQL statement can be parsed as:

[0070] INSERT INTO Table_A(id,name,phone,email,profession)VALUES('id','name','phone','email','profession');

[0071] When Operation = "updata", obtain the field information in TB as "Table_A". According to the content in operate_params, the standard SQL statement can be parsed as:

[0072] UPDATE Table_A SET Table_A.name = name,Table_A.phone = phone,Table_A.email = email,Table_A.profession = profession WHERE Table_A.id = data_logs.perate_id;

[0073] When Operation = "delete", obtain the field information in TB as "Table_A". According to the content in operate_params, the standard SQL statement can be parsed as:

[0074] Delete Table_A where Table_A.id = data_logs.perate_id;

[0075] To prevent the data retrieval speed of the data_logs table from decreasing due to excessive data volume, for each successfully replicated record in data_logs, the corresponding record will be deleted.

[0076] In S107, the data synchronization is completed. After the cross-border data synchronization is executed, the synchronization database in the local server will record the data synchronization log, including: the number of synchronizations this time, the operation date, the target database information, etc.

[0077] The beneficial technical effects of this application are as follows: realizing record-level and field-level data synchronization, improving the refinement degree of data synchronization; the cross-border data synchronization process complies with the data protection regulations of each country; reducing network and storage resource consumption, and improving data synchronization efficiency.

[0078] See Figure 2 , which is the command processing flow chart of the embodiment of the present invention. Among them, fromFigure 1 It can be seen that in S101, a local server synchronization database is set up on the local server to receive cross-border data that needs to be synchronized, and it is executed through command processing flows 201 for local service and database settings and 202 for target server and database settings; in S102, according to business requirements and relevant requirements of the national data law, the data tables that need to be synchronized and the fields that need to be synchronized in each of the data tables that need to be synchronized are obtained; in S103, a dynamic database log is created, and access permissions are granted to the synchronization database user; and in S104, a trigger for recording data changes is created for each of the data tables that need to be synchronized, and it is executed through command processing flow 203 for trigger settings; in S105, the trigger condition for cross-border data synchronization is set on the local server and is executed through command processing flow 204 for data synchronization condition settings, where the trigger condition can be a time point or a periodic time point; in S106, when the trigger condition for cross-border data synchronization is met, the cross-border data synchronization is executed through command processing flow 205 for data synchronization execution; in S107, the cross-border data synchronization log is recorded into the local server synchronization database and is executed through command processing flow 206 for data synchronization completion. Among them, in the execution of command processing flow 203 for trigger settings, it also includes: command processing flow 2031 for selecting a data range; 2032 for dynamic data log authorization; 2033 for creating a trigger for the data within the data range. In the execution of command processing flow 205 for data synchronization, it also includes: 2051 for parsing SQL statements; 2052 for executing SQL; 2053 for updating the dynamic data log.

[0079] Compared with the prior art, the advantages of this application are as follows:

[0080] 1. Through the database dynamic log method, the "minimization" of cross-border data synchronization is achieved, the efficiency of cross-border data synchronization is improved, and resource consumption is effectively reduced.

[0081] 2. Through the methods of data table authorization and dynamic data log, it is ensured that only the recorded data can be synchronized, protecting the security of the original data.

[0082] 3. It ensures that the data synchronization process complies with the data protection regulations of each country, reducing legal risks.

[0083] 4. It is not restricted by the database type and can achieve cross-type data synchronization.

[0084] Figure 3 It is a schematic diagram of a cross-border data synchronization device according to an embodiment of the present invention. As Figure 3As shown, the device 300 may include: a setting module 301 for setting a local server synchronization database in the local server to receive cross-border data that needs to be synchronized; an obtaining module 302 for obtaining data tables that need to be synchronized and field information that needs to be synchronized in each of the data tables that need to be synchronized according to business requirements and relevant requirements of the domestic data law; a creating module 303 for creating a dynamic database log and granting access permissions to the synchronization database user; a trigger creating module 304 for creating a trigger for recording data changes for each of the data tables that need to be synchronized; a setting trigger condition module 305 for setting a trigger condition for cross-border data synchronization in the local server; an executing module 306 for executing cross-border data synchronization when the trigger condition for cross-border data synchronization is met; and a recording module 307 for recording cross-border data synchronization logs into the local server synchronization database.

[0085] It should be noted that the setting module 301 in this embodiment may be used to execute step S101 in the embodiment of the present application, the obtaining module 302 in this embodiment may be used to execute step S102 in the embodiment of the present application, the creating module 303 in this embodiment may be used to execute step S103 in the embodiment of the present application, the trigger creating module 304 in this embodiment may be used to execute step S104 in the embodiment of the present application, the setting trigger condition module 305 in this embodiment may be used to execute step S105 in the embodiment of the present application, the executing module 306 in this embodiment may be used to execute step S106 in the embodiment of the present application, and the recording module 307 in this embodiment may be used to execute step S107 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in the above embodiments.

[0086] In the embodiment of the present invention, the trigger creating module 304 includes: a data addition trigger creating module 3041, a data modification trigger creating module 3042, and a data deletion trigger creating module 3043.

[0087] As an optional embodiment, the executing module 306 may also be used for the local server to access a data dynamic log table in the target database through the network; compare the target database timestamp with the corresponding time field value of the table in the target database, obtain all records before the current time, and parse the corresponding values in each record.

[0088] The embodiment of the present invention may provide a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the above computer terminal may also be replaced with a terminal device such as a mobile terminal.

[0089] Optionally, in this embodiment, the above computer terminal may be at least one network device among multiple network devices of a computer network.

[0090] In this embodiment, the above computer terminal may execute the program code of the following steps in the data processing method: setting up a local server synchronization database on the local server for receiving cross-border data to be synchronized; obtaining the data tables to be synchronized and the fields to be synchronized in each data table to be synchronized according to business requirements and relevant requirements of the domestic data law; creating a dynamic database log and granting access permissions to the synchronization database user; creating a trigger for recording data changes for each data table to be synchronized; setting a trigger condition for cross-border data synchronization on the local server; when the trigger condition for cross-border data synchronization is met, performing cross-border data synchronization; and recording the cross-border data synchronization log into the local server synchronization database.

[0091] Optionally, Figure 4 is a structural block diagram of a computer terminal according to an embodiment of the present invention. As Figure 4 shown, the computer terminal 40 may include: one or more (only one is shown in the figure) processors 42 and a memory 44.

[0092] Among them, the memory may be used to store software programs and modules, such as the program instructions / modules corresponding to the cross-border data synchronization method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the above data synchronization method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory may further include a memory remotely set relative to the processor, and these remote memories may be connected to the terminal 40 through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and their combinations.

[0093] The processor may call the information and application programs stored in the memory through a transmission device to execute the following steps:

[0094] Setting up a local server synchronization database on the local server for receiving cross-border data to be synchronized; obtaining the data tables to be synchronized and the fields to be synchronized in each data table to be synchronized according to business requirements and relevant requirements of the domestic data law; creating a dynamic database log and granting access permissions to the synchronization database user; creating a trigger for recording data changes for each data table to be synchronized; setting a trigger condition for cross-border data synchronization on the local server; when the trigger condition for cross-border data synchronization is met, performing cross-border data synchronization; and recording the cross-border data synchronization log into the local server synchronization database.

[0095] Optionally, the above-mentioned processor may also execute program codes of the following steps: create a data addition trigger for the data table; create a data modification trigger for the data table; and create a data deletion trigger for the data table.

[0096] Optionally, the above-mentioned processor may also execute program codes of the following steps: the local server accesses the data dynamic log table in the target database through the network; compare the target database timestamp with the corresponding time field value of the table in the target database, obtain all records before the current time, and parse the corresponding values in each record.

[0097] Those of ordinary skill in the art can understand that Figure 4 The structure shown is only illustrative, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and terminal devices such as Mobile Internet Devices (MID), PAD, etc. Figure 4 It does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 40 may further include more or fewer components (such as a network interface, a display device, etc.) than those shown in Figure 4 or have a different configuration from that shown in Figure 4

[0098] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium. The non-volatile storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.

[0099] The embodiment of the present invention also provides a non-volatile storage medium. Optionally, in this embodiment, the above-mentioned non-volatile storage medium may be used to save the program codes executed by the data processing method provided in the above embodiment.

[0100] Optionally, in this embodiment, the above-mentioned non-volatile storage medium may be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0101] ​Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: setting up a local server synchronization database on the local server for receiving cross-border data to be synchronized; obtaining the data tables to be synchronized and the fields to be synchronized in each data table to be synchronized according to business requirements and relevant requirements of the domestic data law; creating a dynamic database log and granting access permissions to the synchronization database user; creating a trigger for recording data changes for each data table to be synchronized; setting up a trigger condition for cross-border data synchronization on the local server; when the trigger condition for cross-border data synchronization is met, performing cross-border data synchronization; and recording the cross-border data synchronization log into the local server synchronization database.

[0102] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: creating a data addition trigger for the data table; creating a data modification trigger for the data table; and creating a data deletion trigger for the data table.

[0103] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: the local server accesses the data dynamic log table in the target database through the network; comparing the target database timestamp with the corresponding time field value in the table in the target database, obtaining all records before the current time, and parsing the corresponding values in each record.

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the embodiments, those of ordinary skill in the art should understand that any modification or equivalent replacement of the technical solutions of the present invention does not depart from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.

Claims

1. A method for cross-border data synchronization, characterized in that: include: Set up a local server synchronization database on the local server to receive cross-border data that needs to be synchronized; According to business needs and relevant requirements of the data law of the country, obtain the data tables that need to be synchronized and the fields that need to be synchronized in each of the data tables that need to be synchronized; Create a dynamic database log and grant access rights to the synchronization database user; Create a trigger for recording data changes for each data table that needs to be synchronized; Setting a trigger condition for cross-border data synchronization on the local server; When the triggering condition of the cross-border data synchronization is met, the cross-border data synchronization is executed; and Record cross-border data synchronization logs to the local server synchronization database.

2. The method according to claim 1, characterized in that The setting of the local server synchronization database on the local server includes: defining the address, port, user, password and data instance of the target server.

3. The method according to claim 1, characterized in that: The step of creating a trigger for recording data changes for each data table that needs to be synchronized includes: Create a new trigger for the data table; Create data modification triggers for the data tables; and Create a data deletion trigger for the data table.

4. The method according to claim 1, characterized in that: The triggering condition for setting the cross-border data synchronization on the local server includes: a time point or a periodic time point.

5. The method according to claim 1, characterized in that When the triggering condition of the cross-border data synchronization is met, executing the cross-border data synchronization includes: The local server accesses the data dynamic log table in the target database through the network; The target database timestamp is compared with the corresponding time field value in the target database table, all records before the current time are obtained, and the corresponding value in each record is parsed.

6. A cross-border data synchronization device, characterized in that: include: A setting module is used to set up a local server synchronization database on a local server to receive cross-border data that needs to be synchronized; An acquisition module is used to acquire the data tables that need to be synchronized and the field information that needs to be synchronized in each of the data tables that need to be synchronized according to business needs and relevant requirements of the data law of the country; Create a module to create dynamic database logs and grant access rights to synchronized database users; A trigger creation module, used to create a trigger for recording data changes for each data table that needs to be synchronized; A trigger condition setting module, used to set the trigger condition of the cross-border data synchronization on the local server; An execution module, configured to execute the cross-border data synchronization when a triggering condition for the cross-border data synchronization is met; and The recording module is used to record the cross-border data synchronization log to the local server synchronization database.

7. The device according to claim 6, characterized in that The trigger creation module includes: A data addition trigger creation module, a data modification trigger creation module, and a data deletion trigger creation module.

8. The device according to claim 6, characterized in that The execution module is used for the local server to access the data dynamic log table in the target database through the network; compare the target database timestamp with the corresponding time field value of the table in the target database, obtain all records before the current time, and parse the corresponding value in each record.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium is used to store a program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the method for cross-border data synchronization described in any one of claims 1 to 5.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the processor, wherein the program, when running, executes the method for cross-border data synchronization described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Incremental synchronization method, apparatus and system

    CN108595522A

  • Cross-database incremental data synchronization method

    CN112231396A

  • Data cross-border management method and system and readable storage medium

    CN118607001A

  • Data cross-border transmission system, method and equipment

    CN119011705A

  • Systems and / or methods for migrating live database schemas to support zero downtime deployments with zero data losses

    US20220171748A1