A relational database structure data synchronization method and system

By receiving data user requests, allocating them to candidate data center servers, obtaining status information, generating a list of synchronization requirements, and solving for the optimal strategy, the problem of structural data synchronization lag caused by uneven regional communication load is solved, and the consistency of database metadata and the rationality and scientific nature of the synchronization path are achieved.

CN120631982BActive Publication Date: 2025-10-21GREATOPENSOURCE INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511113600.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-10-21
Estimated Expiration
2045-08-11

AI Technical Summary

Technical Problem

In scenarios with uneven regional communication loads, there is a lag in the synchronization of structural data between relational databases, making it difficult to maintain metadata consistency and the rationality and scientific nature of the synchronization path.

Method used

By receiving service requests from data users, assigning them to candidate data center servers, obtaining server deployment and communication status information, generating a synchronization requirement list, adjusting synchronization paths and times, employing optimization algorithms to solve for the optimal synchronization strategy, and distributing synchronization instructions to achieve structured data synchronization.

Benefits of technology

In scenarios with uneven regional communication loads, it is essential to maintain the periodic consistency of database metadata, improve the rationality and scientific nature of synchronization paths, and ensure the stability of structural data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631982B_ABST
    Figure CN120631982B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of databases, and discloses a relational database structure data synchronization method and system, wherein data users are distributed to candidate data center servers in which relational databases are deployed, the deployment state information and the communication state information of a plurality of data center servers in a target structure data synchronization period are acquired, the synchronization target demand, the synchronization data volume demand and the synchronization frequency demand of each data user in different minimum service time periods are taken as driving, the optimal relational database synchronization strategy of a server group is solved, and the structure data synchronization between relational databases is controlled. Therefore, the structure data synchronization between relational databases in a regional communication load uneven scene is realized, the periodic consistency of database metadata is maintained, the rationality and the scientificity of the selection of a source data center server and the structure data synchronization path planning are improved, and the stability of the structure data synchronization period is ensured as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database technology, and in particular to a method and system for synchronizing structural data of a relational database. Background Art

[0002] Structural data synchronization for relational databases refers to the process of maintaining database metadata consistency across multiple relational database instances (e.g., database replicas on different servers). When data users require cross-regional data access, structural data synchronization is a core mechanism for ensuring stable, efficient, and compliant business system operations. By maintaining metadata consistency, this mechanism avoids risks such as application compatibility issues, data synchronization failures, and high-availability architecture failures, while also reducing operational costs. It is an irreplaceable component of enterprise-level database cluster deployments.

[0003] In practical applications, direct synchronization of structural data between relational databases deployed in data center servers in large cities (high-frequency communication or large-volume communication areas) may cause synchronization delays due to communication bandwidth limitations (for example, failure to meet the requirements for periodic synchronization of structural data). In some cases, using several transit data center servers in low-frequency communication areas or small-data-volume communication areas between the source and target data center servers for transit synchronization can alleviate the periodic synchronization delay caused by communication bandwidth limitations in some areas in non-real-time structural data synchronization scenarios of relational databases. However, due to differences in data user access, synchronization data volume, synchronization to different servers, and synchronization frequency among data center servers deployed in different areas, as well as differences in group deployment status changes and communication status between data center servers, it is quite difficult to plan transit synchronization using transit center servers.

[0004] Therefore, how to achieve structural data synchronization between relational databases in scenarios with uneven regional communication loads, maintain the periodic consistency of metadata of multiple relational databases, and ensure the stability of the structural data synchronization cycle as much as possible while improving the rationality and scientificity of data users' selection of source data center servers and the structural data synchronization path planning between source data center servers and target data center servers, is a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The main purpose of the present invention is to provide a method and system for synchronizing structural data of a relational database, aiming to solve at least one of the above technical problems.

[0006] To achieve the above object, the present invention provides a method for synchronizing structural data of a relational database, comprising the following steps:

[0007] Receive structured data service requests from several data users, and assign the data users to several candidate data center servers where relational databases are deployed;

[0008] Before the target structure data synchronization cycle, a structure data synchronization requirement list is generated containing the structure data synchronization requirements of each data user; wherein the structure data synchronization requirements include synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements for different minimum service periods;

[0009] Obtaining server group status information of a target structure data synchronization period, and extracting deployment status information and communication status information of a plurality of data center servers from the server group status information;

