Data synchronization method, device and equipment based on external interface configurable adapter

Through the data synchronization method that can be configured based on the external interface, the problem of large workload of external system interface docking is solved, and fast and low-cost data synchronization is achieved, which is suitable for most interface-based data synchronization scenarios.

CN117931943BActive Publication Date: 2025-05-16CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410038012.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2025-05-16
Estimated Expiration
2044-01-10

AI Technical Summary

Technical Problem

During the data synchronization process, the interface docking work for external systems is large, and repeated joint adjustment and adaptation are required, resulting in time-consuming and increasing R&D costs.

Method used

The data synchronization method that can be configured based on the external interface is adopted. By obtaining the API interface parameters of the data provider, the synchronization interface is configured to realize the communication with the API interface of the data provider, and when the synchronization service of the data demander is scheduled, the configuration items are parsed and the adapter is called for data synchronization.

Benefits of technology

It effectively reduces the joint debugging of external interfaces, shortens the R&D cycle, and greatly saves R&D costs related to interface data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117931943B_ABST
    Figure CN117931943B_ABST
Patent Text Reader

Abstract

The present invention discloses a data synchronization method, device and equipment based on an external interface configurable adapter, which relates to the field of data synchronization. The method includes obtaining the API interface parameters of the data provider, configuring the synchronization interface configuration items of the external interface adapter, and realizing the connection with the data provider's API interface; after monitoring to obtain that the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are obtained by scanning the corresponding table name after the API data of the data provider is stored in the warehouse; parsing the synchronization interface configuration items to obtain the API interface parameters to call the external interface adapter, and adapting the data returned by the data provider's API interface and adding or updating it into the warehouse. The present application can effectively reduce the joint debugging work of docking external interfaces, shorten the research and development cycle, and greatly save the research and development costs related to interface data synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data synchronization, and in particular to a data synchronization method, device and equipment based on an external interface configurable adapter. Background Art

[0002] Data synchronization is a common business scenario. As more and more companies and departments have increasing demands for data sharing, the demand for data synchronization is also increasing. The business value of data synchronization lies in breaking down the data barriers between different systems and enabling data to be shared.

[0003] In the field of data synchronization, data synchronization between internal systems on the same platform can generally be performed directly at the data source level with the help of middleware. However, when synchronizing data with external systems, due to factors such as permission security, data synchronization is generally not performed at the data source level. Instead, data synchronization interaction is performed through the API (Application Programming Interface).

[0004] When the data demander calls the data provider through the API interface to synchronize data, the data demander needs to connect to the interface specified by the data provider in a hard-coded manner, and process and adapt the data returned by the interface in a scheduled manner and store it persistently to meet the business scenario requirements of its own system.

[0005] As the number of deployments of a system increases, it needs to integrate into more existing platforms, and thus needs to connect to more subsystem API interfaces within the platform, such as organizational structure, user information, role information, etc. Due to the differences in request methods, request addresses, request parameters, and return parameters of different interfaces, the workload of hard-coded docking increases accordingly, and repeated joint debugging and adaptation are required for each different interface, which is time-consuming and increases R&D costs. Summary of the invention

[0006] The present application provides a data synchronization method, device and equipment based on an external interface configurable adapter, which can effectively reduce the joint debugging work of connecting to the external interface, shorten the research and development cycle, and greatly save the research and development costs related to interface data synchronization.

[0007] In a first aspect, an embodiment of the present application provides a data synchronization method based on an external interface configurable adapter, the data synchronization method based on an external interface configurable adapter comprising:

[0008] Obtain the API interface parameters of the data provider, configure the synchronization interface configuration items of the external interface adapter, and achieve communication with the API interface of the data provider;

[0009] After the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are obtained by scanning the corresponding table name based on the API data of the data provider after it is stored in the database;

[0010] Parse the synchronization interface configuration items to obtain API interface parameters to call the external interface adapter, and adapt the data returned by the data provider's API interface and add or update it into the database.

[0011] In combination with the first aspect, in one implementation, the API interface parameters include a request address, a request method, a request header parameter, a request parameter, and a return parameter.

[0012] In combination with the first aspect, in one implementation, the configuration of the synchronization interface configuration item of the external interface adapter to achieve communication with the data provider API interface specifically includes the following steps:

[0013] Based on the synchronous interface configuration page of the external interface adapter, configure the API interface parameters of the data provider to the external interface adapter to implement the configuration of the synchronous interface configuration items of the external interface adapter;

