A data synchronization method and device, electronic equipment and storage medium

By using a human-computer interaction interface and graphical configuration, the data synchronization method is simplified, solving the problem of high complexity in the synchronization logic configuration of existing technologies, and achieving low-cost and efficient data synchronization.

CN114647699BActive Publication Date: 2026-02-13BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210239077.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2026-02-13
Estimated Expiration
2042-03-11

AI Technical Summary

Technical Problem

Existing data synchronization methods have high configuration complexity for synchronization logic, which increases user learning and development/testing costs, and makes it difficult to implement high-level synchronization logic configuration.

Method used

The system uses a human-computer interaction interface to display the database, tables, and field identifiers of the data source. Users can graphically configure the synchronization logic, and the configuration information is translated into the configuration file required for program execution, simplifying the configuration process.

Benefits of technology

It reduces the learning cost of synchronous logic configuration, reduces the error rate, improves configuration efficiency and data synchronization accuracy, and reduces development and testing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114647699B_ABST
    Figure CN114647699B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data synchronization method and device, electronic equipment and storage medium, relates to the technical field of data processing, in particular to the technical field of big data and data synchronization. The specific implementation scheme is: through a man-machine interaction interface, the identities of each database in a data source end, the identities of each data table in each database, and the identities of each field in each data table are displayed; based on the information displayed by the man-machine interaction interface, configuration information of the synchronization logic is determined, the configuration information includes the identity of the target database, the identity of the target data table in the target database, and the identity of the target field in the target data table; the configuration information is translated into a configuration file required for program execution; and the configuration file is executed to synchronize the data of the target field of the target data table in the target database to a data destination. In this way, the learning cost of data synchronization logic configuration can be effectively reduced, and the access efficiency of data synchronization configuration can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of data processing, and particularly relates to the technical field of data synchronization. BACKGROUND

[0002] The data synchronization product mainly solves the data transmission decoupling between heterogeneous data sources and heterogeneous system services, and a large amount of data transmission (ETL, Extract-Transform-Load) logic, also known as synchronization logic, is involved in the data synchronization product. The synchronization logic includes but is not limited to: conversion of a set of database object schemas, database query connection join, and data filtering, etc.

[0003] In the process of data synchronization, the development cost and access cost of the user depend on whether the expression manner of the synchronization logic is simple and easy to use, therefore, the synchronization logic with simple and easy to use or even 0 learning cost is the core demand of data synchronization. SUMMARY

[0004] The present disclosure provides a data synchronization method and device, an electronic device and a storage medium.

[0005] According to an aspect of the present disclosure, a data synchronization method is provided, comprising:

[0006] displaying, through a man-machine interaction interface, the identities of each database in a data source end, the identities of each data table in the each database, and the identities of each field in the each data table;

[0007] determining configuration information of synchronization logic based on the information displayed by the man-machine interaction interface, wherein the configuration information comprises the identity of a target database, the identity of a target data table in the target database, and the identity of a target field in the target data table;

[0008] translating the configuration information into a configuration file required by program execution;

[0009] executing the configuration file to synchronize data of the target field of the target data table in the target database to a data destination end.

[0010] According to another aspect of the present disclosure, a data synchronization device is provided, comprising:

[0011] a display unit configured to display, through a man-machine interaction interface, the identities of each database in a data source end, the identities of each data table in the each database, and the identities of each field in the each data table;

[0012] A determination unit is configured to determine configuration information of a synchronization logic based on information displayed by the human-computer interaction interface, the configuration information including an identifier of a target database, an identifier of a target data table in the target database, and an identifier of a target field in the target data table.

[0013] A translation unit is configured to translate the configuration information into a configuration file required by program execution.

[0014] An execution unit is configured to execute the configuration file to synchronize data of the target field of the target data table in the target database to a data destination.

[0015] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0016] at least one processor; and

[0017] a memory in communication with the at least one processor; wherein

[0018] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any of the above data synchronization methods.

[0019] According to a fourth aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform any of the above data synchronization methods.

[0020] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements any of the above data synchronization methods.

[0021] It should be understood that the contents described in this part are not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0022] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:

[0023] Figure 1 is a first flowchart of a data synchronization method provided by an embodiment of the present disclosure;

[0024] Figure 2 is a schematic diagram of a configuration file and a module bin provided by an embodiment of the present disclosure;

[0025] Figure 3 is a second flowchart of a data synchronization method provided by an embodiment of the present disclosure;

[0026] Figure 4 is a schematic diagram of a human-computer interaction interface provided by an embodiment of the present disclosure to display data source end information;

[0027] Figure 5 is a third flowchart of a data synchronization method provided by an embodiment of the present disclosure;

[0028] Figure 6 is a schematic diagram of a human-computer interaction interface provided by an embodiment of the present disclosure to display target data tables connected to each other;

[0029] Figure 7 is a fourth flowchart of a data synchronization method provided by an embodiment of the present disclosure;

[0030] Figure 8 is a fifth flowchart of a data synchronization method provided by an embodiment of the present disclosure;

[0031] Figure 9 is a schematic diagram of a human-computer interaction interface provided by an embodiment of the present disclosure to display a pre-output field display area;

[0032] Figure 10 is a schematic diagram of a human-computer interaction interface provided by an embodiment of the present disclosure to display a final output field display area;

[0033] Figure 11 is a sixth flowchart of a data synchronization method provided by an embodiment of the present disclosure;

[0034] Figure 12 is a schematic diagram of a human-computer interaction interface provided by an embodiment of the present disclosure to display a trigger logic configuration area;