[0010] Based on the deployment status information and the communication status information, the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods are used as drivers to adjust the synchronization path and synchronization time of each data user in the target structure data synchronization cycle to solve the optimal relational database synchronization strategy for the server group;

[0011] The structural data synchronization instruction in the optimal relational database synchronization strategy is distributed to a plurality of data center servers, driving each data center server to execute structural data synchronization.

[0012] Optionally, receiving structured data service requests from a plurality of data users and assigning the plurality of data users to a plurality of candidate data center servers where relational databases are deployed may include:

[0013] Receiving structured data service requests sent by several data users when registering or updating their users, and extracting the service demand location and structured data service type in the structured data service requests;

[0014] According to the service demand location and the structured data service type, a number of data users are allocated to a number of candidate data center servers deployed with relational databases.

[0015] Optionally, the step of allocating a plurality of data users to a plurality of candidate data center servers where relational databases are deployed according to the service demand location and the structured data service type specifically includes:

[0016] According to the structure data service type, performing a first screening of all relational databases in the relational database list based on the structure data service type set covered by each relational database to obtain a number of screening data center servers that meet the structure data service type;

[0017] According to the service demand location and the deployment location of the data center server corresponding to each relational database in the relational database list, the communication delay from each data center server to the data user is estimated, and the screened data center servers are screened for the second time to obtain several candidate data center servers whose communication delay meets the data user's business requirements.

[0018] Optionally, before the target structure data synchronization cycle, a step of generating a structure data synchronization requirement list including the structure data synchronization requirement of each data user may include:

[0019] Before the target structure data synchronization cycle, the structure data synchronization request information sent by each data user for the target structure data synchronization cycle is aggregated;

[0020] A structure data synchronization requirement list including the structure data synchronization requirements of each data user is generated based on the synchronization target requirements, synchronization data volume requirements and synchronization frequency requirements for different minimum service periods within the target structure data synchronization cycle in each structure data synchronization request information summarized.

[0021] Optionally, before the step of aggregating the structure data synchronization request information sent by each data user for the target structure data synchronization period, the method further includes:

[0022] Before the target structure data synchronization cycle, sending structure data synchronization requirement establishment information for the target structure data synchronization cycle to each data user, so that each data user can feedback demand response information based on the structure data synchronization requirement establishment information;

[0023] Determine whether a dynamic response to a data user's needs is received within a preset time period;

[0024] If so, the dynamic response information is summarized as the structure data synchronization request information for the target structure data synchronization period; if not, the fixed response information pre-stored by the data user is summarized as the structure data synchronization request information for the target structure data synchronization period.

[0025] Optionally, the step of obtaining server group status information of the target structure data synchronization period specifically includes:

[0026] Accessing a server group status database; wherein the server group status database receives and stores the server status and historical communication status periodically uploaded by each data center server;

[0027] Determine the deployment status information of each data center server during the target structure data synchronization period based on the server initial deployment information of each data center server and the server operating status in the most recently uploaded server status; estimate the communication status information of each data center server during the target structure data synchronization period based on the data communication rate between any two data center servers in the historical communication status of each data center server;

[0028] Based on the deployment status information and the communication status information, server group status information of a target structure data synchronization period is generated.

[0029] Optionally, based on the deployment status information and the communication status information, the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods are used as drivers to adjust the synchronization path and synchronization time of each data user in the target structure data synchronization cycle, and solve the optimal relational database synchronization strategy steps for the server group, specifically including:

[0030] Considering the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods according to the deployment status information and the communication status information;

[0031] The synchronization path formed by the source data center server selected by each data user from the candidate data center servers, the transit data center server selected from the non-source data center servers, and the target synchronization data center server in the synchronization target requirement, and the synchronization time formed by several minimum service periods when each adjacent two data center servers in the synchronization path perform structural data synchronization are used as the solution target.

[0032] An optimization algorithm is used to solve the optimal relational database synchronization strategy of the server group, so that the optimal relational database synchronization strategy meets the optimization goal determined by the constraint condition set constructed by communication state information, synchronization time and synchronization frequency and the stability of synchronization frequency.

[0033] Optionally, the optimal relational database synchronization strategy satisfies the optimization goal determined by the constraint condition set constructed by the communication state information, the synchronization time and the synchronization frequency, and the stability of the synchronization frequency, specifically including:

