Joint debugging environment database synchronization method and device, electronic equipment and storage medium

By introducing a data transmission platform into the joint debugging environment, access control and automated data synchronization are achieved, solving the database consistency problem caused by manual synchronization, improving the efficiency and security of data synchronization, realizing the security and consistency of online data, and improving the efficiency of collaborative development and testing.

CN121919285APending Publication Date: 2026-04-24FENGLING CHUANGJING (BEIJING) TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing methods for synchronizing databases in the testing environment rely on manual operations, which are prone to errors and inefficient, making it difficult to guarantee the consistency of the test environment database.

Method used

By introducing a data transmission platform as a data synchronization tool between the upstream online database and the downstream joint debugging platform, access control and automated data synchronization are achieved, including processes such as task configuration, permission judgment, task startup and data synchronization, to ensure data security and consistency.

Benefits of technology

It enables automatic synchronization of online data to the downstream joint testing database, ensuring database consistency and security, improving the efficiency of collaborative development and testing, and reducing errors caused by manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121919285A_ABST
    Figure CN121919285A_ABST
Patent Text Reader

Abstract

The invention provides a joint debugging environment database synchronization method and device, electronic equipment and a storage medium, and the method comprises the steps: initiating a task configuration request of a data synchronization task to a data transmission platform through a joint debugging platform under the condition that a target user account is used for logging in a joint debugging platform and there is a database synchronization demand; the method comprises the following steps: judging whether a target user account has a data synchronization permission or not based on a received task configuration request through a data transmission platform; under the condition that the target user account has the data synchronization permission, a task identifier of a data synchronization task is allocated to the joint debugging platform through the data transmission platform; calling a task starting interface of the data transmission platform based on the task identifier through the joint debugging platform to start a data synchronization task; and performing data synchronization from the target online database indicated by the data synchronization task to a downstream joint debugging database of the joint debugging platform through the data transmission platform. According to the method, the function of synchronizing the data in the online database to the offline joint debugging database can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data synchronization technology, and in particular to a database synchronization method, apparatus, electronic device, and storage medium for a joint debugging environment. Background Technology

[0002] The application scenario for database synchronization in integration testing environments is when developers from different teams or departments need to collaboratively test their code within a single integration testing environment. To ensure that all modules can work together correctly, it is necessary to maintain a consistent database structure across the testing environment. Ensuring database consistency is a critical issue, and existing technologies typically involve manual synchronization: each team manages its own database scripts and periodically maintains the database table structure and data in the integration testing environment. However, manual synchronization is prone to errors and inefficient due to human intervention. Summary of the Invention

[0003] This application provides a method, apparatus, electronic device, and storage medium for synchronizing a database in a joint debugging environment. It enables the synchronization of data from an online database to an offline joint debugging database. The technical solution is as follows: According to one aspect of this application, a database synchronization method for a joint debugging environment is provided, the method being applied to an electronic device, the electronic device having a data transmission platform and a joint debugging platform deployed therein, the method comprising: When logging into the integration platform using the target user account and there is a database synchronization requirement, initiate a task configuration request for data synchronization to the data transmission platform through the integration platform; The data transmission platform determines whether the target user account has data synchronization permissions based on the received task configuration request. If the target user account has the data synchronization permission, the data transmission platform assigns a task identifier for the data synchronization task to the joint debugging platform. The data synchronization task is initiated by the joint debugging platform by calling the task initiation interface of the data transmission platform based on the task identifier. Data synchronization is performed from the target online database indicated by the data synchronization task to the downstream joint debugging database corresponding to the joint debugging platform through the data transmission platform.