[0014] Perform interface connectivity test to ensure normal connectivity between the external interface adapter and the data provider's API interface.

[0015] In combination with the first aspect, in one implementation, when configuring the API interface parameters of the data provider to the external interface adapter, for the request parameters:

[0016] The request parameters support dynamic parameter configuration, the dynamic parameters include time range parameters for setting dates, and the dynamic parameters support query of incremental and full data after dynamic values ​​are taken.

[0017] In combination with the first aspect, in one implementation, after performing the interface connectivity test, the method further includes:

[0018] Configure the corresponding data storage table name and primary key field name in the data table after the data provider's API data is stored in the database to the synchronization interface configuration page;

[0019] Configure the data level where the business return parameters are located, as well as the mapping relationship between the return fields of the data provider's API interface and the fields of the demander's database table;

[0020] Configure whether the external interface adapter is enabled.

[0021] In combination with the first aspect, in one implementation, after the monitoring obtains that the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration item of the external interface adapter is obtained by scanning based on the corresponding table name after the API data of the data provider is stored in the database, and the specific steps include:

[0022] When the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are scanned and obtained according to the corresponding data storage table name after the API data of the configured data provider is stored in the database, and the enabled status of the configured external interface adapter.

[0023] In combination with the first aspect, in one implementation, the scheduling service implements scheduled scheduling with a set period based on the Quartz scheduled task open source framework.

[0024] In combination with the first aspect, in one implementation, the parsing synchronization interface configuration item obtains API interface parameters to call the external interface adapter, and the data returned by the data provider API interface is adapted and added or updated into the database. The specific steps include:

[0025] Parse the synchronous interface configuration items of the scanned external interface adapter, and obtain the API interface parameters to call the external interface adapter;

[0026] The external interface adapter parses the data returned by the data provider API interface according to the data level of the configured business return parameters;

[0027] According to the mapping relationship between the return fields of the external interface adapter, the return fields of the configured data provider API interface and the fields of the demander's database table, as well as the primary key field name in the data table after the configured data provider's API data is entered into the database, the data returned by the data provider's API interface is adapted and added or updated into the database.

[0028] In a second aspect, an embodiment of the present application provides a data synchronization device based on an external interface configurable adapter, the data synchronization device based on an external interface configurable adapter comprising:

[0029] The acquisition module is used to obtain the API interface parameters of the data provider, configure the synchronization interface configuration items of the external interface adapter, and realize the connection with the API interface of the data provider;

[0030] A configuration module is used to monitor and obtain the synchronization service of the data demander after it is triggered by the scheduling service, and then scan the corresponding table name after the API data of the data provider is stored to obtain the synchronization interface configuration item of the external interface adapter;

[0031] The execution module is used to parse the synchronization interface configuration items to obtain API interface parameters to call the external interface adapter, and adapt the data returned by the data provider's API interface and add or update it into the database.

[0032] In a third aspect, an embodiment of the present application provides a data synchronization device based on an external interface configurable adapter, wherein the data synchronization device based on an external interface configurable adapter comprises a processor, a memory, and a data synchronization program based on the external interface configurable adapter stored in the memory and executable by the processor, wherein when the data synchronization program based on the external interface configurable adapter is executed by the processor, the steps of the data synchronization method based on the external interface configurable adapter described above are implemented.

[0033] The beneficial effects brought by the technical solution provided by the embodiments of the present application include:

[0034] By obtaining the API interface parameters of the data provider, the synchronization interface configuration items of the external interface adapter are configured to achieve communication with the data provider's API interface. Then, after monitoring to obtain that the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are obtained by scanning based on the corresponding table name after the data provider's API data is stored in the database. Finally, the synchronization interface configuration items are parsed to obtain the API interface parameters for calling the external interface adapter, and the data returned by the data provider's API interface is adapted and added or updated into the database. The connection between the data provider and the data demander is achieved through the external interface adapter for data synchronization. This is suitable for most interface-based data synchronization scenarios and has a wide range of applications. In addition, the synchronization method of this application has less code intrusion, and can flexibly configure to increase or reduce the API interface that needs to be synchronized. It has the advantages of strong scalability, etc., which effectively reduces the joint debugging work of docking with external interfaces, shortens the R&D cycle, and greatly saves the R&D costs related to interface-based data synchronization. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A flowchart of a data synchronization method based on an external interface configurable adapter for this application;

[0036] Figure 2 A logical structure diagram for realizing data synchronization based on an external interface adapter;

[0037] Figure 3 This is a structural schematic diagram of a data synchronization device based on an external interface configurable adapter of the present application;