[0034] The first constraint condition is that the sum of the synchronization data volume requirements of any two data center servers in each minimum service period is less than the synchronization upper limit data volume determined by the data communication rate corresponding to the communication state information and the minimum service period duration; the second constraint condition is that the synchronization time of the previous data center server performing structural data synchronization in the synchronization path of each data user is earlier than the synchronization time of the next data center server performing structural data synchronization; and the third constraint condition is that the interval time between two adjacent structural data synchronized by the target synchronization data center server corresponding to the synchronization target requirement of each data user in different minimum service periods is less than the required interval time corresponding to the synchronization frequency requirement of the data user;

[0035] The optimization goal is to minimize the sum of the variances of the intervals between the target synchronization data center server receiving several times of structure data synchronized by the same data user in the synchronization target requirement of each data user.

[0036] Optionally, the structure data synchronization instruction in the optimal relational database synchronization strategy is distributed to a plurality of data center servers, driving each data center server to execute the structure data synchronization step, specifically including:

[0037] The synchronization path formed by the source data center server selected by each data user from the candidate data center servers, the transit data center server selected from the non-source data center servers, and the target synchronization data center server in the synchronization target requirement in the optimal relational database synchronization strategy, and the synchronization time formed by several minimum service periods when each two adjacent data center servers in the synchronization path perform structure data synchronization are converted into structure data synchronization instructions and distributed to the corresponding data center servers;

[0038] Drive each data center server to execute data storage and structural data synchronization for each data user according to the synchronization path formed by the source data center server selected by each data user, the selected transit data center server and the target synchronization data center server and the synchronization time of the two adjacent data center servers to execute structural data synchronization.

[0039] In addition, to achieve the above-mentioned purpose, the present invention also provides a structural data synchronization system for a relational database, comprising:

[0040] An allocation module is used to receive structured data service requests from several data users and allocate the data users to several candidate data center servers where relational databases are deployed;

[0041] A generation module is used to generate a structure data synchronization requirement list containing the structure data synchronization requirements of each data user before the target structure data synchronization cycle; wherein the structure data synchronization requirements include synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements for different minimum service periods;

[0042] An extraction module is used to obtain server group status information of a target structure data synchronization period, and extract deployment status information and communication status information of several data center servers from the server group status information;

[0043] A solution module is configured to adjust the synchronization path and synchronization time of each data user in the target structure data synchronization cycle based on the deployment status information and the communication status information, taking the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods as a driving force, and solve the optimal relational database synchronization strategy for the server group;

[0044] The synchronization module is used to distribute the structure data synchronization instruction in the optimal relational database synchronization strategy to a plurality of data center servers, driving each data center server to execute structure data synchronization.

[0045] The beneficial effects of the present invention are as follows: a method and system for synchronizing structural data of relational databases is proposed. By allocating data users to candidate data center servers where relational databases are deployed, the deployment status information and communication status information of several data center servers during the target structural data synchronization cycle are obtained. The synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user during different minimum service periods are used as drivers to solve the optimal relational database synchronization strategy for the server group to control structural data synchronization between relational databases. Thus, by achieving structural data synchronization between relational databases in scenarios with uneven regional communication loads, the periodic consistency of database metadata is maintained, and the stability of the structural data synchronization cycle is ensured as much as possible while improving the rationality and scientific nature of the selection of source data center servers and the planning of structural data synchronization paths. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flow chart of the structural data synchronization method of a relational database according to the present invention;

[0047] Figure 2 This is a structural diagram of the structural data synchronization system of the relational database of the present invention.

[0048] Description of reference numerals:

[0049] 10-distribution module; 20-generation module; 30-extraction module; 40-solution module; 50-synchronization module. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0051] The embodiment of the present invention provides a method for synchronizing structural data of a relational database, referring to Figure 1 , Figure 1 The figure is a flowchart of an embodiment of a method for synchronizing structural data of a relational database according to the present invention.

[0052] In this embodiment, a method for synchronizing structural data of a relational database includes the following steps:

[0053] S1: Receive structured data service requests from several data users and assign the data users to several candidate data center servers where relational databases are deployed.