[0004] According to another aspect of this application, a database synchronization device for a joint debugging environment is provided. The device is applied to an electronic device, which deploys a data transmission platform and a joint debugging platform. The device includes: The task initiation module is used to initiate a data synchronization task configuration request from the joint debugging platform to the data transmission platform when the target user account logs into the joint debugging platform and there is a database synchronization requirement. The permission determination module is used to determine whether the target user account has data synchronization permission based on the received task configuration request through the data transmission platform; The allocation module is used to allocate a task identifier for the data synchronization task to the joint debugging platform through the data transmission platform when the target user account has the data synchronization permission. The task initiation module is used to initiate the data synchronization task by calling the task initiation interface of the data transmission platform based on the task identifier through the joint debugging platform; The data synchronization module is used to synchronize data from the target online database indicated by the data synchronization task to the downstream joint debugging database corresponding to the joint debugging platform through the data transmission platform.

[0005] According to one aspect of this application, an electronic device is provided, comprising: a processor and a memory storing a program, the program including instructions that, when executed by the processor, cause the processor to perform the joint debugging environment database synchronization method as described above.

[0006] According to another aspect of this application, a non-transitory computer-readable storage medium is provided that stores computer instructions for causing the computer to perform the joint debugging environment database synchronization method as described above.

[0007] According to another aspect of this application, a computer program product is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned joint debugging environment database synchronization method.

[0008] The beneficial effects of the technical solution provided in this application include at least the following: by adding a data transmission platform as a data synchronization tool between the upstream online database and the downstream joint debugging platform, and by using access control to allow authorized users to connect to the online database for data synchronization after logging into the joint debugging platform, the purpose of automatically synchronizing online data to the downstream joint debugging database is achieved, while ensuring the security of online data. Attached Figure Description

[0009] Further details, features, and advantages of this application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which: Figure 1 A flowchart of a database synchronization method for a joint debugging environment according to an exemplary embodiment of this application is shown; Figure 2A flowchart of another method for synchronizing a database in a joint debugging environment according to an exemplary embodiment of this application is shown; Figure 3 This is a schematic diagram of the structure of a database synchronization device for an operating and debugging environment provided in an embodiment of this application; Figure 4 A computer processing block diagram is shown that can be used to implement an exemplary electronic device according to embodiments of this application. Detailed Implementation

[0010] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.

[0011] It should be understood that the steps described in the method embodiments of this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.

[0012] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc., mentioned in this application are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies. It should be noted that the modifications "a" and "a plurality" mentioned in this application are illustrative and not restrictive, and those skilled in the art should understand that unless explicitly indicated in the context, they should be understood as "one or more". The names of messages or information exchanged between multiple devices in the embodiments of this application are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0013] The present invention will now be described with reference to the accompanying drawings. The technical solutions provided by the embodiments of the present invention will be explained in detail through specific examples and application scenarios.

[0014] This application's embodiments primarily address ensuring database synchronization with the online environment during joint testing, thereby improving the efficiency of collaborative development and testing. Please refer to... Figure 1 , Figure 1 A flowchart illustrating a database synchronization method for a joint debugging environment according to an exemplary embodiment of this application is shown. The method is explained using an example of its application in an electronic device. Figure 1 As shown, the method includes: Step 101: When logging into the joint debugging platform using the target user account and there is a database synchronization requirement, initiate a task configuration request for the data synchronization task to the data transmission platform through the joint debugging platform. Step 102: Based on the received task configuration request, the data transmission platform determines whether the target user account has data synchronization permissions. Step 103: If the target user account has data synchronization permissions, assign a task identifier for the data synchronization task to the joint debugging platform through the data transmission platform. Step 104: Start the data synchronization task by calling the task start interface of the data transmission platform based on the task identifier through the joint debugging platform; Step 105: Data synchronization is performed from the target online database indicated by the data synchronization task to the downstream joint debugging database corresponding to the joint debugging platform through the data transmission platform.

[0015] In order to support the construction of the joint debugging benchmark environment synchronization capability, this application embodiment adds a data transmission platform (DTS) to implement related functions, which is used to support the interface-based acquisition of database information, the creation of task processes, and task status callback notifications of the joint debugging platform. The data transmission platform mainly has the following functions: (1) It provides an open API to the outside world, which can perform operations such as creating and deleting tasks. (2) It provides a separate table structure subscription function, which can filter specified DML types. (3) When business synchronizes online data, it performs permission control, and online data can only be synchronized after the permission approval process. (4) It needs to perform callbacks after data synchronization is completed or when the status of other tasks changes. (5) It automatically resolves conflicts when data synchronization conflicts occur.