[0035] Figure 13 is a structural schematic diagram of a data synchronization device used to implement an embodiment of the present disclosure;

[0036] Figure 14 is a first block diagram of an electronic device used to implement a data synchronization method of an embodiment of the present disclosure;

[0037] Figure 15 is a second block diagram of an electronic device used to implement a data synchronization method of an embodiment of the present disclosure. DETAILED DESCRIPTION

[0038] Exemplary embodiments of the present disclosure are described herein below with reference to the accompanying drawings, in which various specific details are set forth to assist in understanding the present disclosure. It will be apparent, however, to one of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the spirit and scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted for clarity and conciseness.

[0039] The data synchronization product mainly solves the decoupling of data transmission between heterogeneous data sources and heterogeneous system services. A large amount of data transmission logic, also referred to as synchronization logic, is involved in the data synchronization product. The synchronization logic includes, but is not limited to, conversion of a set of database objects schema, database query connection join, and data filtering, etc.

[0040] In the process of data synchronization, the development cost and access cost of users depend on whether the expression of the synchronization logic is simple and easy to use. Therefore, the use of simple and easy-to-use or even 0 learning cost synchronization logic is the core demand of data synchronization.

[0041] In the traditional data synchronization method, the following three schemes are mainly used to configure the synchronization logic.

[0042] Scheme one, API (Application Programming Interface) parameter configuration: common DTS (Data Transmission Service) type functions configure the logic through the API mode. In this mode, users can use Http (HyperText Transfer Protocol) parameters to configure data sources, transmission logic, data destinations, and other information.

[0043] In this scheme one, the Http parameters are complex, and the setting of the Http parameters requires users to view a large number of development documents and learn them, which makes it easy for users to make mistakes when configuring the synchronization logic. To ensure the correctness of the logic configuration, users need to perform a large number of test verifications, which further increases the development and test costs.

[0044] Scheme two, configuration file configuration: common XML, Json, and other config (configuration) files are used to describe kv (key-value) pairs to configure the synchronization logic of data synchronization.

[0045] However, key-value pairs require users to consult the development documentation to complete the configuration, and setting parameters in the configuration file requires users to consult a large amount of documentation and learn the necessary techniques. This makes it easy for users to make mistakes when configuring synchronization logic. To ensure the correctness of the logic configuration, users need to perform a lot of testing and verification, which further increases development and testing costs. In addition, the format of the configuration file method is relatively fixed and lacks universality.

[0046] Option 3, Pseudo-SQL (Structured Query Language) configuration: Similar to Hive SQL, pseudo-SQL has special syntax rules and function functionality. Users can configure the synchronization logic of data synchronization through pseudo-SQL parameters.

[0047] In Option 3, the pseudo-SQL differs from standard SQL. Users need to understand the entire configuration structure, the meaning and value of each parameter, and learn numerous specific pseudo-SQL syntax rules. This high learning curve significantly increases the difficulty for beginners. Furthermore, SQL itself cannot describe complex functionalities, thus having limitations.

[0048] In addition, some existing DTS products only support simple synchronization logic configurations such as database name and table name mapping and data filtering, but do not support higher-order and more complex synchronization logic configurations such as the conversion of database object collection schemas and database query joins.

[0049] To address the aforementioned problems, embodiments of this disclosure provide a data synchronization method, such as... Figure 1 As shown, this method can be applied to electronic devices capable of parsing data sources. These devices can be located at the data source or be independent physical devices; there is no limitation in this regard. For ease of understanding, the following explanation uses an electronic device as the execution subject and does not imply any limitation. This data synchronization method includes the following steps:

[0050] Step S11: Through the human-computer interaction interface, display the identifiers of each database in the data source, the identifiers of each data table in each database, and the identifiers of each field in each data table.

[0051] In this embodiment of the disclosure, the human-computer interaction interface can be a web interface or other types of human-computer interaction interface, and authorized users can configure the synchronization logic through the human-computer interaction interface.

[0052] Electronic devices display the identifiers of each database, each data table in each database, and each field in each data table through a human-computer interaction interface. These identifiers can also be referred to as data source information.

[0053] The identifier of each database in the data source end can include the library name of each database, the identifier of each data table in each database can include the table name of each data table, and the identifier of each field in each data table can include the field name of each field and the type of the field. That is, the electronic device can display the library name of each database in the data source end, the table name of each data table in each database, and the field name of each field in each data table and the type of the field in the human-computer interaction interface.

[0054] In step S12, based on the information displayed in the human-computer interaction interface, the configuration information of the synchronization logic is determined, and the configuration information includes the identifier of the target database, the identifier of the target data table in the target database, and the identifier of the target field in the target data table.

[0055] The information displayed in the human-computer interaction interface of the electronic device can include the data source end information, that is, the identifier of each database in the data source end, the identifier of each data table in each database, and the identifier of each field in each data table. The information displayed in the human-computer interaction interface of the electronic device can also include the view configuration information of the human-computer interaction interface and the data destination end information.

[0056] In the embodiments of the present disclosure, the configuration information can be described by using a Json parameter or other parameters. Taking the description of the configuration information by using the Json parameter as an example, based on the information displayed in the human-computer interaction interface of the electronic device, the user can perform graphical configuration on the synchronization logic, such as selecting the identifier of the target database, the identifier of the target data table in the target database, and the identifier of the target field in the target data table. The process of selecting these identifiers can be referred to as subscribing to data. In the embodiments of the present disclosure, when the user performs graphical configuration on the synchronization logic, the join and calculation logic can also be configured, and this is not limited. After the graphical configuration is completed, the front-end module of the electronic device can format the graphical configuration into a Json parameter, and based on the formatted Json parameter, the configuration information of the synchronization logic is generated.