[0054] S2: before the target structure data synchronization cycle, generating a structure data synchronization requirement list containing the structure data synchronization requirements of each data user; wherein the structure data synchronization requirements include synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements for different minimum service periods;

[0055] S3: Obtain server group status information of the target structure data synchronization period, and extract deployment status information and communication status information of several data center servers from the server group status information;

[0056] S4: Based on the deployment status information and the communication status information, the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods are used as drivers to adjust the synchronization path and synchronization time of each data user in the target structure data synchronization cycle to solve the optimal relational database synchronization strategy for the server group;

[0057] S5: Distribute the structure data synchronization instruction in the optimal relational database synchronization strategy to several data center servers, and drive each data center server to execute structure data synchronization.

[0058] It should be noted that in actual applications, direct synchronization of structural data between relational databases deployed in data center servers in large cities (high-frequency communication or large-data volume communication areas) may cause delays in structural data synchronization due to communication bandwidth limitations (for example, the requirements for periodic synchronization of structural data are not met). In some cases, several transit data center servers in low-frequency communication areas or small-data volume communication areas between the source data center server and the target data center server are used for transit synchronization. In the non-real-time structural data synchronization scenario of relational databases, the problem of periodic synchronization lag caused by communication bandwidth limitations in some areas can be alleviated. However, since data center servers deployed in different areas have differences in data user access, synchronization data volume, synchronization to different servers, and synchronization frequency, and there are differences in group deployment status changes and communication status between data center servers, it is very difficult to use transit center servers for transit synchronization planning.

[0059] To address the aforementioned issues, this embodiment assigns data users to candidate data center servers deployed with relational databases, obtains the deployment and communication status information of several data center servers during the target structured data synchronization cycle, and uses each data user's synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements during different minimum service periods as drivers to determine the optimal relational database synchronization strategy for the server group, thereby controlling structured data synchronization between relational databases. This approach achieves structured data synchronization between relational databases in scenarios with uneven regional communication loads, maintains the periodic consistency of database metadata, and, while improving the rationality and scientific nature of source data center server selection and structured data synchronization path planning, ensures the stability of the structured data synchronization cycle as much as possible.

[0060] In a preferred embodiment, the steps of receiving structured data service requests from a plurality of data users and assigning the plurality of data users to a plurality of candidate data center servers where relational databases are deployed specifically include:

[0061] S11: receiving structured data service requests sent by several data users when registering or updating their users, and extracting the service requirement location and structured data service type in the structured data service requests;

[0062] S12: Allocate a number of data users to a number of candidate data center servers deployed with relational databases according to the service demand location and the structured data service type.

[0063] Furthermore, the step of allocating a plurality of data users to a plurality of candidate data center servers where relational databases are deployed according to the service demand location and the structured data service type specifically includes:

[0064] S121: performing a first screening of all relational databases in the relational database list based on the structured data service type set covered by each relational database according to the structured data service type, to obtain a number of screening data center servers that meet the structured data service type;

[0065] S122: Estimate the communication delay from each data center server to the data user based on the service demand location and the deployment location of the data center server corresponding to each relational database in the relational database list, perform a second screening on the screened data center servers, and obtain several candidate data center servers whose communication delays meet the data user's business requirements.

[0066] In this embodiment, structured data service requests sent by several data users during user registration or user update are received, and the service demand location and structured data service type of the data user are determined using the structured data service request. The relational databases that meet the types covered by the structured data service type set in all relational databases are screened for the first time using the structured data service type. The relational databases that have undergone the first screening are screened for the second time using the service demand location, the deployment location of the central data server, and the allowed communication delay to obtain several candidate data center servers that can support the business data storage needs of the data users. The generation of the candidate data center servers is used to provide a planning support basis for the subsequent selection of source data center servers for each data user.

[0067] In a preferred embodiment, before the target structure data synchronization cycle, the step of generating a structure data synchronization requirement list including the structure data synchronization requirement of each data user specifically includes:

[0068] S21: before the target structure data synchronization period, the structure data synchronization request information sent by each data user for the target structure data synchronization period is aggregated;

[0069] S22: Generate a structure data synchronization requirement list containing the structure data synchronization requirement of each data user according to the synchronization target requirement, synchronization data volume requirement and synchronization frequency requirement for different minimum service periods within the target structure data synchronization cycle in each structure data synchronization request information summarized.