[0038] Figure 4 This is a hardware structure diagram of a data synchronization device based on an external interface configurable adapter in this application. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0040] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0041] On the first aspect, an embodiment of the present application provides a data synchronization method based on an external interface configurable adapter, which configures the synchronization interface configuration items of the external interface adapter by obtaining the API interface parameters of the data provider to achieve communication with the data provider's API interface, and then monitors that the synchronization service of the data demander is triggered by the scheduling service, and obtains the synchronization interface configuration items of the external interface adapter based on the table name corresponding to the API data of the data provider after it is stored in the warehouse, and finally parses the synchronization interface configuration items to obtain the API interface parameters for calling the external interface adapter, and adapts the data returned by the data provider's API interface and adds or updates it into the warehouse, and realizes the connection between the data provider and the data demander through the external interface adapter for data synchronization. It is suitable for most interface-based data synchronization scenarios and has a wide range of applications. The synchronization method of the present application has the advantages of less code intrusion, flexible configuration to increase or reduce the API interface that needs to be synchronized, strong scalability, etc., which effectively reduces the joint debugging work of docking with external interfaces, shortens the R&D cycle, and greatly saves the R&D costs related to interface-based data synchronization.

[0042] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the data synchronization method based on the external interface configurable adapter of this application. Figure 1 As shown, the data synchronization method based on the external interface configurable adapter includes:

[0043] S1: Obtain the API interface parameters of the data provider, configure the synchronization interface configuration items of the external interface adapter, and achieve communication with the API interface of the data provider;

[0044] In this application, API interface parameters include request address, request method, request header parameters, request parameters, and return parameters. That is, firstly, it is necessary to analyze the API interface parameters of the data provider, which include request address, request method, request header parameters, request parameters, return parameters, etc. Based on the analysis of the API interface parameters of the data provider, determine the scenarios that the external interface adapter needs to adapt to.

[0045] It should be noted that for the synchronization interface configuration page in this application, the information filling columns include: interface name, request address (i.e., the API interface address of the data provider), request method, request header parameters, request parameters, return parameters, data level where the business return parameters are located, data storage table name, data table primary key field name, whether enabled, and buttons include Cancel, Interface Test, and Keep.

[0046] Furthermore, in one embodiment, the synchronization interface configuration item of the external interface adapter is configured to achieve communication with the data provider API interface, and the specific steps include:

[0047] S101: Based on the synchronous interface configuration page of the external interface adapter, configure the API interface parameters of the data provider to the external interface adapter to implement the configuration of the synchronous interface configuration items of the external interface adapter;

[0048] S102: Perform an interface connectivity test to ensure that the external interface adapter and the data provider API interface are connected normally.

[0049] That is, enter the synchronization interface configuration page and correctly configure the API interface parameter information provided by the data provider. After the configuration is completed, click the interface test button to perform an interface connectivity test to ensure that the external interface adapter and the data provider's API interface are connected normally.

[0050] When configuring the API interface parameters of the data provider to the external interface adapter, for the request parameters: the request parameters support dynamic parameter configuration, the dynamic parameters include the time range parameters of the set date, and the dynamic parameters support the query of incremental and full data after dynamic values ​​are taken.

[0051] Furthermore, in one embodiment, after performing the interface connectivity test, the following is further included:

[0052] S103: configuring the data storage table name corresponding to the API data of the data provider after it is stored in the database and the primary key field name in the data table to the synchronization interface configuration page;

[0053] S104: configuring the data level where the service return parameters are located, and configuring the mapping relationship between the return fields of the data provider API interface and the fields of the demander database table;

[0054] S105: Configure whether the external interface adapter is enabled.

[0055] That is, after completing the interface connectivity test, continue to enter the data storage table name and primary key field name in the data table corresponding to the data provider's API data after it is stored in the synchronization interface configuration page, as well as the data level where the business return parameters are located, and the mapping relationship between the return field of the data provider's API interface and the field of the demander's database table. Then, select Enable external interface adapter in the Enable column, and finally click the Save button.

[0056] S2: After monitoring and obtaining that the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are obtained by scanning the corresponding table name after the API data of the data provider is stored in the database;

[0057] Further, in one embodiment, after monitoring that the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration item of the external interface adapter is obtained by scanning based on the corresponding table name after the API data of the data provider is stored in the database. The specific steps include:

[0058] When the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are scanned and obtained according to the corresponding data storage table name after the API data of the configured data provider is stored in the database, and the enabled status of the configured external interface adapter.