[0057] Optionally, after determining the configuration information of the synchronization logic, the electronic device can store the configuration information into a database, so that the user can extract the configuration information from the database at any time, and continue to configure or modify the synchronization logic in real time, thereby improving the efficiency of the configuration of the synchronization logic.

[0058] In step S13, the configuration information is translated into a configuration file required for program execution.

[0059] In the embodiments of the present disclosure, after obtaining the configuration information, the electronic device translates the configuration information into a configuration file, and the configuration file can be a file that can be executed by an ETL program.

[0060] Optionally, the back-end module of the electronic device sets an automatic configuration generation service, which customizes semantic and syntax rules according to configuration characteristics of the data flow module, and generates a configuration file using a syntax analyzer (such as bison). The data flow module represents a module in the data source end used to synchronously transmit data to the data destination end. Based on this, after determining the configuration information of the synchronization logic, the front-end module of the electronic device can call the automatic configuration generation service in the back-end module through an http request to generate a configuration file based on the subscribed data table and complex join and calculation logic.

[0061] In step S14, the configuration file is executed to synchronize the data of the target field of the target data table in the target database to the data destination end.

[0062] In the embodiments of the present disclosure, to ensure the normal operation of the configuration file, the electronic device can package the configuration file and the binary module bin required for program execution into a program package and upload it to the product library for deployment. The module bin includes data capture, data merging, data extraction, and data conversion, etc. The electronic device executes the configuration file, such as running the program package in the product library, so that the data source end can synchronize the data of the target field of the target data table in the target database to the data destination end.

[0063] In the technical solutions provided by the embodiments of the present disclosure, the electronic device displays the information of the data source end through the human-computer interaction interface, and determines the configuration information of the synchronization logic based on the information displayed through the human-computer interaction interface. This interface-based data synchronization method greatly reduces the learning cost of synchronization logic configuration, reduces the error rate, thereby reducing the development and testing cost, and improving the access efficiency of synchronization logic configuration.

[0064] In addition, the electronic device translates the configuration information into a configuration file required for program execution, which can ensure the correctness of the synchronization logic and provide convenience for program loading. At the same time, the configuration file can be stored in the product library, and the electronic device can obtain the program package from the product library at any time and run the program package, so that the data synchronization method is more convenient and simple.

[0065] The following will be described in combination with Figure 2 a configuration file and a bin module shown in FIG. 6.

[0066] Figure 2 The contents in the left box in FIG. 6 are configuration files obtained by translating the configuration information, and the contents in the right box are module bins. The electronic device generates a program package executable by the electronic device using the configuration file and the module bin. The configuration file in Figure 2 The content of the configuration file in FIG. 6 is only an example and is not specifically limited.

[0067] In one embodiment of the present disclosure, a data synchronization method is also provided, as shown in the figure, which can include steps S31-S37, steps S35-S37 are the same as steps S12-S15 described above, which will not be repeated here. Steps S31-S34 are an implementation of step S11. Figure 3

[0068] In step S31, each database in the data source and each data table in each database are parsed to obtain the identification of each database, the identification of each data table, and the identification of each field in each data table.

[0069] In the embodiment of the present disclosure, the electronic device parses the data source end to obtain the identification of each database, the identification of each data table, and the identification of each field in each data table in the data source end, that is, the electronic device can parse the library name of each database, the table name of each data table in each database, and the field name and type of each field in each data table in the data source end.

[0070] In step S32, the identification of each database is displayed in the human-computer interaction interface.

[0071] The data source end stores a plurality of databases, each database has a corresponding identification. The user can click the expansion button corresponding to the data source end in the human-computer interaction interface. The electronic device displays the identification of each database in the data source end when detecting the operation of the user clicking the expansion button.

[0072] In the embodiment of the present disclosure, the electronic device can support automatic aggregation of sub-tables and searching by table name, and the pull-down selection list supports quick selection of tables. In this case, the electronic device can display the identification of each database in the human-computer interaction interface in the form of a pull-down selection list. Specifically, the user can click the expansion button of the pull-down selection list (such as the first pull-down selection list) corresponding to the data source end in the human-computer interaction interface. The electronic device expands the first pull-down selection list and displays the identification of each database in the data source end in the first pull-down selection list when detecting the operation of the user clicking the expansion button of the first pull-down selection list.

[0073] In the embodiment of the present disclosure, the electronic device can also support the pop-up window function. In this case, the electronic device displays the pop-up window on the human-computer interaction interface when detecting the operation of the user clicking the expansion button of the pop-up window corresponding to the data source end, and displays the identification of each database in the data source end in the pop-up window.

[0074] In the embodiment of the present disclosure, the electronic device can also display the identification of each database in the data source end in other ways, which is not limited.

[0075] ​Step S33, in response to receiving the first selection instruction for the displayed target database identifier, displaying in the human-computer interaction interface the identifiers of each data table in the target database.

[0076] The electronic device supports the user to select the displayed target database identifier, wherein the electronic device detecting the user operation of selecting the displayed target database identifier can be understood as receiving the first selection instruction for the displayed target database identifier.

[0077] The electronic device also supports the user to directly input the target database identifier, wherein the electronic device detecting the user operation of inputting the target database identifier in the selection list can be understood as receiving the first selection instruction for the displayed target database identifier.

[0078] The electronic device displays in the human-computer interaction interface the identifiers of each data table in the target database in response to the received first selection instruction.