[0016] Data synchronization technology operates on three phases: structure migration, full data migration, and incremental data migration. Structure migration involves executing the "show create table" SQL statement in the source database to obtain the current table structure, which is then executed downstream. Full data migration involves executing the "select * from table limit xxx" statement in the source database, scanning the data in segments, and then constructing the SQL statement using the downstream table structure before execution. Incremental data migration leverages the characteristic that MySQL records insert, delete, and update operations in a binary log. The upstream table structure is used to parse the insert, delete, and update operations recorded in the binary log, and the resulting SQL statements are then executed downstream.

[0017] When using a data transmission platform for data synchronization, the data transmission platform acts as a data synchronization tool between the upstream online database and the downstream joint debugging platform. Through access control, it allows authorized users to connect to the online database for data synchronization after logging into the joint debugging platform. This achieves the goal of automatically synchronizing online data to the downstream joint debugging database while ensuring the security of online data.

[0018] It should be noted that the data transmission platform and the joint debugging platform can be two software systems in the same electronic device; alternatively, the data transmission platform and the joint debugging platform can also be deployed separately in different electronic devices.

[0019] When using the data transmission platform to synchronize online data to the offline integration database, the user first logs into the integration platform using the target user account. When data synchronization is required, the user can initiate a task configuration request for the data synchronization task through the integration platform. This task configuration request can include the target online database (or the target data table within the target online database) and the target user account. Upon receiving the task configuration request, the data transmission platform first determines whether the target user account has the necessary data synchronization permissions based on the information in the request. If the target user account has the necessary permissions, the data transmission platform assigns a task identifier to the integration platform. The integration platform can then use this task identifier to initiate the data synchronization task via the data transmission platform's task initiation interface. After initiating the data synchronization task, the data transmission platform can synchronize data from the target online database indicated by the data synchronization task to the downstream integration database of the integration platform.

[0020] The method for determining whether a target user account has data synchronization permissions is as follows: The data transmission platform will search its own metadata database for the online database (or online data cluster) associated with the target user account. If the online database associated with the target user account contains the target online database, it means that the target user account has data synchronization permissions. Otherwise, if the target online database is not contained, it means that the target user account does not have data synchronization permissions.

[0021] Optionally, when the target user account does not have data synchronization permissions, the user can call the permission application interface of the data transmission platform through the joint debugging platform to apply for the required permissions for the structure synchronization and full synchronization of the database tables in the online cluster. After approval by the business manager and the cluster manager, the target user account will have data synchronization permissions. The data transmission platform can persist the target user account's data synchronization permissions for the online data cluster to the metadata database so that permission verification can be performed before subsequent data synchronization tasks are executed.

[0022] Optionally, after the data transmission platform determines that the target user account has data synchronization permissions, the data transmission platform will also perform a pre-check mode. This pre-check mode is mainly used to check whether the target online cluster indicated by the data synchronization task exists. If it exists, the pre-check is successful; otherwise, the pre-check fails.

[0023] Specifically, after the data synchronization task is started, the DTS-Server (Data Transmission Service) in the data transmission platform performs data synchronization. During the data synchronization process, whether the task completes or fails, it will report the task status to the dts-server-api (Data Transmission Service Interface). The specific reporting time is after the DTS-Server modifies the metadata database status and reports this status information. After receiving the message, the dts-server-api, based on the callback information configured in the metadata database, will call back the integration platform to notify it of the task status as successful or running.

[0024] Optionally, the data synchronization task described above can be a full data synchronization task or an incremental data synchronization task. If the data synchronization task is an incremental data synchronization task, the user can pre-configure incremental synchronization information so that the target online database is synchronized according to the incremental synchronization information.