[0059] That is, when the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are scanned according to the data storage table name corresponding to the API data of the previously configured data provider after it is stored in the database, and the enabled status of the configured external interface adapter, so as to obtain the synchronization interface configuration items of the external interface adapter.

[0060] It should be noted that the scheduling service implements scheduled scheduling with a set period based on the Quartz scheduled task open source framework. For example, scheduled scheduling once a day is implemented based on the Quartz scheduled task open source framework. Quartz is an open source job scheduling framework.

[0061] S3: Parse the synchronization interface configuration items to obtain API interface parameters to call the external interface adapter, adapt the data returned by the data provider's API interface, and add or update the data into the database.

[0062] Further, in one embodiment, the synchronization interface configuration items are parsed to obtain API interface parameters to call the external interface adapter, and the data returned by the data provider API interface is adapted and added or updated into the database. The specific steps include:

[0063] S301: parsing the synchronization interface configuration items of the external interface adapter obtained by scanning, and obtaining API interface parameters to call the external interface adapter;

[0064] S302: The external interface adapter parses the data returned by the data provider API interface according to the data level where the configured service return parameters are located;

[0065] S303: According to the return fields of the external interface adapter, the mapping relationship between the return fields of the configured data provider API interface and the fields of the demander's database table, and the primary key field name in the data table after the configured data provider's API data is entered into the database, the data returned by the data provider API interface is adapted and added or updated into the database.

[0066] That is, parse the synchronization interface configuration items, obtain the previously configured API interface parameters, and then call the external interface adapter. According to the data level where the configured business return parameters are located, parse the data returned by the data provider API interface, and then according to the return field of the external interface adapter, the mapping relationship between the return field of the configured data provider API interface and the field of the demander's database table, and the primary key field name in the data table after the configured data provider's API data is entered into the database, adapt the data returned by the data provider API interface and add or update it into the database.

[0067] The external interface adapter described in this application is used for data synchronization. The logical structure is shown in Figure 2 As shown, the shared data interface of each data provider provides the data to be synchronized to the configurable external interface adapter. Under the timed synchronization of the scheduling service, the data to be synchronized provided to the external interface adapter is provided to the data demander and finally transferred to the data demander's database.

[0068] The data synchronization method based on the external interface configurable adapter in the embodiment of the present application obtains the API interface parameters of the data provider, configures the synchronization interface configuration items of the external interface adapter, and realizes the connection with the data provider's API interface. Then, after monitoring to obtain that the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are obtained by scanning based on the corresponding table name after the API data of the data provider is put into the database. Finally, the synchronization interface configuration items are parsed to obtain the API interface parameters for calling the external interface adapter, and the data returned by the data provider's API interface is adapted and added or updated into the database. The connection between the data provider and the data demander is realized through the external interface adapter for data synchronization. The method is suitable for most interface-based data synchronization scenarios and has a wide range of applications. In addition, the synchronization method of the present application has the advantages of less code intrusion, flexible configuration to increase or reduce the API interface that needs to be synchronized, strong scalability, etc., which effectively reduces the joint debugging work of docking with the external interface, shortens the R&D cycle, and greatly saves the R&D costs related to interface-based data synchronization.

[0069] In a second aspect, an embodiment of the present application further provides a data synchronization device based on an external interface configurable adapter.

[0070] In one embodiment, referring to Figure 3 , Figure 3 This is a functional module diagram of the data synchronization device based on the external interface configurable adapter of the present application. Figure 3 As shown, the data synchronization device based on the external interface configurable adapter includes an acquisition module, a configuration module and an execution module.

[0071] The acquisition module is used to obtain the API interface parameters of the data provider, configure the synchronous interface configuration items of the external interface adapter, and realize the connection with the data provider's API interface; the configuration module is used to monitor the data demander's synchronization service after being triggered by the scheduling service, and scan the corresponding table name after the data provider's API data is entered into the database to obtain the synchronous interface configuration items of the external interface adapter; the execution module is used to parse the synchronous interface configuration items to obtain the API interface parameters for calling the external interface adapter, and adapt the data returned by the data provider's API interface and add or update it into the database.

[0072] In this application, API interface parameters include request address, request method, request header parameters, request parameters and return parameters.

[0073] In this application, the synchronization interface configuration items of the external interface adapter are configured to achieve communication with the data provider API interface. The specific steps include:

[0074] Based on the synchronous interface configuration page of the external interface adapter, configure the API interface parameters of the data provider to the external interface adapter to implement the configuration of the synchronous interface configuration items of the external interface adapter;