[0070] On this basis, before the step of aggregating the structure data synchronization request information sent by each data user for the target structure data synchronization period, the method further includes:

[0071] S211: before the target structure data synchronization cycle, sending structure data synchronization requirement establishment information for the target structure data synchronization cycle to each data user, so that each data user can feedback demand response information based on the structure data synchronization requirement establishment information;

[0072] S212: Determine whether a dynamic response message to a data user's request is received within a preset time period;

[0073] S213: If yes, aggregate the dynamic response information as the structure data synchronization request information for the target structure data synchronization period; if no, aggregate the fixed response information pre-stored by the data user as the structure data synchronization request information for the target structure data synchronization period.

[0074] In this embodiment, before the target structure data synchronization cycle, structure data synchronization requirement establishment information is sent to each data user. After receiving the structure data synchronization requirement establishment information, each data user feedbacks the requirement response information through dynamic response or fixed response to obtain and summarize the structure data synchronization request information sent by each data user for the target structure data synchronization cycle, and then establishes a structure data synchronization requirement list based on the synchronization target requirements, synchronization data volume requirements and synchronization frequency requirements of different minimum service time periods.

[0075] In a preferred embodiment, the step of obtaining server group status information of the target structure data synchronization period specifically includes:

[0076] S31: Accessing a server group status database; wherein the server group status database receives and stores the server status and historical communication status periodically uploaded by each data center server;

[0077] S32: Determine the deployment status information of each data center server in the target structure data synchronization period based on the server initial deployment information of each data center server and the server operating status in the most recently uploaded server status; and estimate the communication status information of each data center server in the target structure data synchronization period based on the data communication rate between any two data center servers in the historical communication status of each data center server.

[0078] S33: Generate server group status information of a target structure data synchronization period based on the deployment status information and the communication status information.

[0079] In this embodiment, the server group status information is established by accessing the server group status database and determining the most recently uploaded server operating status as the deployment status information for the target structure data synchronization period based on the server status and historical communication status periodically uploaded by each data center server. Furthermore, the estimated data communication rate, determined based on the data communication rate between any two data center servers in the historical communication status, is determined as the communication status information for the target structure data synchronization period. It should be noted that the estimated data communication rate can be determined using an average value prediction, a growth value prediction, or a prediction based on multiple communication influencing factors from the historical communication status, and this embodiment does not impose any restrictions on this.

[0080] In a preferred embodiment, based on the deployment status information and the communication status information, the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods are used as drivers to adjust the synchronization path and synchronization time of each data user in the target structure data synchronization cycle, and solve the optimal relational database synchronization strategy steps for the server group, specifically including:

[0081] S41: considering the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods according to the deployment status information and the communication status information;

[0082] S42: The synchronization path formed by the source data center server selected by each data user from the candidate data center servers, the transit data center server selected from the non-source data center servers, and the target synchronization data center server in the synchronization target requirement, and the synchronization time formed by several minimum service periods when each adjacent two data center servers in the synchronization path perform structural data synchronization are used as the solution target.

[0083] S43: Using an optimization algorithm to solve the optimal relational database synchronization strategy of the server group, so that the optimal relational database synchronization strategy meets the optimization goal determined by the constraint condition set constructed by the communication state information, synchronization time and synchronization frequency and the stability of the synchronization frequency.

[0084] Furthermore, the optimal relational database synchronization strategy is configured to satisfy the optimization goal determined by the constraint condition set constructed by the communication state information, synchronization time and synchronization frequency, and the stability of the synchronization frequency, specifically including:

[0085] S431: The first constraint condition is that the sum of the synchronization data volume requirements of any two data center servers in each minimum service period is less than the synchronization upper limit data volume determined by the data communication rate corresponding to the communication state information and the minimum service period duration; the second constraint condition is that the synchronization time of the previous data center server performing structural data synchronization in the synchronization path of each data user is earlier than the synchronization time of the next data center server performing structural data synchronization; the third constraint condition is that the interval time between two adjacent structural data synchronized by the target synchronization data center server corresponding to the synchronization target requirement of each data user in different minimum service periods is less than the required interval time corresponding to the synchronization frequency requirement of the data user;

[0086] S432: The optimization goal is to minimize the sum of the variances of the intervals between the target synchronization data center server receiving multiple times of structure data synchronized by the same data user in the synchronization target requirement of each data user.