[0025] For example, if the incremental synchronization information indicates that only DDL statements (table structure change statements, such as adding, deleting, or modifying the character set of a table) are synchronized, and DML statements (table data change statements, such as deleting, updating, or modifying a row of data) are not synchronized, then the data transmission platform will immediately synchronize to the downstream joint debugging database when it detects a table structure change in the target online database.

[0026] Optionally, a scheduled full synchronization task can be set up in the joint debugging platform, so that the joint debugging platform can periodically synchronize the data in the target online database to the downstream joint debugging database.

[0027] Before data synchronization, the data transmission platform first needs to identify the online data clusters that are permitted for data synchronization. The integration testing platform also needs to obtain the online data cluster configuration information from the data transmission platform to pre-configure a matching integration testing data cluster environment in the downstream integration testing database. Please refer to [link / reference]. Figure 2 The diagram illustrates a flowchart of another method for synchronizing a database in a joint debugging environment according to an exemplary embodiment of this application. The method includes: Step 201: Before data synchronization, obtain the authorized account passwords for each online data cluster through the data transmission platform; The cluster administrator pre-adds a cluster name and data transmission account password for each online data cluster. When the data transmission platform is initially running (i.e., before any data synchronization is performed), the data transmission platform will obtain the corresponding authorized account password from each online data cluster, i.e., the data transmission account password.

[0028] Step 202: Associate the obtained authorized account password and the cluster identifier of the online data cluster with the data transmission platform and write them into the metadata database of the data transmission platform; After obtaining the authorized account and password for each online data cluster, the authorized account and password, along with the cluster identifier, are written into the metadata database of the data transmission platform. The cluster identifier can be the cluster name of the online data cluster. The data transmission platform then obtains the full cluster names and authorized account and password for all clusters that can be synchronized online.

[0029] Step 203: The joint debugging platform calls the interface of the data transmission platform to obtain cluster configuration information, and configures the joint debugging data cluster environment in the downstream joint debugging database to be consistent with the online data cluster based on the cluster configuration information.

[0030] After the data transmission platform obtains the full cluster names that can be synchronized, the integration testing platform can then obtain the cluster configuration information of each online data cluster through the data transmission platform. This allows the downstream integration testing database to configure an integration testing data cluster environment consistent with the online data clusters based on the cluster configuration information. The cluster configuration information may include: the online data clusters that the data transmission platform supports for data synchronization, the case sensitivity parameters of each online database within the online data clusters, the database names of the online databases, and the table names of each online data table within the online databases.

[0031] In one exemplary example, step 203 may include steps 203A through 203D.

[0032] Step 203A: Obtain the online data clusters that the data transmission platform supports for data synchronization by calling the full cluster name acquisition interface of the data transmission platform through the joint debugging platform; The data transmission platform has an interface for obtaining the full cluster name. The joint debugging platform can obtain the full online data clusters that the data transmission platform supports for data synchronization from the metadata database of the data transmission platform by calling the interface for obtaining the full cluster name of the data transmission platform.

[0033] Step 203B: Use the joint debugging platform to call the configuration acquisition interface of the data transmission platform to obtain the case parameters of each online database under each online data cluster. The data transmission platform also has a configuration acquisition interface. The joint debugging platform can call the configuration interface to read the authorized account passwords of each online data cluster in the metadata database, and then access the online data clusters according to the authorized account passwords to obtain configuration information such as the case sensitivity parameters of each online database under each online cluster.

[0034] For example, when the joint debugging platform calls the configuration interface, it can return the configuration information of the online data cluster by passing the configuration name "lower_case_table_names" as a parameter.

[0035] Step 203C: Obtain the database name information of each online database by calling the cluster database name acquisition interface of the data transmission platform through the joint debugging platform; The data transmission platform also has an interface for obtaining database names under the cluster. The joint debugging platform can call the interface to obtain the authorized account passwords of each online cluster in the metadata database, and then access the online data clusters based on the authorized account passwords to obtain the database name information of each online database under each online data cluster.