[0075] Perform interface connectivity test to ensure normal connectivity between the external interface adapter and the data provider's API interface.

[0076] In this application, when configuring the API interface parameters of the data provider to the external interface adapter, for the request parameters:

[0077] The request parameters support dynamic parameter configuration, the dynamic parameters include time range parameters for setting dates, and the dynamic parameters support query of incremental and full data after dynamic values ​​are taken.

[0078] In this application, after the interface connectivity test is performed, it also includes:

[0079] Configure the corresponding data storage table name and primary key field name in the data table after the data provider's API data is stored in the database to the synchronization interface configuration page;

[0080] Configure the data level where the business return parameters are located, as well as the mapping relationship between the return fields of the data provider's API interface and the fields of the demander's database table;

[0081] Configure whether the external interface adapter is enabled.

[0082] In this application, after monitoring that the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are obtained by scanning the corresponding table name after the API data of the data provider is stored in the database. The specific steps include:

[0083] When the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are scanned and obtained according to the corresponding data storage table name after the API data of the configured data provider is stored in the database, and the enabled status of the configured external interface adapter.

[0084] In this application, the scheduling service implements scheduled scheduling with a set period based on the Quartz scheduled task open source framework.

[0085] In this application, the synchronization interface configuration items are parsed to obtain API interface parameters to call the external interface adapter, and the data returned by the data provider's API interface is adapted and added or updated into the database. The specific steps include:

[0086] Parse the synchronous interface configuration items of the scanned external interface adapter, and obtain the API interface parameters to call the external interface adapter;

[0087] The external interface adapter parses the data returned by the data provider API interface according to the data level of the configured business return parameters;

[0088] According to the mapping relationship between the return fields of the external interface adapter, the return fields of the configured data provider API interface and the fields of the demander's database table, as well as the primary key field name in the data table after the configured data provider's API data is entered into the database, the data returned by the data provider's API interface is adapted and added or updated into the database.

[0089] By obtaining the API interface parameters of the data provider, the synchronization interface configuration items of the external interface adapter are configured to achieve communication with the data provider's API interface. Then, after monitoring to obtain that the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are obtained by scanning based on the corresponding table name after the data provider's API data is stored in the database. Finally, the synchronization interface configuration items are parsed to obtain the API interface parameters for calling the external interface adapter, and the data returned by the data provider's API interface is adapted and added or updated into the database. The connection between the data provider and the data demander is achieved through the external interface adapter for data synchronization. This is suitable for most interface-based data synchronization scenarios and has a wide range of applications. In addition, the synchronization method of this application has less code intrusion, and can flexibly configure to increase or reduce the API interface that needs to be synchronized. It has the advantages of strong scalability, etc., which effectively reduces the joint debugging work of docking with external interfaces, shortens the R&D cycle, and greatly saves the R&D costs related to interface-based data synchronization.

[0090] Among them, the functional implementation of each module in the above-mentioned data synchronization device based on the external interface configurable adapter corresponds to the steps in the above-mentioned data synchronization method embodiment based on the external interface configurable adapter, and its functions and implementation processes are no longer repeated here.

[0091] In a third aspect, an embodiment of the present application provides a data synchronization device based on an external interface configurable adapter. The data synchronization device based on the external interface configurable adapter can be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.

[0092] Reference Figure 4 , Figure 4 The hardware structure diagram of the data synchronization device based on the external interface configurable adapter involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the data synchronization device based on the external interface configurable adapter may include a processor, a memory, a communication interface and a communication bus.

[0093] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0094] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces, which are used to realize the interconnection of devices inside the data synchronization device based on the external interface configurable adapter, and interfaces used to realize the interconnection between the data synchronization device based on the external interface configurable adapter and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.

[0095] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0096] The processor may be a general-purpose processor, which may call the data synchronization program based on the external interface configurable adapter stored in the memory and execute the data synchronization method based on the external interface configurable adapter provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the data synchronization program based on the external interface configurable adapter is called may refer to the various embodiments of the data synchronization method based on the external interface configurable adapter of the present application, which will not be described in detail here.

