Data synchronization method, electronic equipment and computer readable storage medium

By comparing table identifiers and metadata, confirming the consistency of configuration table structure and performing data synchronization, the problems of cumbersome and inefficient data synchronization in the existing technology are solved, and an efficient data synchronization method is realized.

CN119271743APending Publication Date: 2025-01-07ZHONGKE YUNGU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411383720.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Existing inter-system data synchronization methods such as data synchronization between SAP systems and external systems are cumbersome, inefficient, and require additional server resources and a lot of manpower.

Method used

By obtaining table identifiers and metadata, comparing the consistency of the table structure of the configuration table, and synchronizing data when it is consistent, using dynamic programming and JSON protocol to convert synchronous data formats and send them pages, reducing interface development work.

Benefits of technology

It improves the efficiency of data synchronization, reduces interface development work, reduces labor and time costs, and achieves efficient data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271743A_ABST
    Figure CN119271743A_ABST
Patent Text Reader

Abstract

The invention provides a data synchronization method, electronic equipment and a computer readable storage medium, and the method comprises the steps: obtaining a first request which comprises a table identifier of a first configuration table, metadata and a system source; on the basis of the table identifier of the first configuration table, comparing the metadata with metadata of a corresponding second configuration table in a database to confirm whether the first configuration table is consistent with the table structure of the second configuration table; when the table structures are consistent, a second request is obtained, and the second request comprises a table identifier of the first configuration table and a system source of the first configuration table; and acquiring corresponding synchronous data according to the second request, and sending the synchronous data to a front-end system. When the table structures are consistent, data synchronization can be performed according to the request, and the data synchronization efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data synchronization method, an electronic device and a computer-readable storage medium. Background Art

[0002] At present, in order to achieve data synchronization between systems, synchronous interface technology is needed. For example, enterprise management solutions (Systems Applications and Products in Data Processing, SAP) systems and external systems often use process integration (PI) middleware to achieve data synchronization. It has high real-time performance, can process big data, and has detailed interface data logs stored in the PI system, but it requires additional server resources and the configuration work is cumbersome.

[0003] As SAP interacts more and more with peripheral systems, the demand for various types of data synchronization is also increasing. Because the data synchronization requirements of various scenarios are different, each requirement needs to develop and implement functions and PI configuration interfaces, which is too cumbersome, inefficient, and wastes a lot of manpower and time.

[0004] Therefore, there is an urgent need for a data synchronization method, an electronic device and a computer-readable storage medium to solve the above problems. Summary of the invention

[0005] The technical problem solved by the present invention is to provide a data synchronization method, an electronic device and a computer-readable storage medium, which can obtain configuration tables with the same table structure through table identifiers and metadata, thereby performing data synchronization with high efficiency.

[0006] The present invention solves the technical problem by adopting the following technical solutions:

[0007] A data synchronization method comprises: obtaining a first request, wherein the first request comprises a table identifier, metadata and a system source of a first configuration table; based on the table identifier of the first configuration table, comparing the metadata of the first configuration table with the metadata of a corresponding second configuration table in a database to confirm whether the table structure of the first configuration table is consistent with the table structure of the second configuration table, and generating corresponding comparison result information of the table structure; if a second request is obtained, and the second request comprises the table identifier of the first configuration table and the system source of the first configuration table, then when the table structure comparison result information is consistent, obtaining corresponding synchronization data according to the second request, and sending the synchronization data to a front-end system.

[0008] In a preferred embodiment of the present invention, before the above-mentioned step of obtaining the first request, it includes: in response to the data synchronization request, obtaining the table identifier and metadata of the front-end system through a preset universal data interface to update the first configuration table, wherein the input parameters of the universal data interface include at least one of a table identifier parameter, a metadata parameter, a start row parameter, a data volume parameter and a system source parameter.

[0009] In a preferred embodiment of the present invention, the above-mentioned step of comparing the metadata of the first configuration table with the metadata of the corresponding second configuration table in the database based on the table identifier of the first configuration table includes: obtaining the second configuration table having the same table identifier as the first configuration table from the database of the current system according to the table identifier; and comparing the metadata of the first configuration table with the metadata of the second configuration table.