[0079] The electronic device can display the identifiers of each data table in the target database in the form of a drop-down selection list, a pop-up window, or other forms, which are not limited.

[0080] Step S34, in response to receiving the second selection instruction for the displayed target data table identifier, displaying in the human-computer interaction interface the identifiers of each field in the target data table in the chart corresponding to the target data table.

[0081] The electronic device supports the user to select the displayed target data table identifier, wherein the electronic device detecting the user operation of selecting the displayed target data table identifier can be understood as receiving the second selection instruction for the displayed target data table identifier.

[0082] The electronic device also supports the user to directly input the target data table identifier, wherein the electronic device detecting the user operation of inputting the target data table identifier can be understood as receiving the second selection instruction for the displayed target data table identifier.

[0083] The electronic device displays in the human-computer interaction interface the chart corresponding to the target data table, and displays in the chart the identifiers of each field in the target data table in response to the received second selection instruction.

[0084] The electronic device can display the identifiers of each field in the target data table in a tiled manner, or in other forms, which are not limited.

[0085] In the embodiments of the present disclosure, the target data table of the data source end can be divided into a main table and a sub-table, the number of the main table is one, and the number of the sub-table can be one or more. The main table is the basis of data synchronization, and the sub-table is used to establish join and / or calculation logic with the main table to construct synchronization logic. To further improve the access efficiency of the configuration of the synchronization logic, a main table check box can also be displayed in the graph corresponding to the target data table. When the user checks the main table check box, the electronic device determines the target data table as the main table, otherwise, the target data table is determined as the sub-table.

[0086] In the technical solutions provided by the embodiments of the present disclosure, the electronic device parses the data source end and displays the identifier of each database, the identifier of each data table in the target database, and the identifier of each field in the target data table. In this way, the information of the data source end can be clearly and intuitively displayed, and the user can quickly select the target database, the target data table, and the target field in the data source end, thereby improving the configuration efficiency of the synchronization logic and further improving the efficiency of data synchronization.

[0087] In addition, the electronic device displays the data source end information according to the selection instruction for the data source end information, which can reduce the display of useless data source end information, improve the utilization rate of space resources, and further reduce the situation of synchronization logic configuration error caused by too much useless data source end information, thereby improving the user friendliness.

[0088] The following will be described in detail in combination with the schematic diagram of the man-machine interaction interface for displaying the data source end information shown in the accompanying drawings. Figure 4

[0089] Figure 4 The left table of the man-machine interaction interface has two search boxes, namely "select database" and "select data table". After the user clicks the small triangle on the right side of "select database", the left table will display the first drop-down selection list to display the identifiers of each database. The user can select the identifier of the target database (such as FC_Feed in the embodiment) in the first drop-down selection list, or directly input the identifier of the target database in the search box "select database" to input the first selection instruction to the electronic device. Figure 4

[0090] The electronic device pops up the second drop-down selection list in the left table in response to the first selection instruction, and the list displays the identifiers of each data table in the target database. The user can select the identifier of the target data table (such as wordinfo in the embodiment) in the second drop-down selection list, or directly input the identifier of the target data table in the search box "select data table" to input the second selection instruction to the electronic device. Figure 4

[0091] ​​​The electronic device responds to the second selection command and selects a preset area (e.g., ...) within the human-computer interaction interface. Figure 4 In the area where you select fields and set filter conditions, a chart corresponding to "wordinfo" will pop up. This chart displays the source name (feed) of the target data table "wordinfo", the database name (FC_Feed), the table name "wordinfo", and a checkbox indicating whether the target table is the primary table. The chart also displays the labels for each field in the target table, with a small checkbox before each label to select that field as the target field. Figure 4 The target fields selected include userid, rstat, astat, expmask, and attribute fields.

[0092] In one embodiment of this disclosure, a data synchronization method is also provided, such as... Figure 5 As shown, the method may include steps S51-S59. Steps S51-S54, S58, and S59 are the same as steps S31-S34, S36, and S37 described above, and will not be repeated here. Steps S55-S57 are one possible implementation of step S35.

[0093] In step S55, in response to receiving a connection establishment instruction, a connection is established between the identifiers of fields in two target data tables on the human-computer interaction interface. The connection is used to indicate that there is specified synchronization logic between the two connected fields.

[0094] In this embodiment, the connection establishment command can be directly input by the user into the electronic device, or it can be obtained by the electronic device from other devices; there is no limitation on this. The identifiers of the two fields in the connection can be the same or different. The specified synchronization logic can be to synchronize a column of data with the same value in both fields, or to synchronize a column of data with different values ​​in both fields, etc., which can be set according to actual needs.

[0095] For example, such as Figure 6 The diagram shows a human-computer interaction interface connected to the target data table. Figure 6 The two target data tables are the main table FC_Feed_wordinfo and the secondary table FC_AO_watt_table1. Users can draw an arrowed line segment between the rstat fields in the main table and the secondary table on the human-computer interaction interface, such as... Figure 6 The electronic device uses the arrowed line segment to establish a connection between the rstat field in the main table and the rstat field in the sub-table.

[0096] The main table can also establish a connection with one or more sub-tables, and the main table can also establish multiple connections with a sub-table, and there is no limitation.

[0097] In step S56, in response to receiving the third selection instruction for the identification of the field in the chart, the identification of the selected field is taken as the identification of the target field.