[0036] For example, when the joint debugging platform calls the interface to obtain the database name under the cluster, it obtains all database names "DB1" and "DB2" under the cluster by passing in the online cluster name. This interface directly queries all database names in the online cluster indicated by the online cluster name by reading the account and password of dts_liantiao in the metadata database.

[0037] Step 203D: Use the joint debugging platform to call the database name and table name retrieval interface of the data transmission platform to obtain the table name information of each online data table in each online database.

[0038] The data transmission platform also has an interface for obtaining table names under database names. The joint debugging platform can call the interface for obtaining table names under database names to read the authorized account passwords of each online cluster in the metadata database, and then access the online data clusters based on the authorized account passwords to obtain the table name information of each online database and each online data table under each online data cluster.

[0039] For example, when the integration platform calls the interface to retrieve table names under a database name, it obtains "table1" and "table2" from the database indicated by the database name by passing in the cluster name and database name. This interface directly queries all table names under a specific database in the standby database of the online data cluster by reading the account password from the metadata database.

[0040] After obtaining the required cluster, configuration parameters, and database table information through the above interfaces, the joint debugging platform will call the task configuration interface to perform upstream and downstream task configuration, callback configuration, full and incremental synchronization configuration, and task pre-check.

[0041] Step 204: When logging into the integration platform using the target user account and there is a database synchronization requirement, initiate a task configuration request for the data synchronization task to the data transmission platform through the integration platform. Step 205: Based on the received task configuration request, the data transmission platform determines whether the target user account has data synchronization permissions. Step 206: If the target user account has the data synchronization permission, assign a task identifier for the data synchronization task to the joint debugging platform through the data transmission platform; Step 207: Start the data synchronization task by calling the task start interface of the data transmission platform based on the task identifier through the joint debugging platform; Step 208: Data synchronization is performed from the target online database indicated by the data synchronization task to the corresponding downstream joint debugging database of the joint debugging platform through the data transmission platform.

[0042] The implementation methods for steps 204 to 208 can refer to steps 101 to 105 above. This embodiment will not be described in detail here.

[0043] In addition to the data synchronization function mentioned above, it also provides sensitive field filtering and automatic conflict resolution functions during the data synchronization process.

[0044] Regarding the sensitive field filtering function, one possible implementation is to differentiate events when a user starts a data synchronization task. If the data to be synchronized is a DDL statement, the DDL statement is directly synchronized to the downstream integration database. If the data to be synchronized is a DML statement, data filtering is performed based on the sensitive field configuration. Specifically, when it is a DML statement, it is determined whether its column names are configured for sensitive field filtering. The sensitive field configuration is a map structure type. This configuration indicates that the contents of the "source_col1" and "source_col2" columns in the test_table table of the test database will be filtered out, and the default values ​​from the downstream database will be used. That is, if it is a sensitive field, the default value in the downstream integration database will be used, instead of the data in the online database.

[0045] For example, in insert ingnore mode, insert type statements will be rewritten as insert into test.test_table (id,source_col3) values(1,"test" ); If it is an update type statement, these two columns will also be filtered out and not updated, that is, it will be written as update teset.teset_table set source_col3="test" where id= 1.

[0046] Regarding the automated conflict resolution function, one scenario is where the downstream environment is a joint testing environment, where business personnel inevitably modify data. When synchronizing data from the online database to the downstream joint testing database, primary key conflicts may occur. For example, if a business user has already added a column with primary key 'A' to the downstream joint testing database, and during subsequent data synchronization, another column with primary key 'A' needs to be added, a primary key conflict will obviously occur. Therefore, to address this conflict issue, multiple conflict resolution methods are provided for both DML and DDL operations during data synchronization.