[0010] In a preferred embodiment of the present invention, the above-mentioned step of comparing the metadata of the first configuration table with the metadata of the corresponding second configuration table in the database to confirm whether the table structure of the first configuration table is consistent with the table structure of the second configuration table, and generating the corresponding table structure comparison result information, includes: when the metadata of the first configuration table is the same as the metadata of the second configuration table, confirming that the table structures are consistent, and inserting first result data into the second configuration table; when the metadata are different, confirming that the table structures are inconsistent, and inserting second result data into the second configuration table, wherein the second result data is different from the first result data.

[0011] In a preferred embodiment of the present invention, if the second request is obtained, and the second request includes the table identifier of the first configuration table and the system source of the first configuration table, then when the table structure comparison result information is consistent, the step of obtaining corresponding synchronization data according to the second request and sending the synchronization data to the front-end system includes: querying the second configuration table according to the table identifier of the first configuration table and the system source of the first configuration table; when it is detected that the first result data exists in the second configuration table, obtaining corresponding synchronization data according to the second request, and sending the synchronization data to the front-end system.

[0012] In a preferred embodiment of the present invention, the above-mentioned step of obtaining corresponding synchronization data according to the second request and sending the synchronization data to the front-end system includes: using dynamic programming to obtain the synchronization data of the SQL query in the second request, and saving it into a dynamic table type array object; converting the format of the synchronization data in the dynamic table type array object into a preset format, and sending the synchronization data in the preset format to the front-end system.

[0013] In a preferred embodiment of the present invention, the output parameter format of the above-mentioned universal data interface is a JSON array; the step of converting the format of the synchronization data in the dynamic table type array object into a preset format, and sending the synchronization data in the preset format to the front-end system, includes: obtaining the synchronization data stored in the dynamic table type array object, and converting the format of the synchronization data into JSON format based on the JSON protocol; obtaining the starting row and data volume set by the first configuration table; paging the synchronization data in JSON format according to the starting row and data volume, and sending the paginated synchronization data to the front-end system in sequence.

[0014] In a preferred embodiment of the present invention, the above-mentioned step of sending the paginated synchronization data to the front-end system in sequence includes: sending the paginated synchronization data to the front-end system through the preset universal data interface, so that the front-end system parses and stores the synchronization data in JSON format.

[0015] An electronic device comprises: a memory and a processor, wherein a data synchronization program is stored in the memory, and when the data synchronization program is executed by the processor, the steps of the data synchronization method described in any one of the above are implemented.

[0016] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data synchronization method described in any one of the above are implemented.

[0017] The technical effect achieved by the above technical solution of the present invention is: confirming whether the table structures of the first configuration table and the second configuration table are consistent through a first request with information such as table identifier and table metadata; when they are consistent, querying the second configuration table with the table identifier and system source through a second request to achieve data synchronization, thereby greatly improving data synchronization efficiency.