[0098] Also taking the main table and the sub-table in Figure 6 as an example, in Figure 6 , the identification of each field is followed by a check box, and the user can check the check box before each field identification to input a third selection instruction for the identification of the field in the chart to the electronic device. The electronic device can respond to the received third selection instruction and take the identification of the selected field as the identification of the target field, that is, the electronic device takes the field checked by the user as the target field.

[0099] In the embodiments of the present disclosure, the execution order of steps S55 and S56 is not limited.

[0100] In step S57, based on the identification of the target database, the identification of the target data table in the target database, the identification of the target field in the target data table, and the connection between the fields on the human-computer interaction interface, configuration information of the synchronization logic is generated.

[0101] In the embodiments of the present disclosure, the electronic device can format the identification of the target database, the identification of the target data table in the target database, the identification of the target field in the target data table, and the connection between the fields on the human-computer interaction interface into a Json parameter, and determine the Json parameter as the configuration information of the synchronization logic.

[0102] Step S57 is similar to step S12, and will not be described here.

[0103] In the technical solution provided by the embodiments of the present disclosure, the user performs graphical configuration on the human-computer interaction interface, which can realize the specified synchronization logic configuration of the two fields, and the synchronization logic relationship between the two fields can be simply and clearly represented. In addition, the fields in the target data table are checked, and the target field in the target data table can also be determined simply and quickly, which improves the efficiency of the synchronization logic configuration, and further improves the efficiency of the data synchronization method.

[0104] In one embodiment of the present disclosure, a data synchronization method is also provided, as shown in Figure 7 , the method can include steps S71-S710, steps S71-S74, steps S76-S710 are the same as steps S51-S59 described above, and will not be described here.

[0105] Step S75, in response to receiving the drag instruction for the target chart displayed in the human-computer interaction interface, the target chart is controlled to move to the target position indicated by the drag instruction.

[0106] In the embodiments of the present disclosure, the human-computer interaction interface of the electronic device displays one or more charts, a user can select a chart (i.e., a target chart) in the human-computer interaction interface and drag the target chart to move in the human-computer interaction interface. After detecting the operation of the user dragging the target chart to move, the electronic device determines that the user inputs a drag instruction for the target chart to the electronic device, and then controls the target chart to move to a target position based on the drag instruction. The target position can be understood as the position where the user releases the target chart.

[0107] In combination Figure 6 For example, the main table and the secondary table in the human-computer interaction interface, after the electronic device receives the drag instruction for the chart of the main table, the chart of the main table can be controlled to move to the target position indicated by the drag instruction; after the electronic device receives the drag instruction for the chart of the secondary table, the chart of the secondary table can be controlled to move to the target position indicated by the drag instruction.

[0108] In the embodiments of the present disclosure, the execution order of steps S75, S76 and S77 is not limited.

[0109] In the technical solutions provided by the embodiments of the present disclosure, the electronic device drags the target chart, which can effectively avoid the overlap between the charts displayed in the human-computer interaction interface, thereby more accurately establishing the connection between different charts and improving the accuracy of the synchronous logic configuration.

[0110] In addition, the electronic device drags the target chart, which can make the connection between the charts more clear, and facilitate the user to more clearly understand the synchronous logic relationship between the charts, and then timely adjust the incorrect synchronous logic.

[0111] In one embodiment of the present disclosure, a data synchronization method is also provided, as shown in Figure 8 The method can include steps S81-S812, steps S81-S86, step S811 and step S812 are the same as steps S51-S56, step S58 and step S59 described above, which will not be repeated here. Steps S87-S810 are a realizable manner of step S57.

[0112] Step S87, in the pre-output field display area on the human-computer interaction interface, display the identifier of each target field.

[0113] The pre-output field display area is set on the human-computer interaction interface of the electronic device. After determining the identifier of the target field, the electronic device displays the identifier of the target field in the pre-output field display area on the human-computer interaction interface.

[0114] AsFigure 9 As shown, the pre-output field display area includes the target field name, the target field source, the target field type, the separator, the function, the default value, and the trigger synchronization transmission field. Before the target field name, there is a column of check boxes to support the user to check the target field. The trigger synchronization transmission field is a column of check boxes to determine the target field triggering the synchronization transmission.

[0115] In step S88, in response to the editing instruction for the identification of each target field in the pre-output field display area, the identification of the target field not requiring synchronization is cancelled, and the identification of the target field triggering the synchronization is determined.

[0116] In the embodiment of the present disclosure, the user can check the identification of the target field finally requiring synchronization and determine the identification of the target field triggering the synchronization in the pre-output field display area. The user operates on the interface of the pre-output field display area, which is inputting the editing instruction for the identification of each target field in the pre-output field display area to the electronic device.

[0117] Still taking Figure 9 as an example, the user checks the check box before the name of the target field in the pre-output field display area, such as Figure 9 checks the check box before all the fields except "pattern", at this time, the electronic device can determine to cancel the identification of the "pattern" field, and the data source end does not need to synchronize the data of the "pattern" field to the data destination end. In addition, the user checks the check box of the trigger field in the pre-output field display area, such as Figure 9 checks the check boxes of the trigger fields of "modtime" and "sourc", then the electronic device can determine that the identification of the target field triggering the synchronization is "modtime" and "sourc"

[0118] In addition, the editing instruction of the identification of each target field can also instruct the electronic device to newly create the identification of the custom target field, and to sequentially adjust the identification of each target field, to realize the addition of the field function and the flexible adjustment of the field order.

[0119] In step S89, the identification of each remaining target field is displayed in the final output field display area on the human-computer interaction interface.