[0097] Those skilled in the art will understand that Figure 4 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0098] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0099] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0100] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0101] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0102] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0103] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0104] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data synchronization method based on an external interface configurable adapter, characterized in that: The data synchronization method based on the external interface configurable adapter includes: Obtain the API interface parameters of the data provider, configure the synchronization interface configuration items of the external interface adapter, and achieve communication with the API interface of the data provider; After the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are obtained by scanning the corresponding table name based on the API data of the data provider after it is stored in the database; Parse the synchronization interface configuration items to obtain API interface parameters to call the external interface adapter, and adapt the data returned by the data provider's API interface and add or update it into the database; Among them, after the monitoring obtains that the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration item of the external interface adapter is obtained by scanning based on the corresponding table name after the API data of the data provider is stored in the database. The specific steps include: When the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are scanned and obtained according to the corresponding data storage table name after the configured data provider's API data is stored in the database, and the enabled state of the configured external interface adapter; The API interface parameters include request address, request method, request header parameters, request parameters and return parameters.

2. A data synchronization method based on an external interface configurable adapter as claimed in claim 1, characterized in that: The configuration of the synchronization interface configuration item of the external interface adapter to achieve the connection with the data provider API interface includes the following specific steps: Based on the synchronous interface configuration page of the external interface adapter, configure the API interface parameters of the data provider to the external interface adapter to implement the configuration of the synchronous interface configuration items of the external interface adapter; Perform interface connectivity test to ensure normal connectivity between the external interface adapter and the data provider's API interface.

3. A data synchronization method based on an external interface configurable adapter as claimed in claim 2, characterized in that: When configuring the API interface parameters of the data provider to the external interface adapter, for the request parameters: The request parameters support dynamic parameter configuration, the dynamic parameters include time range parameters for setting dates, and the dynamic parameters support query of incremental and full data after dynamic values ​​are taken.

4. A data synchronization method based on an external interface configurable adapter as claimed in claim 2, characterized in that: After the interface connectivity test is performed, the following is also included: Configure the corresponding data storage table name and primary key field name in the data table after the data provider's API data is stored in the database to the synchronization interface configuration page; Configure the data level where the business return parameters are located, as well as the mapping relationship between the return fields of the data provider's API interface and the fields of the demander's database table; Configure whether the external interface adapter is enabled.

5. A data synchronization method based on an external interface configurable adapter as claimed in claim 4, characterized in that: The scheduling service implements scheduled scheduling with a set period based on the Quartz scheduled task open source framework.

6. A data synchronization method based on an external interface configurable adapter as claimed in claim 4, characterized in that: The step of parsing the synchronization interface configuration item to obtain API interface parameters to call the external interface adapter, and adapting the data returned by the data provider's API interface to add or update the data into the database includes: Parse the synchronous interface configuration items of the scanned external interface adapter, and obtain the API interface parameters to call the external interface adapter; The external interface adapter parses the data returned by the data provider API interface according to the data level of the configured business return parameters; According to the mapping relationship between the return fields of the external interface adapter, the return fields of the configured data provider API interface and the fields of the demander's database table, as well as the primary key field name in the data table after the configured data provider's API data is entered into the database, the data returned by the data provider's API interface is adapted and added or updated into the database.

7. A data synchronization device based on an external interface configurable adapter, characterized in that: The data synchronization device based on the external interface configurable adapter includes: The acquisition module is used to obtain the API interface parameters of the data provider, configure the synchronization interface configuration items of the external interface adapter, and realize the connection with the API interface of the data provider; A configuration module is used to monitor and obtain the synchronization service of the data demander after it is triggered by the scheduling service, and then scan the corresponding table name after the API data of the data provider is stored to obtain the synchronization interface configuration item of the external interface adapter; The execution module is used to parse the synchronization interface configuration items to obtain API interface parameters to call the external interface adapter, and adapt the data returned by the data provider's API interface and add or update it into the database; Among them, after the monitoring obtains that the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration item of the external interface adapter is obtained by scanning based on the corresponding table name after the API data of the data provider is stored in the database. The specific steps include: When the synchronization service of the data demander is triggered by the scheduling service, the synchronization interface configuration items of the external interface adapter are scanned and obtained according to the corresponding data storage table name after the configured data provider's API data is stored in the database, and the enabled state of the configured external interface adapter; The API interface parameters include request address, request method, request header parameters, request parameters and return parameters.

8. A data synchronization device based on an external interface configurable adapter, characterized in that: The data synchronization device based on the external interface configurable adapter includes a processor, a memory, and a data synchronization program based on the external interface configurable adapter stored in the memory and executable by the processor, wherein when the data synchronization program based on the external interface configurable adapter is executed by the processor, the steps of the data synchronization method based on the external interface configurable adapter as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Data acquisition system and method capable of being flexibly matched with interface

    CN113821558A

  • Data synchronization method and device, computer equipment and storage medium

    CN114510529A