[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A flowchart of a data synchronization method according to a first embodiment of the present invention;

[0020] Figure 2 This is a flow chart of a data synchronization interface shown in the first embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, the embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present invention. Through the description of the specific implementation methods, the technical means and effects taken by the present invention to achieve the predetermined purpose can be more deeply and specifically understood, and the attached drawings are only for reference and explanation purposes, and are not used to limit the present invention.

[0022] See also Figure 1 , Figure 1 This is a flowchart showing the steps of a data synchronization method according to the first embodiment of the present invention.

[0023] like Figure 1 As shown, the data synchronization method provided in this embodiment includes the following steps:

[0024] S11: Obtain a first request, wherein the first request includes a table identifier, metadata, and system source of a first configuration table.

[0025] The first request is sent from the front-end system to the back-end system; the table identifier, metadata and system source of the first configuration table are obtained by the front-end system that needs to obtain data from the current system (i.e., the back-end system) database, or from the front-end system that needs to synchronize data to the current system (i.e., the back-end system) database.

[0026] The first configuration table can be obtained through a universal data interface, wherein the universal data interface sets input parameters and output parameters. The first configuration table is obtained by obtaining corresponding data from the front-end system through the input parameter setting of the universal data interface.

[0027] It should be noted that the table structure of the first configuration table is determined by the input parameter setting of the universal data interface.

[0028] The table identifier refers to the name or identifier that uniquely identifies a table in the database, usually including the table name (i.e., table ID), primary key, index, etc. The table name is the unique identifier of the table in the database, and the data in the table can be accessed and operated through the table name.

[0029] Among them, metadata (also known as metadata), also known as intermediary data, relay data, is data that describes data (also known as dataaboutdata), mainly information that describes data attributes (also known as property), used to support functions such as indicating storage location, historical data, resource search, file records, etc. Metadata is information about the organization of data, data domains and their relationships, so it is also called "data about data". In database systems, metadata plays a vital role. Metadata describes the basic information of database objects (such as libraries, tables, columns, indexes) and the meaning of data.

[0030] The system source refers to the system (also called the front-end system) from which data needs to be obtained. The system source can be various types of systems, such as an ERP system, a CRM system, a supply chain management system, etc.

[0031] Optionally, before the step of obtaining the first request, it includes: in response to the data synchronization request, obtaining the table identifier and metadata of the front-end system through a preset universal data interface to update the first configuration table, wherein the input parameters of the universal data interface include at least one of a table identifier parameter, a metadata parameter, a start row parameter, a data volume parameter and a system source parameter.

[0032] The format of the general data interface includes: input parameters and output parameters. Input parameters include: table identifier parameters, system source parameters, start row parameters, data volume parameters, and metadata parameters, etc. Output parameters include: return data format is JSON array and success mark, etc.

[0033] The table structure of the configuration table can be set through the universal data interface so that data with the same table structure can be synchronized using the universal data interface, thereby reducing the development of interfaces required for data synchronization.

[0034] S12: Based on the table identifier of the first configuration table, compare the metadata of the first configuration table with the metadata of the corresponding second configuration table in the database to confirm whether the table structure of the first configuration table is consistent with the table structure of the second configuration table, and generate the comparison result information of the corresponding table structure.

[0035] In one embodiment, the second configuration table is a table stored in a backend system database. It should be noted that, except for the table identifier, the second configuration table and the first configuration table may be different in table structure and other specific contents.

[0036] In one embodiment, the comparison result includes two results: a consistent table structure and an inconsistent table structure. When the table structure is consistent, first result data is generated; when the table structure is inconsistent, second result data is generated.

[0037] Specifically, according to the table identifier / table ID in the first configuration table, a table with the same table identifier (i.e., the second configuration table) is obtained from the database of the system (also known as the backend system). If there is a second configuration table with the same table identifier as the first configuration table, the metadata in the first configuration table and the second configuration table are compared to confirm whether the table structures of the first configuration table and the second configuration table are consistent. If they are consistent, the first result data is generated and the next step is continued; if they are inconsistent, the second result data is generated and the operation ends.

[0038] Specifically, through the first request, the second configuration table with the same table identifier in the backend system can be obtained based on the table identifier of the first configuration table, and the metadata in the first configuration table and the second configuration table are compared to compare whether the table structures of the two systems (i.e., the front-end system and the back-end system) are consistent. If they are consistent, the second request is triggered to perform data synchronization.

[0039] Optionally, based on the table identifier of the first configuration table, the step of comparing the metadata of the first configuration table with the metadata of the corresponding second configuration table in the database includes: according to the table identifier, obtaining a second configuration table with the same table identifier as the first configuration table from the database of the current system; and comparing the metadata of the first configuration table with the metadata of the second configuration table.

[0040] The current system is the backend system, and a table with the same table identifier (ie, the second configuration table, which may be different from the first configuration table) can be obtained from the database of the backend system through the table identifier of the first configuration table.

[0041] Optionally, the step of confirming whether the table structure of the first configuration table is consistent with the table structure of the second configuration table, and generating the comparison result information of the corresponding table structure, includes: when the metadata are the same, confirming that the table structure is consistent, and inserting the first result data into the second configuration table; when the metadata are different, confirming that the table structure is inconsistent, and inserting the second result data into the second configuration table, wherein the second result data is different from the first result data.

[0042] Specifically, the metadata information of the corresponding second configuration table in the current system (i.e., the backend system) is compared based on the table identifier / table ID and metadata of the first configuration table. If the metadata of the two are the same, a piece of data (SAME=X, i.e., the first result data) is generated and inserted into the second configuration table to confirm that the table structures of the two are consistent, and the request success information is returned: "The table structure is consistent" to the front-end system; if the metadata of the two are different, a piece of data (SAME=empty, i.e., the second result data) is generated and inserted into the second configuration table to confirm that the table structures are inconsistent, and the request failure information is directly returned: "The query failed, the function is under development" to the front-end system.

[0043] S13: If a second request is obtained, and the second request includes the table identifier of the first configuration table and the system source of the first configuration table, when the table structure comparison result information is consistent, corresponding synchronization data is obtained according to the second request, and the synchronization data is sent to the front-end system.

[0044] In one implementation, the synchronization data is data obtained by the front-end system from the second configuration table of the current system (ie, the back-end system) through the second request, and may also be other base table data.

[0045] It should be noted that the data synchronization in this implementation may involve non-business data such as configuration tables and master data.

[0046] It should be noted that after receiving the first result data request confirmation table structure is consistent, the back-end system will return the request success information to the front-end system. After receiving the request success information, the front-end system will send the second request to the back-end system again. The back-end system can determine whether the data request sent by the front-end system is the first or second time based on the system source; if two data requests from the same system are received within 1 minute, the second data request received will be confirmed as the second request.

[0047] Through the above method, the table structures of the configuration tables in the front-end system and the back-end system are compared through information such as table identifiers and table metadata. When the table structures are the same, the table data is read for data synchronization. When it is necessary to synchronize tables with the same structure in subsequent requirements, they can be used directly without the need to develop interfaces again, which greatly reduces the duplication of interface development work.

[0048] Optionally, if a second request is obtained and the second request includes the table identifier and system source of the first configuration table, then when the table structure comparison result information is consistent, the steps of obtaining corresponding synchronization data according to the second request and sending the synchronization data to the front-end system include: querying the second configuration table according to the table identifier and system source of the first configuration table; when it is detected that the first result data exists in the second configuration table, obtaining corresponding synchronization data according to the second request, and sending the synchronization data to the front-end system.

[0049] Specifically, according to the table identifier / table ID and the source system in the first configuration table, the corresponding second configuration table in the back-end system is queried. If SAME=X (i.e., the first result data) is detected in the second configuration table, proceed to the next step; if SAME=empty (i.e., the second result data) is detected in the second configuration table, the request failure information is directly returned: "Based on the table ID and the source system, the query has no results."

[0050] Specifically, after receiving the first request, the backend system determines whether the table structures of the two configuration tables with the same table identifier are consistent. If they are consistent, a consistent log record (i.e., the first result data) will be inserted into the log of the configuration table. In the second request, it is necessary to determine whether data synchronization can be performed based on the log record information inserted when the first result data is requested; if the table structure is confirmed to be consistent according to the log record, the corresponding synchronization data can be obtained from the backend system based on the general data acquisition logic for data synchronization; if it is confirmed that the table structures of the two configuration tables are inconsistent, it is not possible to obtain synchronization data for data synchronization.

[0051] It should be noted that whether data synchronization can be performed is confirmed by reading the result data in the second configuration table. That is, data synchronization is performed only when the first result data exists, which can avoid the front-end system sending a request to the back-end system again after receiving the request failure information, causing the back-end system to mistakenly identify it as the second request and perform erroneous data synchronization.

[0052] Optionally, the step of obtaining corresponding synchronization data according to the second request and sending the synchronization data to the front-end system includes: using dynamic programming to obtain the synchronization data of the SQL query in the second request, and saving it in a dynamic table type array object; converting the format of the synchronization data in the dynamic table type array object into a preset format, and sending the synchronization data in the preset format to the front-end system.

[0053] Specifically, if the second configuration table is queried to have SAME=X (i.e., the first result data), the synchronization data of the SQL query in the second request is stored in the dynamic table type array object by using the dynamic programming method (dynamic proxy class, dynamic structure of the query table, and construction of a temporary dynamic table object). Then, by using the preset transmission protocol set by the general data interface, the acquired synchronization data is converted into a preset format, and then the synchronization data in the preset format is provided to the front-end system.

[0054] Optionally, the output parameter format of the universal data interface is a JSON array; the step of converting the format of the synchronization data in the dynamic table type array object into a preset format, and sending the synchronization data in the preset format to the front-end system includes: obtaining the synchronization data stored in the dynamic table type array object, and converting the format of the synchronization data into a JSON format based on the JSON protocol; obtaining the starting row and data volume set in the first configuration table; paging the synchronization data in JSON format according to the starting row and data volume, and sending the paginated synchronization data to the front-end system in sequence.

[0055] The JSON protocol is the transmission protocol set by the output parameters of the general data interface. If the output parameters of the general data interface are set to other protocols, the obtained synchronization data needs to be converted into the corresponding format.

[0056] To prevent the transmission data of the universal data interface from being too large, the synchronization data may be paged through the information such as the start row and data volume set in the first configuration table in the second request, thereby reducing the data volume transmitted by a single interface.

[0057] Optionally, the step of sending the paginated synchronization data to the front-end system in sequence includes: sending the paginated synchronization data to the front-end system through a universal data interface, so that the front-end system parses and stores the synchronization data in JSON format.

[0058] Specifically, after the required synchronization data is queried through SQL, it is converted into JSON according to the JSON protocol set by the general data interface, and then the JSON-converted synchronization data is paginated according to the set start row and data volume information, and then sent to the front-end system. The front-end system can parse the received synchronization data according to the table structure of the configuration table and the JSON protocol information, and store the synchronization data in the corresponding configuration table in the database after parsing.

[0059] See also Figure 2 , Figure 2 This is a flow chart of a data synchronization interface shown in the first embodiment of the present invention.

[0060] like Figure 2 As shown in the figure, the process of the data synchronization interface is as follows:

[0061] S21: Get the first request;

[0062] S22: Determine whether the table ID and table data are consistent; if not, execute S23; if yes, execute S24;

[0063] S23: insert configuration table: SAME = empty, and execute S25;

[0064] S24: insert into the configuration table: SAME=X, and execute S26;

[0065] S25: Return failure information;

[0066] S26: Return success information;

[0067] S27: Get the second request;

[0068] S28: query the configuration table by table ID and source system (also called system source);

[0069] S29: Determine whether SAME is equal to X; if yes, execute S30; if no, execute S31;

[0070] S30: query the table according to SQL and return data;

[0071] S31: Returns error information: table ID and source system, query has no results.

[0072] Exemplarily, the front-end system sends a first request (i.e., the first request) to the back-end system through a universal data interface, and can obtain the corresponding table ID, table metadata, system source and other information according to the input parameters of the universal data interface to update the configuration table to obtain the first configuration table. According to the table ID + table metadata, compare the metadata information of the corresponding configuration table (i.e., the second configuration table) in this system (back-end system). If the metadata is the same, insert a piece of data (SAME=X) into the configuration table (i.e., the second configuration table), and return a success message: 'The table structure is consistent' to the front-end system; if it is different, insert a piece of data (SAME=empty) into the second configuration table, and return a failure message to end the operation. If the front-end system receives a success message returned by the back-end system after sending the first request, it continues to send a second request (i.e., the second request, input parameters: table ID, system source, start row, data volume), and the second request contains an SQL statement for obtaining synchronized data. According to the table ID + source system, query the corresponding configuration table in the backend system; determine whether SAME in the table is equal to X; if so, query the table according to SQL and return the synchronized data; if not, directly return the error message: 'Table ID + source system, query no results'.

[0073] It should be noted that the configuration table can be updated based on the table ID + table metadata. The configuration table structure is as follows:

[0074]

[0075] The data synchronization method of this embodiment uses table ID + table metadata to distinguish whether the table structures of two configuration tables are the same; if they are the same, the synchronization data can be read for synchronization, which greatly improves the data synchronization efficiency; at the same time, if subsequent needs require the synchronization of tables with the same structure, no additional development work is required, which greatly reduces the repeated development of interfaces; the synchronization function of non-business data such as master data and configuration tables can also be realized through a universal data interface. Through the universal data interface, unified management of basic data synchronization between the back-end system and the front-end system is realized.

[0076] The present invention also provides an electronic device, comprising: a memory and a processor, wherein a data synchronization program is stored in the memory, and when the data synchronization program is executed by the processor, the steps of the data synchronization method as described in any one of the above are implemented.

[0077] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data synchronization method as described in any one of the above are implemented.

[0078] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a portion of the steps in the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0079] Through the description of the above implementation methods, those skilled in the art can clearly understand that the embodiments of the present invention can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the embodiments of the present invention.