[0120] The final output field display area can also be set on the human-computer interaction interface of the electronic device. After responding to the editing instruction, the electronic device displays the identification of each remaining target field in the final output field display area on the human-computer interaction interface.

[0121] For example, Figure 10As shown, the final output field display area includes the target field name, the target field source, the target field type, the separator, the function, the default value, and the operation, and the operation list displays the identification of each target field, and the edit and delete buttons.

[0122] In step S810, based on the identification of the target database, the identification of the target data table in the target database, the information displayed in the final output field display area, the identification of the target field triggering the synchronization, and the connection between the fields on the man-machine interaction interface, configuration information of the synchronization logic is generated.

[0123] In the embodiments of the present disclosure, the electronic device can format the identification of the target database, the identification of the target data table in the target database, the information displayed in the final output field display area, the identification of the target field triggering the synchronization, and the connection between the fields on the man-machine interaction interface into a Json parameter, and determine the Json parameter as the configuration information of the synchronization logic.

[0124] Step S810 is similar to step S12, and will not be described here.

[0125] In the technical solution provided by the embodiments of the present disclosure, the electronic device supports the user to edit the identification of the target field in each pre-output field display area, and the edit instruction instructs the electronic device to cancel the identification of the target field that does not need to be synchronized, and determine the identification of the target field triggering the synchronization. Further filtering of the identification of the field can improve the accuracy of the data synchronization method, and also improve the user friendliness.

[0126] In one embodiment of the present disclosure, a data synchronization method is also provided, which can include steps S111-S115. Figure 11 As shown, the method can include steps S111-S115, and steps S111, S114 and S115 are the same as steps S11, S13 and S14 described above, which will not be described here. Steps S112 and S113 are an implementable manner of step S12.

[0127] In step S112, in response to receiving the trigger logic configuration instruction, the trigger logic configuration area on the man-machine interaction interface displays the trigger logic description included in the trigger logic configuration instruction.

[0128] In the embodiments of the present disclosure, the trigger logic configuration instruction can be directly input by the user to the electronic device, or can be obtained by the electronic device from other devices, which is not limited.

[0129] In the embodiments of the present disclosure, the trigger logic configuration instruction includes the trigger logic description, and the trigger logic description is used to describe the trigger, filtering and other logic. The trigger logic description can be expressed by a simple expression. As shown, Figure 12 As shown,Figure 12 Fig. 1 is a schematic view of a human-computer interaction interface for configuring a trigger logic region, Figure 12 trigger represents trigger logic, and "is del == 0" represents trigger logic description. After receiving the trigger logic configuration instruction, the electronic device extracts the trigger logic description from the trigger logic configuration instruction, and displays the trigger logic description in the trigger logic configuration region of the human-computer interaction interface.

[0130] The trigger logic configuration instruction can include, but is not limited to, an incremental trigger instruction and a deletion trigger instruction. The incremental trigger instruction can instruct the electronic device to trigger the data synchronization process when the value of the target field concerned by the trigger logic description is increased; and the deletion trigger instruction can instruct the electronic device to trigger the data synchronization process when the value of the target field concerned by the trigger logic description is deleted.

[0131] In step S113, based on the identification of the target database, the identification of the target data table in the target database, the identification of the target field in the target data table, and the trigger logic description displayed by the human-computer interaction interface, configuration information of the synchronization logic is generated.

[0132] In the embodiments of the present disclosure, the electronic device can format the identification of the target database, the identification of the target data table in the target database, the identification of the target field in the target data table, and the trigger logic description into a Json parameter, and determine the Json parameter as the configuration information of the synchronization logic.

[0133] Step S113 is similar to step S12, and will not be described here.

[0134] In the technical solutions provided by the embodiments of the present disclosure, the electronic device displays the trigger logic description included in the received trigger logic configuration instruction on the human-computer interaction interface, so that the electronic device can clearly and intuitively present the trigger synchronization logic by using a simple expression. This expression greatly reduces the learning cost of synchronization logic configuration, and facilitates the user to modify the trigger logic, thereby enhancing the convenience of the data synchronization method.

[0135] Corresponding to the above-mentioned data synchronization method, the embodiments of the present disclosure also provide a data synchronization device, as shown in Figure 13 may include:

[0136] The display unit 131 is configured to display, through the human-computer interaction interface, the identification of each database in the data source end, the identification of each data table in each database, and the identification of each field in each data table.

[0137] The determining unit 132 is configured to determine configuration information of the synchronization logic based on the information displayed on the human-computer interaction interface, and the configuration information comprises an identifier of the target database, an identifier of the target data table in the target database, and an identifier of the target field in the target data table.

[0138] The translating unit 133 is configured to translate the configuration information into a configuration file required for program execution.

[0139] The executing unit 134 is configured to execute the configuration file to synchronize the data of the target field of the target data table in the target database to the data destination.

[0140] Optionally, the displaying unit 131 can comprise:

[0141] The data source is parsed to obtain identifiers of each database, identifiers of each data table in each database, and identifiers of each field in each data table.

[0142] The identifiers of each database are displayed on the human-computer interaction interface.

[0143] In response to receiving a first selection instruction for the displayed identifier of the target database, the identifiers of each data table in the target database are displayed on the human-computer interaction interface.

[0144] In response to receiving a second selection instruction for the displayed identifier of the target data table, the identifiers of each field in the target data table are displayed in a graph corresponding to the target data table on the human-computer interaction interface.

[0145] Optionally, the determining unit 132 can comprise:

[0146] The establishing subunit is configured to, in response to receiving a connection establishing instruction, establish a connection between the identifiers of two target fields on the human-computer interaction interface, and the connection is used to indicate that the two connected fields have a specified synchronization logic.