[0047] In one possible implementation, when performing DML operations and encountering primary key conflicts, if the DML operation is in insert ignore mode and the DML type is an insert statement, the insert statement is ignored in the downstream test database, and the original data in the downstream test database is preserved. If the DML operation is in insert ignore mode and the DML type is an update statement, an update statement is executed to overwrite the original data in the downstream test database. When performing DML operations and encountering primary key conflicts, if the DML operation is in replace into mode, the insert or update statement is executed directly in the downstream test database.

[0048] In other words, for the two modes of DML operations, there are corresponding ways to resolve primary key conflicts: for the insert ignore mode, when a conflict occurs in the downstream primary key during insert, the new insertion of that column will be ignored and the downstream data will be used as the standard. During update, the upstream data will be used as the standard and the downstream data will be overwritten (the filtered columns will not be overwritten).

[0049] For example, Table 1 shows the original statements and actual executed statements corresponding to multiple types of statements in the insert ignore mode of DML operations: Table 1

[0050] In the replace into mode, when a primary key conflict occurs, the insert and update statements will completely overwrite the downstream data, which is equivalent to deleting the data in that column in the downstream first, and then inserting the data in that column.

[0051] For example, Table 2 shows the original statements and actual executed statements corresponding to multiple types of statements in the replace into pattern of DML operations: Table 2

[0052] Another scenario involves DDL operations. Sometimes, the business adds columns in advance in the downstream integration environment. When these columns are deployed to the online database, the DTS task synchronizes them back to the downstream integration environment. Since the downstream integration environment already has the same column, this can cause the task to interrupt. To solve this problem, a MySQL error code ignoring strategy is adopted during DDL operations. When writing to the downstream MySQL database, the generated error code is captured, and it is determined whether the error code can be ignored in the task. In one possible implementation, if a target error code is generated during the data synchronization task, it is ignored, and the data synchronization task is considered successful. The target error code indicates a duplicate column name or the deletion of a non-existent column. For example, common target error codes include: Error Code: 1060 (Description: Duplicate column name, attempting to add a column with the same name as an existing column. Reason: A column with the same name already exists). Error Code: 1091 (Description: Attempt to delete a non-existent column. Reason: The specified column name does not exist. This resolves scenarios where the task is not interrupted when adding columns due to conflicts).

[0053] In summary, this application provides a database synchronization method for a joint debugging environment: by adding a data transmission platform as a data synchronization tool between the upstream online database and the downstream joint debugging platform, and by using access control to allow authorized users to connect to the online database for data synchronization after logging into the joint debugging platform, the method achieves the goal of automatically synchronizing online data to the downstream joint debugging database while ensuring the security of the online data. Furthermore, sensitive data is automatically filtered during the data synchronization process to prevent data leakage; in addition, by setting targeted conflict resolution methods for different statements, the consistency between the database joint debugging environment and the online data can be guaranteed.

[0054] Please refer to Figure 3 This is a schematic diagram of a database synchronization device for a joint debugging environment provided in an embodiment of this application. The device is applied to an electronic device, which deploys a data transmission platform and a joint debugging platform. The device 300 includes: The task initiation module 301 is used to initiate a task configuration request for a data synchronization task to the data transmission platform through the joint debugging platform when the target user account logs into the joint debugging platform and there is a database synchronization requirement. The permission determination module 302 is used to determine whether the target user account has data synchronization permission based on the received task configuration request through the data transmission platform; The allocation module 303 is used to allocate a task identifier for the data synchronization task to the joint debugging platform through the data transmission platform when the target user account has the data synchronization permission. Task startup module 304 is used to start the data synchronization task by calling the task startup interface of the data transmission platform based on the task identifier through the joint debugging platform; The data synchronization module 305 is used to synchronize data from the target online database indicated by the data synchronization task to the downstream joint debugging database corresponding to the joint debugging platform through the data transmission platform.