[0080] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the specific details in the above embodiments. The above embodiments and drawings are exemplary. The modules or processes in the drawings are not necessarily required to implement the embodiments of the present invention and cannot be understood as limitations on the present invention. Within the technical concept of the present invention, the technical scheme of the present invention can be subjected to a variety of simple modifications and combinations, and these simple modifications and combinations all belong to the protection scope of the present invention.

Claims

1. A data synchronization method, characterized in that: include: Obtaining a first request, wherein the first request includes a table identifier, metadata, and a system source of a first configuration table; Based on the table identifier of the first configuration table, compare the metadata of the first configuration table with the metadata of the corresponding second configuration table in the database to confirm whether the table structure of the first configuration table is consistent with the table structure of the second configuration table, and generate corresponding table structure comparison result information; If a second request is obtained, and the second request includes the table identifier of the first configuration table and the system source of the first configuration table, then when the table structure comparison result information is consistent, the corresponding synchronization data is obtained according to the second request, and the synchronization data is sent to the front-end system.

2. The data synchronization method according to claim 1, characterized in that: Before the step of obtaining the first request, the method includes: In response to a data synchronization request, the table identifier and metadata of the front-end system are obtained through a preset universal data interface to update the first configuration table, wherein the input parameters of the universal data interface include at least one of a table identifier parameter, a metadata parameter, a start row parameter, a data volume parameter and a system source parameter.