[0087] In this embodiment, by allocating several data users to candidate data center servers deployed with relational databases, the structural data synchronization requirements of each data user are generated, the deployment status information and communication status information of several data center servers in the target structural data synchronization period are obtained, and the synchronization target requirements, synchronization data volume requirements and synchronization frequency requirements of each data user in different minimum service time periods are used as driving forces. The synchronization path and synchronization time of each data user in the target structural data synchronization period are adjusted, and the optimal relational database synchronization strategy of the server group is solved so that the optimal relational database synchronization strategy meets the optimization goal determined by the constraint condition set constructed by the communication status information, synchronization time and synchronization frequency and the stability of the synchronization frequency, and then controls each data center server to execute structural data synchronization between relational databases of multiple data center servers. While improving the rationality and scientificity of data users' selection of source data center servers and the structural data synchronization path planning between the source data center server and the target data center server, the stability of the structural data synchronization period is ensured as much as possible.

[0088] In a preferred embodiment, the structure data synchronization instruction in the optimal relational database synchronization strategy is distributed to a plurality of data center servers, driving each data center server to perform the structure data synchronization step, specifically including:

[0089] S51: converting a synchronization path consisting of a source data center server selected by each data user from the candidate data center servers, a transit data center server selected from the non-source data center servers, and a target synchronization data center server in the synchronization target requirement in the optimal relational database synchronization strategy, and a synchronization time consisting of a plurality of minimum service periods when each adjacent two data center servers in the synchronization path perform structure data synchronization, into a structure data synchronization instruction and distributing it to the corresponding data center server;

[0090] S52: Drive each data center server to execute data storage and structural data synchronization for each data user according to the synchronization path formed by the source data center server selected by each data user, the selected transit data center server and the target synchronization data center server and the synchronization time of the structural data synchronization executed by the two adjacent data center servers.

[0091] In this embodiment, by distributing the structural data synchronization instructions in the optimal relational database synchronization strategy to several data center servers, each data center server is driven to execute data storage and structural data synchronization for each data user according to the synchronization path formed by the source data center server selected by each data user, the selected transit data center server and the target synchronization data center server and the synchronization time of the two adjacent data center servers to execute structural data synchronization. Thus, by realizing structural data synchronization between relational databases in the scenario of uneven regional communication load, the periodic consistency of metadata of multiple relational databases is maintained, and the rationality and scientificity of data users' selection of source data center servers and the structural data synchronization path planning between the source data center server and the target data center server are improved.

[0092] Reference Figure 2 , Figure 2 This is a structural block diagram of an embodiment of a structural data synchronization system for a relational database according to the present invention.

[0093] like Figure 2 As shown, the structural data synchronization system of a relational database proposed in an embodiment of the present invention includes:

[0094] The allocation module 10 is configured to receive structured data service requests from a number of data users and allocate the data users to a number of candidate data center servers where relational databases are deployed.

[0095] A generating module 20 is configured to generate a structure data synchronization requirement list containing the structure data synchronization requirements of each data user before a target structure data synchronization cycle; wherein the structure data synchronization requirements include synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements for different minimum service periods;

[0096] An extraction module 30 is used to obtain server group status information of a target structure data synchronization period, and extract deployment status information and communication status information of several data center servers from the server group status information;

[0097] A solution module 40 is configured to adjust the synchronization path and synchronization time of each data user in the target structure data synchronization cycle based on the deployment status information and the communication status information, taking the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods as a driving force, and to solve the optimal relational database synchronization strategy for the server group;

[0098] The synchronization module 50 is used to distribute the structure data synchronization instruction in the optimal relational database synchronization strategy to a plurality of data center servers, driving each data center server to execute structure data synchronization.

[0099] In this embodiment, data users are assigned to candidate data center servers hosting relational databases. The deployment and communication status information for several data center servers during the target structured data synchronization cycle is obtained. The optimal relational database synchronization strategy for the server group is determined, driven by each data user's synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements during different minimum service periods. This strategy controls structured data synchronization between relational databases. This strategy achieves structured data synchronization between relational databases in scenarios with uneven regional communication loads, maintains the periodic consistency of database metadata, and maximizes the stability of the structured data synchronization cycle while improving the rationality and scientific nature of source data center server selection and structured data synchronization path planning.