[0147] The responding subunit is configured to, in response to receiving a third selection instruction for the identifier of a field in the graph, take the selected identifier of the field as the identifier of the target field.

[0148] The generating subunit is configured to generate the configuration information of the synchronization logic based on the identifier of the target database, the identifier of the target data table in the target database, the identifier of the target field in the target data table, and the connection between the fields on the human-computer interaction interface.

[0149] Optionally, the data synchronization apparatus can further comprise:

[0150] The control unit is used to respond to a drag command received for a target chart displayed on the human-computer interaction interface, and to control the target chart to move to the target position indicated by the drag command.

[0151] Optionally, the above-mentioned generating subunit may include:

[0152] The pre-output field display area on the human-computer interaction interface displays the identifiers of each target field;

[0153] In response to editing instructions for the identifiers of each target field in the pre-output field display area, the identifiers of target fields that do not need to be synchronized are canceled, and the identifiers of target fields that trigger synchronization are determined.

[0154] The final output field display area on the human-computer interaction interface displays the identifiers of the remaining target fields;

[0155] Based on the identifier of the target database, the identifier of the target data table in the target database, the information displayed in the final output field display area, the identifier of the target field that triggers synchronization, and the connection between fields on the human-computer interaction interface, the configuration information for the synchronization logic is generated.

[0156] Optionally, the determining unit 132 mentioned above includes:

[0157] In response to receiving a trigger logic configuration instruction, the trigger logic description included in the trigger logic configuration instruction is displayed in the trigger logic configuration area on the human-computer interaction interface;

[0158] Based on the identifiers of the target database, the target data table in the target database, the target field in the target data table, and the trigger logic description displayed in the human-computer interaction interface, the configuration information for the synchronization logic is generated.

[0159] In the technical solution provided by the embodiments of this disclosure, the electronic device displays data source information through a human-computer interaction interface, and determines the configuration information of the synchronization logic based on the information displayed through the human-computer interaction interface. This interface-based data synchronization method greatly reduces the learning cost of synchronization logic configuration, reduces the error rate, thereby reducing development and testing costs and improving the access efficiency of synchronization logic configuration.

[0160] Furthermore, the electronic device translates the configuration information into a configuration file required for program execution, ensuring the correctness of the synchronization logic and facilitating program loading. Simultaneously, the configuration file can be stored in a product library, allowing the electronic device to retrieve and run the program package from the library at any time, making data synchronization more convenient and streamlined.

[0161] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good customs.

[0162] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0163] Figure 14 A schematic block diagram of an example electronic device 1400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.

[0164] As shown in Figure 14 The electronic device 1400 includes a computing unit 1401 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 1402 or a computer program loaded from a storage unit 1408 into a random access memory (RAM) 1403. Various programs and data required for the operation of the electronic device 1400 can also be stored in the RAM 1403. The computing unit 1401, the ROM 1402, and the RAM 1403 are connected to each other through a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.

[0165] Various components in the electronic device 1400 are connected to the I / O interface 1405, including an input unit 1406, such as a keyboard, a mouse, etc.; an output unit 1407, such as various types of displays, speakers, etc.; a storage unit 1408, such as a magnetic disk, an optical disk, etc.; and a communication unit 1409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1409 allows the electronic device 1400 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0166] The computing unit 1401 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1401 performs various methods and processes described above, such as the data synchronization method. For example, in some embodiments, the data synchronization method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1408. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 1400 via the ROM 1402 and / or the communication unit 1409. When the computer program is loaded onto the RAM 1403 and executed by the computing unit 1401, one or more steps of the data synchronization method described above can be performed. Alternatively, in other embodiments, the computing unit 1401 can be configured to perform the data synchronization method by any other appropriate means, such as by means of firmware.

[0167] Figure 15 A block diagram of an electronic device used to implement the data synchronization method of embodiments of the present disclosure is shown, comprising:

[0168] at least one processor 1501; and

[0169] a memory 1502 connected with the at least one processor 1501 in communication; wherein

[0170] The memory 1502 stores instructions executable by the at least one processor 1501, and the instructions are executed by the at least one processor 1501 to enable the at least one processor 1501 to perform any of the data synchronization methods described above.

[0171] Embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the data synchronization method according to any of the above.

[0172] Embodiments of the present disclosure also provide a computer program product comprising a computer program which, when executed by a processor, implements the data synchronization method according to any of the above.

[0173] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0174] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, or entirely on a remote machine or server.

[0175] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0176] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0177] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0178] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server is generally established by computer programs running on the respective computers and having a client-server relationship to each other. The servers can be cloud servers, servers of a distributed system, or servers combined with a blockchain.

[0179] It should be understood that various forms of flow shown above can be used, with steps reordered, added, or removed. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, without limitation herein, so long as the desired results of the technology disclosed in the present disclosure are achieved.

[0180] The specific embodiments described above are not intended to limit the scope of the present disclosure. Those skilled in the art will understand that various modifications, combinations, sub-combinations, and alternatives can be made to the specific embodiments without departing from the spirit and principles of the present disclosure. Any further modifications, equivalent substitutions, improvements, and the like, either presently known or later developed, that do not depart from the spirit and principles of the present disclosure are to be encompassed within the scope of the present disclosure.

Claims