3. The data synchronization method according to claim 2, characterized in that: The step of comparing the metadata of the first configuration table with the metadata of the corresponding second configuration table in the database based on the table identifier of the first configuration table includes: According to the table identifier, acquiring the second configuration table having the same table identifier as the first configuration table from the database of the current system; The metadata of the first configuration table is compared with the metadata of the second configuration table.

4. The data synchronization method according to claim 1, characterized in that: The step of comparing the metadata of the first configuration table with the metadata of the corresponding second configuration table in the database to confirm whether the table structure of the first configuration table is consistent with the table structure of the second configuration table, and generating the comparison result information of the corresponding table structure includes: When the metadata of the first configuration table is the same as the metadata of the second configuration table, confirming that the table structures are consistent, and inserting the first result data into the second configuration table; When the metadata are not the same, it is confirmed that the table structures are inconsistent, and second result data are inserted into the second configuration table, wherein the second result data is different from the first result data.

5. The data synchronization method according to claim 4, characterized in that: If a second request is obtained, and the second request includes the table identifier of the first configuration table and the system source of the first configuration table, then when the table structure comparison result information is consistent, the step of obtaining corresponding synchronization data according to the second request and sending the synchronization data to the front-end system includes: querying the second configuration table according to the table identifier of the first configuration table and the system source of the first configuration table; When it is detected that the first result data exists in the second configuration table, corresponding synchronization data is acquired according to the second request, and the synchronization data is sent to the front-end system.