[0100] Other embodiments or specific implementations of the structural data synchronization system of a relational database of the present invention can refer to the above-mentioned method embodiments and will not be described in detail here.

[0101] It should be understood that, in the description of this specification, reference to terms such as "one embodiment," "another embodiment," "other embodiments," or "first to Nth embodiments" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or examples.

[0102] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

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

Claims

1. A method for synchronizing structural data of a relational database, characterized in that: The following steps are involved: Receive structured data service requests from several data users, and assign the data users to several candidate data center servers where relational databases are deployed; Before the target structure data synchronization cycle, a structure data synchronization requirement list is generated containing the structure data synchronization requirements of each data user; wherein the structure data synchronization requirements include synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements for different minimum service periods; Obtaining server group status information of a target structure data synchronization period, and extracting deployment status information and communication status information of a plurality of data center servers from the server group status information; Based on the deployment status information and the communication status information, the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods are used as drivers to adjust the synchronization path and synchronization time of each data user in the target structure data synchronization cycle to solve the optimal relational database synchronization strategy for the server group; specifically, the strategy includes: Considering the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods according to the deployment status information and the communication status information; The synchronization path formed by the source data center server selected by each data user from the candidate data center servers, the transit data center server selected from the non-source data center servers, and the target synchronization data center server in the synchronization target requirement, and the synchronization time formed by several minimum service periods when each adjacent two data center servers in the synchronization path perform structural data synchronization are used as the solution target. An optimization algorithm is used to solve an optimal relational database synchronization strategy for the server group, so that the optimal relational database synchronization strategy satisfies an optimization goal determined by a constraint set constructed by communication state information, synchronization time and synchronization frequency, and synchronization frequency stability; The structural data synchronization instruction in the optimal relational database synchronization strategy is distributed to a plurality of data center servers, driving each data center server to execute structural data synchronization.

2. The method for synchronizing structural data of a relational database according to claim 1, wherein: The steps of receiving structured data service requests from several data users and assigning the data users to several candidate data center servers where relational databases are deployed include: Receiving structured data service requests sent by several data users when registering or updating their users, and extracting the service demand location and structured data service type in the structured data service requests; According to the service demand location and the structured data service type, a number of data users are allocated to a number of candidate data center servers deployed with relational databases.

3. The method for synchronizing structural data of a relational database according to claim 2, wherein: The step of allocating a plurality of data users to a plurality of candidate data center servers deployed with relational databases according to the service demand location and the structured data service type specifically includes: According to the structure data service type, performing a first screening of all relational databases in the relational database list based on the structure data service type set covered by each relational database to obtain a number of screening data center servers that meet the structure data service type; According to the service demand location and the deployment location of the data center server corresponding to each relational database in the relational database list, the communication delay from each data center server to the data user is estimated, and the screened data center servers are screened for the second time to obtain several candidate data center servers whose communication delay meets the data user's business requirements.

4. The method for synchronizing structural data of a relational database according to claim 1, wherein: Before the target structure data synchronization cycle, the steps of generating a structure data synchronization requirement list containing the structure data synchronization requirements of each data user include: Before the target structure data synchronization cycle, the structure data synchronization request information sent by each data user for the target structure data synchronization cycle is aggregated; A structure data synchronization requirement list including the structure data synchronization requirements of each data user is generated based on the synchronization target requirements, synchronization data volume requirements and synchronization frequency requirements for different minimum service periods within the target structure data synchronization cycle in each structure data synchronization request information summarized.

5. The method for synchronizing structural data of a relational database according to claim 4, wherein: Before the step of aggregating the structure data synchronization request information sent by each data user for the target structure data synchronization period, the method further includes: Before the target structure data synchronization cycle, sending structure data synchronization requirement establishment information for the target structure data synchronization cycle to each data user, so that each data user can feedback demand response information based on the structure data synchronization requirement establishment information; Determine whether a dynamic response to a data user's needs is received within a preset time period; If so, the dynamic response information is summarized as the structure data synchronization request information for the target structure data synchronization period; if not, the fixed response information pre-stored by the data user is summarized as the structure data synchronization request information for the target structure data synchronization period.