[0055] Optionally, the device further includes: The first acquisition module is used to acquire the authorized account passwords of each online data cluster through the data transmission platform before data synchronization is performed; The writing module is used to associate the obtained authorized account password and the cluster identifier of the online data cluster into the metadata database of the data transmission platform; The second acquisition module is used to call the interface of the data transmission platform through the joint debugging platform to obtain cluster configuration information, and to configure a joint debugging data cluster environment consistent with the online data cluster in the downstream joint debugging database based on the cluster configuration information.

[0056] Optionally, the second acquisition module is further configured to: The full cluster name acquisition interface of the data transmission platform is called through the joint debugging platform to obtain the online data clusters that the data transmission platform supports data synchronization. The configuration acquisition interface of the data transmission platform is called through the joint debugging platform to obtain the case parameters of each online database under each online data cluster. The database name information of each online database is obtained by calling the cluster database name acquisition interface of the data transmission platform through the joint debugging platform. The joint debugging platform calls the database name and table name retrieval interface of the data transmission platform to obtain the table name information of each online data table in each online database.

[0057] Optionally, if the data to be synchronized is a DDL statement, the DDL statement is directly synchronized to the downstream joint debugging database; If the data to be synchronized is a DML statement, data filtering should be performed based on sensitive field configuration. Optionally, when performing a DML operation and a primary key conflict exists, if it is in insert ignore mode and the DML type is an insert statement, the insert statement is ignored in the downstream joint debugging database, and the original data in the downstream joint debugging database is retained; if it is in insert ignore mode and the DML type is an update statement, the update statement will be executed to overwrite the original data in the downstream joint debugging database. In the event of a primary key conflict during DML operations, if the operation is in replace into mode, the insert or update statement is executed directly in the downstream database.

[0058] Optionally, if a target error code is generated during the data synchronization task, the target error code is ignored, and the data synchronization task is determined to have been successfully executed. The target error code refers to a column name being duplicated or a non-existent column being deleted.

[0059] An exemplary embodiment of this application also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform the joint debugging environment database synchronization method of this application embodiment.

[0060] An exemplary embodiment of this application also provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a database synchronization method for a joint debugging environment according to an embodiment of this application.

[0061] An exemplary embodiment of this application also provides a computer program product, including a computer program, wherein, when executed by a computer's processor, the computer program is used to cause the computer to perform a database synchronization method for a joint debugging environment according to an embodiment of this application.

[0062] refer to Figure 4 The following is a computer processing block diagram describing an exemplary electronic device of this application. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of this application described and / or claimed herein.

[0063] like Figure 4As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in ROM 402 or a computer program loaded into RAM 403 from storage unit 408. RAM 403 can also store various programs and data required for the operation of the electronic device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. I / O interface 405 is also connected to bus 404.

[0064] Multiple components in electronic device 400 are connected to I / O interface 405, including: input unit 406, output unit 407, storage unit 408, and communication unit 409. Input unit 406 can be any type of device capable of inputting information to electronic device 400. Input unit 406 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 407 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 408 may include, but is not limited to, disks and optical discs. Communication unit 409 allows electronic device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0065] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, Figure 1 , Figure 2 The method shown can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 400 via ROM 402 and / or communication unit 409. In some embodiments, computing unit 401 can be configured to execute by any other suitable means (e.g., by means of firmware). Figure 1 , Figure 2 The method shown.

[0066] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0067] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0068] As used in this application, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0069] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0070] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0071] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

Claims

1. A database synchronization method for a joint debugging environment, characterized in that, The method is applied to an electronic device, which deploys a data transmission platform and a joint debugging platform. The method includes: When logging into the integration platform using the target user account and there is a database synchronization requirement, initiate a task configuration request for data synchronization to the data transmission platform through the integration platform; The data transmission platform determines whether the target user account has data synchronization permissions based on the received task configuration request. If the target user account has the data synchronization permission, the data transmission platform assigns a task identifier for the data synchronization task to the joint debugging platform. The data synchronization task is initiated by the joint debugging platform by calling the task initiation interface of the data transmission platform based on the task identifier. Data synchronization is performed from the target online database indicated by the data synchronization task to the downstream joint debugging database corresponding to the joint debugging platform through the data transmission platform.