6. The data synchronization method according to claim 2 or 5, characterized in that: The step of acquiring corresponding synchronization data according to the second request and sending the synchronization data to the front-end system includes: Using dynamic programming, obtain the synchronization data of the SQL query in the second request, and save it into a dynamic table type array object; The format of the synchronization data in the dynamic table type array object is converted into a preset format, and the synchronization data in the preset format is sent to the front-end system.

7. The data synchronization method according to claim 6, characterized in that: The output parameter format of the general data interface is a JSON array; The step of converting the format of the synchronization data in the dynamic table type array object into a preset format and sending the synchronization data in the preset format to the front-end system includes: Acquire the synchronization data stored in the dynamic table type array object, and convert the format of the synchronization data into JSON format based on the JSON protocol; Obtain the starting row and data volume of the first configuration table settings; The synchronization data in the JSON format is paged according to the start row and the data volume, and the paged synchronization data is sent to the front-end system in sequence.

8. The data synchronization method according to claim 7, characterized in that: The step of sending the paging synchronization data to the front-end system in sequence includes: The paginated synchronization data is sent to the front-end system through the preset universal data interface, so that the front-end system parses and stores the synchronization data in JSON format.

9. An electronic device, characterized in that: The electronic device comprises: a memory and a processor, wherein a data synchronization program is stored in the memory, and when the data synchronization program is executed by the processor, the steps of the data synchronization method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data synchronization method according to any one of claims 1 to 8 are implemented.