6. The method for synchronizing structural data of a relational database according to claim 1, wherein: The steps for obtaining the server group status information of the target structure data synchronization period include: Accessing a server group status database; wherein the server group status database receives and stores the server status and historical communication status periodically uploaded by each data center server; Determine the deployment status information of each data center server during the target structure data synchronization period based on the server initial deployment information of each data center server and the server operating status in the most recently uploaded server status; estimate the communication status information of each data center server during the target structure data synchronization period based on the data communication rate between any two data center servers in the historical communication status of each data center server; Based on the deployment status information and the communication status information, server group status information of a target structure data synchronization period is generated.

7. The method for synchronizing structural data of a relational database according to claim 1, wherein: The optimal relational database synchronization strategy satisfies the optimization goal determined by the constraint condition set constructed by the communication state information, synchronization time and synchronization frequency, and the stability of the synchronization frequency, specifically including: The first constraint condition is that the sum of the synchronization data volume requirements of any two data center servers in each minimum service period is less than the synchronization upper limit data volume determined by the data communication rate corresponding to the communication state information and the minimum service period duration; the second constraint condition is that the synchronization time of the previous data center server performing structural data synchronization in the synchronization path of each data user is earlier than the synchronization time of the next data center server performing structural data synchronization; and the third constraint condition is that the interval time between two adjacent structural data synchronized by the target synchronization data center server corresponding to the synchronization target requirement of each data user in different minimum service periods is less than the required interval time corresponding to the synchronization frequency requirement of the data user; The optimization goal is to minimize the sum of the variances of the intervals between the target synchronization data center server receiving several times of structure data synchronized by the same data user in the synchronization target requirement of each data user.

8. The method for synchronizing structural data of a relational database according to claim 1, wherein: Distributing the structure data synchronization instructions in the optimal relational database synchronization strategy to a plurality of data center servers, driving each data center server to execute the structure data synchronization steps, specifically including: The synchronization path formed by the source data center server selected by each data user from the candidate data center servers, the transit data center server selected from the non-source data center servers, and the target synchronization data center server in the synchronization target requirement in the optimal relational database synchronization strategy, and the synchronization time formed by several minimum service periods when each two adjacent data center servers in the synchronization path perform structure data synchronization are converted into structure data synchronization instructions and distributed to the corresponding data center servers; Drive each data center server to execute data storage and structural data synchronization for each data user according to the synchronization path formed by the source data center server selected by each data user, the selected transit data center server and the target synchronization data center server and the synchronization time of the two adjacent data center servers to execute structural data synchronization.

9. A structural data synchronization system for a relational database, characterized in that: include: An allocation module is used to receive structured data service requests from several data users and allocate the data users to several candidate data center servers where relational databases are deployed; A generation module is used to generate a structure data synchronization requirement list containing the structure data synchronization requirements of each data user before the target structure data synchronization cycle; wherein the structure data synchronization requirements include synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements for different minimum service periods; An extraction module is used to obtain server group status information of a target structure data synchronization period, and extract deployment status information and communication status information of several data center servers from the server group status information; A solution module is configured to adjust the synchronization path and synchronization time of each data user in the target structure data synchronization cycle based on the deployment status information and the communication status information, taking the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods as a driving force, and solve the optimal relational database synchronization strategy for the server group; specifically, the solution module includes: Considering the synchronization target requirements, synchronization data volume requirements, and synchronization frequency requirements of each data user in different minimum service periods according to the deployment status information and the communication status information; The synchronization path formed by the source data center server selected by each data user from the candidate data center servers, the transit data center server selected from the non-source data center servers, and the target synchronization data center server in the synchronization target requirement, and the synchronization time formed by several minimum service periods when each adjacent two data center servers in the synchronization path perform structural data synchronization are used as the solution target. An optimization algorithm is used to solve an optimal relational database synchronization strategy for the server group, so that the optimal relational database synchronization strategy satisfies an optimization goal determined by a constraint set constructed by communication state information, synchronization time and synchronization frequency, and synchronization frequency stability; The synchronization module is used to distribute the structure data synchronization instruction in the optimal relational database synchronization strategy to a plurality of data center servers, driving each data center server to execute structure data synchronization.

Citation Information

Patent Citations

  • Data replication method, control node and electronic equipment

    CN111666338A

  • Data synchronous transmission method and system for remote data center, medium and terminal

    CN112637356A