1. A data synchronization method, comprising: displaying, through a human-computer interaction interface, identifications of each database in a data source, identifications of each data table in the each database, and identifications of each field in the each data table, including: parsing each database in the data source and each data table in the each database to obtain the identifications of the each database, the identifications of the each data table, and the identifications of each field in the each data table; displaying the identifications of the each database in the human-computer interaction interface; in response to receiving a first selection instruction for the displayed identification of a target database, displaying the identifications of each data table in the target database in the human-computer interaction interface; in response to receiving a second selection instruction for the displayed identification of a target data table, displaying the identifications of each field in the target data table in a chart corresponding to the target data table in the human-computer interaction interface; determining configuration information of a synchronization logic based on the information displayed in the human-computer interaction interface, including: in response to receiving a connection establishment instruction, establishing a connection between the identifications of two target fields on the human-computer interaction interface, the connection being used to indicate that a specified synchronization logic exists between the two connected fields; in response to receiving a third selection instruction for the identification of a field in the chart, taking the selected identification of the field as an identification of a target field; generating the configuration information of the synchronization logic based on the identification of the target database, the identification of the target data table in the target database, the identification of the target field in the target data table, and the connection between the fields on the human-computer interaction interface; the configuration information including the identification of the target database, the identification of the target data table in the target database, and the identification of the target field in the target data table; translating the configuration information into a configuration file required for program execution; executing the configuration file to synchronize data of the target field of the target data table in the target database to a data destination. 2.The method of claim 1, further comprising: in response to receiving a dragging instruction for a target chart displayed in the human-computer interaction interface, controlling the target chart to move to a target position indicated by the dragging instruction.

3. The method of claim 1, wherein, The step of generating the configuration information of the synchronization logic based on the identification of the target database, the identification of the target data table in the target database, the identification of the target field in the target data table, and the connection between the fields on the human-computer interaction interface, includes: displaying the identifications of each target field in a pre-output field display area on the human-computer interaction interface; in response to an editing instruction for the identifications of each target field in the pre-output field display area, canceling the identification of a target field that does not need to be synchronized and determining the identification of a target field that triggers synchronization; displaying the identifications of the remaining each target field in a final output field display area on the human-computer interaction interface. generate configuration information of the synchronization logic based on the identification of the target database, the identification of the target data table in the target database, the information displayed on the final output field display area, the identification of the target field triggering the synchronization, and the connection between the fields on the human-computer interaction interface.

4. The method of claim 1, wherein, The step of determining the configuration information of the synchronization logic based on the information displayed on the human-computer interaction interface comprises: In response to receiving the trigger logic configuration instruction, triggering the logic configuration area on the human-computer interaction interface to display the trigger logic description included in the trigger logic configuration instruction; generate configuration information of the synchronization logic based on the identification of the target database, the identification of the target data table in the target database, the information displayed on the final output field display area, the identification of the target field triggering the synchronization, and the connection between the fields on the human-computer interaction interface.

5. A data synchronization apparatus, comprising: a display unit configured to display, through a human-computer interaction interface, the identification of each database in a data source, the identification of each data table in each database, and the identification of each field in each data table, specifically configured to: parse each database in the data source and each data table in each database to obtain the identification of each database, the identification of each data table, and the identification of each field in each data table; and display the identification of each database in the human-computer interaction interface; In response to receiving a first selection instruction for the displayed identification of a target database, display the identification of each data table in the target database in the human-computer interaction interface; In response to receiving a second selection instruction for the displayed identification of a target data table, display the identification of each field in the target data table in a graph corresponding to the target data table in the human-computer interaction interface; a determination unit configured to determine configuration information of synchronization logic based on the information displayed on the human-computer interaction interface, specifically configured to: in response to receiving a connection establishment instruction, establish a connection between the identification of two target data table fields on the human-computer interaction interface, the connection being used to indicate that there is specified synchronization logic between the two connected fields; and in response to receiving a third selection instruction for the identification of a field in the graph, take the selected field identification as the identification of a target field; generate configuration information of the synchronization logic based on the identification of the target database, the identification of the target data table in the target database, the identification of the target field in the target data table, and the connection between the fields on the human-computer interaction interface; the configuration information comprising the identification of the target database, the identification of the target data table in the target database, and the identification of the target field in the target data table; a translation unit configured to translate the configuration information into a configuration file required for program execution; an execution unit configured to execute the configuration file to synchronize the data of the target field of the target data table in the target database to a data destination.

6. The apparatus of claim 5, further comprising: The control unit is configured to, in response to receiving a drag instruction for a target chart displayed on the human-computer interaction interface, control the target chart to move to a target position indicated by the drag instruction.

7. The apparatus of claim 5, wherein, The determination unit comprises: displaying the identification of each target field in a pre-output field display area on the human-computer interaction interface; in response to an editing instruction for the identification of each target field in the pre-output field display area, canceling the identification of the target field that does not need to be synchronized, and determining the identification of the target field that triggers synchronization; displaying the identification of each target field in a final output field display area on the human-computer interaction interface; based on the identification of the target database, the identification of the target data table in the target database, the information displayed in the final output field display area, the identification of the target field that triggers synchronization, and the connection between the fields on the human-computer interaction interface, generating configuration information of the synchronization logic.

8. The apparatus of claim 5, wherein, The determination unit comprises: in response to receiving a trigger logic configuration instruction, triggering a logic configuration area on the human-computer interaction interface to display trigger logic description included in the trigger logic configuration instruction; based on the identification of the target database displayed on the human-computer interaction interface, the identification of the target data table in the target database, the identification of the target field in the target data table, and the trigger logic description, generating configuration information of the synchronization logic.

9. An electronic device comprising: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.

10. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-4.

11. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Method for synchronizing data of multiple data sources

    CN113821565A