2. The method according to claim 1, characterized in that, The method further includes: Before data synchronization is performed, the authorized account passwords for each online data cluster are obtained through the data transmission platform. The obtained authorized account password and the cluster identifier of the online data cluster are associated and written into the metadata database of the data transmission platform. The system calls the interface of the data transmission platform through the joint debugging platform to obtain cluster configuration information, and configures a joint debugging data cluster environment consistent with the online data cluster in the downstream joint debugging database based on the cluster configuration information.

3. The method according to claim 2, characterized in that, The step of obtaining cluster configuration information by calling the interface of the data transmission platform through the joint debugging platform includes: The full cluster name acquisition interface of the data transmission platform is called through the joint debugging platform to obtain the online data clusters that the data transmission platform supports data synchronization. The configuration acquisition interface of the data transmission platform is called through the joint debugging platform to obtain the case parameters of each online database under each online data cluster. The database name information of each online database is obtained by calling the cluster database name acquisition interface of the data transmission platform through the joint debugging platform. The joint debugging platform calls the database name and table name retrieval interface of the data transmission platform to obtain the table name information of each online data table in each online database.

4. The method according to any one of claims 1 to 3, characterized in that, If the data to be synchronized is a DDL statement, the DDL statement is directly synchronized to the downstream joint debugging database. If the data to be synchronized is a DML statement, data filtering is performed based on the sensitive field configuration.

5. The method according to any one of claims 1 to 3, characterized in that, When performing DML operations and encountering primary key conflicts, if the DML operation is in insert ignore mode and the DML type is an insert statement, the insert statement is ignored in the downstream joint debugging database, and the original data in the downstream joint debugging database is retained; if the DML operation is in insert ignore mode and the DML type is an update statement, the update statement will be executed to overwrite the original data in the downstream joint debugging database. In the event of a primary key conflict during DML operations, if the operation is in replace into mode, the insert or update statement is executed directly in the downstream database.

6. The method according to any one of claims 1 to 3, characterized in that, If a target error code is generated during the data synchronization task, the target error code is ignored, and the data synchronization task is determined to have been executed successfully. The target error code refers to a column name being duplicated or a column that has been deleted but not yet been deleted.

7. A database synchronization device for joint debugging environment, characterized in that, The device is applied to an electronic device, which deploys a data transmission platform and a joint debugging platform. The device includes: The task initiation module is used to initiate a data synchronization task configuration request from the joint debugging platform to the data transmission platform when the target user account logs into the joint debugging platform and there is a database synchronization requirement. The permission determination module is used to determine whether the target user account has data synchronization permission based on the received task configuration request through the data transmission platform; The allocation module is used to allocate a task identifier for the data synchronization task to the joint debugging platform through the data transmission platform when the target user account has the data synchronization permission. The task initiation module is used to initiate the data synchronization task by calling the task initiation interface of the data transmission platform based on the task identifier through the joint debugging platform; The data synchronization module is used to synchronize data from the target online database indicated by the data synchronization task to the downstream joint debugging database corresponding to the joint debugging platform through the data transmission platform.

8. The apparatus according to claim 7, characterized in that, The device further includes: The first acquisition module is used to acquire the authorized account passwords of each online data cluster through the data transmission platform before data synchronization is performed; The writing module is used to associate the obtained authorized account password and the cluster identifier of the online data cluster into the metadata database of the data transmission platform; The second acquisition module is used to call the interface of the data transmission platform through the joint debugging platform to obtain cluster configuration information, and to configure a joint debugging data cluster environment consistent with the online data cluster in the downstream joint debugging database based on the cluster configuration information.

9. An electronic device, comprising: The processor and the memory that stores the program; The program includes instructions that, when executed by the processor, cause the processor to perform the database synchronization method for the joint debugging environment according to any one of claims 1-6.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the database synchronization method for the joint debugging environment according to any one of claims 1-6.