Multi-database processing method based on load balancing

By using load balancing technology and real-time monitoring in multi-database processing, the problem of a single database connection pool configuration being difficult to follow business changes is solved, achieving high performance and stability of the system and reducing operation and maintenance costs.

CN118819819AActive Publication Date: 2024-10-22HUANENG INFORMATION TECH CO LTD

Patent Information

Application Number
CN202410713724.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-10-22
Estimated Expiration
2044-06-04

AI Technical Summary

Technical Problem

A single database connection pool configuration cannot flexibly follow business changes, causing the system to need frequent adjustments when concurrency changes, affecting the smooth operation of the business and increasing operation and maintenance costs.

Method used

Adopt a multi-database processing method based on load balancing, deploy multiple database servers and select load balancing technology, adjust the load balancing strategy and database connection pool parameters, and monitor performance indicators in real time to maintain high-performance operation of the system.

Benefits of technology

It achieves stable operation of the system under high performance, improves data access efficiency and system stability, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819819A_ABST
    Figure CN118819819A_ABST
Patent Text Reader

Abstract

The invention provides a multi-database processing method based on load balancing, and belongs to the technical field of load adjustment. Classifying the target data according to business requirements and data access characteristics, and matching a database server for each piece of classified data according to a classified database; selecting a load balancing technology and determining a configuration rule according to the characteristics of all the database servers, and setting a central load balancer as a middle layer to connect all the database servers according to the configuration rule; after the central load balancer receives a client request, the request is routed to different database servers connected with the central load balancer according to a distribution strategy; and monitoring the execution performance index of each database server in real time, and adjusting the load balancing strategy and the connection pool parameters of the database servers according to the monitoring data. The system is kept running in a high-performance state, and the stability of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of load adjustment, and in particular to a multi-database processing method based on load balancing. Background Art

[0002] At present, with the rapid development of business, the configuration of a single fixed database connection pool can hardly meet the needs of business development. With the change of concurrency, the database connection configuration has to be adjusted. However, many systems run 24 / 7. Every time the MySQL connection pool configuration is modified, the service must be restarted. Each downtime affects the smooth operation of the business system to a certain extent, bringing heavy operation and maintenance costs. This model is relatively cumbersome and difficult to flexibly follow the rhythm of the business system.

[0003] Therefore, the present invention proposes a multi-database processing method based on load balancing. Summary of the invention

[0004] The present invention provides a multi-database processing method based on load balancing, which is used to adjust the load balancing strategy and database connection pool parameters by deploying multiple database servers and selecting load balancing technology to keep the system running in a high-performance state.

[0005] In one aspect, the present invention provides a multi-database processing method based on load balancing, comprising: Step 1: Classify the target data according to business requirements and data access characteristics, and match the database server to each classified data according to the classification database; Step 2: Select load balancing technology and determine configuration rules based on the characteristics of all database servers. Set up a central load balancer as the middle layer to connect all database servers according to the configuration rules. Step 3: When the central load balancer receives the client request, it routes the request to different database servers connected to the central load balancer according to the distribution strategy; Step 4: Monitor the execution performance indicators of each database server in real time, and adjust the load balancing strategy and connection pool parameters of the database server based on the monitoring data.

[0006] On the other hand, target data is classified according to business needs and data access characteristics, including: Sending a query request to a business client to obtain business demand data matching the query request; The target data is first classified according to the characteristics of the business demand data; The first classified data is prioritized according to data access characteristics to obtain second classified data, wherein the second classified data is the result of classifying the target data.

[0007] On the other hand, matching the database server to each classified data includes: determining an initial fit of each second classification data to each server in the classification database;

[0008] in, 1 indicates the initial fit between the second classification data and the corresponding server. ( ) represents the adjustment function, which is right Adjustment, represents the correlation between the corresponding server and the i-th data in the corresponding second classification data, which is obtained based on the server-data category correlation mapping table. represents the preset weight coefficient corresponding to the i-th data in the second classification data, represents the mean function, ln represents the logarithmic function, represents the standard relevance set to the corresponding server, and n represents the total number of all data in the corresponding second classification data; According to the priority of the corresponding second classification data and in combination with each initial fitness involved, the final fitness between the corresponding second classification data and each server is calculated;

[0009] in, Indicates the final degree of fit between the corresponding second classification data and the corresponding server; Indicates the highest priority among all priorities; Indicates the priority of the corresponding second classification data; Express The floor rounding function of ; min represents the minimum value symbol; max represents the maximum value symbol; A server corresponding to the highest fitness degree is selected from all final fitness degrees under each second classification data as a database server corresponding to the second classification data.

[0010] On the other hand, according to the characteristics of all database servers, the process of selecting load balancing technology and determining configuration rules includes: Based on the characteristics of the database server and preset standards, the load information of each database server is obtained from the load information collection pool, and the first weight coefficient of all indicators under each database server is obtained through a pre-configured dynamic load balancing algorithm; The specific calculation method of the first weight coefficient is as follows:

[0011]

[0012] in, Indicates the standardized indicator set of all indicators under the corresponding database server The index information degree of the jth standardized index in , ln( ) represents the logarithmic function, Represents a standardized set of indicators The standard value of the jth standardized indicator in , Represents a standardized set of indicators The first weight coefficient of the jth standardized index in , Indicates that the corresponding database server has a total of m indicators, and m>2; Indicates all The maximum value in ; Indicates that based on all The average value of .

[0013] On the other hand, based on the characteristics of all database servers, select load balancing technology and determine configuration rules, including: Based on all indicators and the first weight coefficient of the database server, the load condition of the database server is evaluated in combination with the evaluation function to obtain the load parameter of the database server; Matching the load balancing technology of the database server according to the load parameter-load balancing technology mapping table, and customizing the configuration rules of the central load balancer according to the load balancing technology; In combination with the configuration rules and the load parameters, the first weight coefficient of the database server indicator is dynamically adjusted to obtain a second weight coefficient; A configuration rule is determined based on the second weight coefficient and the load balancing technology, and a central load balancer is set as an intermediate layer to connect all database servers.

[0014] On the other hand, the distribution strategy is determined by the first strategy and the second strategy; The first strategy includes: an IP address of a database server obtained by a central load balancer; The second strategy includes: the central load balancer obtains the load status of the database server.

[0015] On the other hand, the process of real-time monitoring of the execution performance indicators of each database server includes: A database performance monitoring tool is configured in each database server, and log information generated under the execution performance index of the database server is monitored in real time according to the preset index standard of the database server; If the analysis results of the log information contain information that is inconsistent with the preset standards of the indicator, the inconsistent information will be locked and an early warning will be issued based on the alarm rules.

[0016] On the other hand, adjust the load balancing strategy and connection pool parameters of the database server based on the monitoring data, including: When an early warning is issued, locate the database server where the abnormality occurs, and obtain the abnormal monitoring data in the log information of the located server; The current abnormal state of the corresponding located server is obtained according to the abnormal monitoring data, and the load balancing strategy of the located server is adjusted in combination with the load balancing technology; At the same time, the occupancy of the connection pool resources of the located server in the current abnormal state is analyzed to obtain a first load ratio; Monitor the current occupancy of the corresponding connection pool resources to obtain the second load ratio; When the second load ratio is greater than the first load ratio, adjusting the corresponding connection pool parameters; After the load balancing strategy and connection pool parameters are adjusted, continue to monitor the operation of the database server.

[0017] The present invention provides a multi-database processing method based on load balancing, which is used to adjust the load balancing strategy and database connection pool parameters by deploying multiple database servers and selecting load balancing technology to keep the system running in a high-performance state. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is a flow chart of a multi-database processing method based on load balancing provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] Embodiment 1: like Figure 1 As shown, an embodiment of the present invention provides a multi-database processing method based on load balancing, comprising: Step 1: Classify the target data according to business requirements and data access characteristics, and match the database server to each classified data according to the classification database; Step 2: Select load balancing technology and determine configuration rules based on the characteristics of all database servers. Set up a central load balancer as the middle layer to connect all database servers according to the configuration rules. Step 3: When the central load balancer receives the client request, it routes the request to different database servers connected to the central load balancer according to the distribution strategy; Step 4: Monitor the execution performance indicators of each database server in real time, and adjust the load balancing strategy and connection pool parameters of the database server based on the monitoring data.

[0022] In this embodiment, business needs refer to specific needs and requirements in terms of functions, performance, security, etc. that the system needs to meet, such as: data access efficiency, load balancing and disaster recovery, performance monitoring and tuning, business scalability, etc.

[0023] In this embodiment, data access characteristics are characteristics of the way, frequency, and data demand pattern of target data being accessed and utilized in the system, including: access frequency, access pattern, data relevance, data volume, etc.

[0024] In this embodiment, the classification database includes multiple servers, wherein the matching between the server and the data is obtained based on the classification data.

[0025] In this embodiment, the database server refers to a server specifically used to store and manage data, and its main components include: a database management system, a storage system, an engine, a query processor, and a connection pool. It mainly performs operations such as querying, updating, and deleting the database.

[0026] In this embodiment, load balancing technology is a technology used to distribute workload among multiple servers to ensure that these servers can effectively process requests together, mainly including: DNS-based load balancing, hardware load balancer, software load balancer, four-layer load balancing, seven-layer load balancing and other categories.

[0027] In this embodiment, the configuration rules are the rules and parameters that need to be set after the load balancing technology is determined, including: load balancing algorithm, health check mechanism, session maintenance method, flow restriction strategy and other rules.

[0028] In this embodiment, the central load balancer is a key component responsible for coordinating and managing the entire database server cluster.

[0029] In this embodiment, the middle layer refers to a layer of system components used to connect the client and the back-end database server, mainly including: application server, cache server, message queue, security layer and other contents.

[0030] In this embodiment, the client request is a request sent by the application to the system, requesting the system to perform certain operations or obtain specific data, including: insert, query, update, store new data and other request types.

[0031] In this embodiment, the distribution strategy is the way in which the central load balancer routes client requests to different connected database servers, including: polling, minimum number of connections, random, distribution based on performance indicators, IP address hashing and other strategies.

[0032] In this embodiment, routing refers to the process of determining the path and method for data transmission in the network.

[0033] In this embodiment, the execution performance index is various data indicators obtained by real-time monitoring and evaluation of the database server performance, including: response time, throughput, load, connection pool usage, number of concurrent connections and other indicators.

[0034] In this embodiment, the monitoring data is the data obtained after monitoring the execution performance indicators, mainly to obtain the data generated by different indicators during the operation process, so as to facilitate the subsequent adjustment of the load balancing strategy based on the data situation.

[0035] In this embodiment, the connection pool parameters refer to various parameters used to configure and manage the database connection pool, including: maximum number of connections, minimum number of idle connections, connection timeout, maximum waiting time, connection validity detection and other parameters.

[0036] The working principle and beneficial effects of the above technical solution are: through data classification, load balancing technology, request routing and real-time monitoring, the system stability, availability and performance are improved, the data access efficiency is optimized, the database server load is balanced, the system is kept running in a high-performance state, and the system stability is improved.

[0037] Embodiment 2: Based on the above embodiment 1, the target data is classified according to business requirements and data access characteristics, including: Sending a query request to a business client to obtain business demand data matching the query request; The target data is first classified according to the characteristics of the business demand data; The first classified data is prioritized according to data access characteristics to obtain second classified data, wherein the second classified data is the result of classifying the target data.

[0038] In this embodiment, the business client uses a specific business system or application.

[0039] In this embodiment, the business demand data is relevant data collected, organized or extracted according to specific business needs, and may be: customer data, Party A data, financial statements, etc.

[0040] In this embodiment, the first classification is to preliminarily classify the target data according to the characteristics of the business demand data, for example, classification according to characteristics such as data type, access frequency, data volume, etc.

[0041] In this embodiment, priority classification refers to further sorting and classifying the data after the first classification according to data access characteristics and importance.

[0042] In this embodiment, the second classification is the result of prioritizing the target data according to the data access characteristics and importance after the first classification. The classification result includes the sorting of priority levels and the classification of priority levels, which are divided into three levels: medium, low and high.

[0043] The working principle and beneficial effects of the above technical solution are: through classification and priority division, the system query response speed is improved, data management is optimized, the system is kept running in a high-performance state, and the system stability is improved.

[0044] Embodiment 3: Based on the above embodiment 1, matching each classified data to a database server includes: determining an initial fit of each second classification data to each server in the classification database;

[0045] in, 1 indicates the initial fit between the second classification data and the corresponding server. ( ) represents the adjustment function, which is right Adjustment, represents the correlation between the corresponding server and the i-th data in the corresponding second classification data, which is obtained based on the server-data category correlation mapping table. represents the preset weight coefficient corresponding to the i-th data in the second classification data, represents the mean function, ln represents the logarithmic function, represents the standard relevance set to the corresponding server, and n represents the total number of all data in the corresponding second classification data; According to the priority of the corresponding second classification data and in combination with each initial fitness involved, the final fitness between the corresponding second classification data and each server is calculated;

[0046] in, Indicates the final degree of fit between the corresponding second classification data and the corresponding server; Indicates the highest priority among all priorities; Indicates the priority of the corresponding second classification data; Express The floor rounding function of ; min represents the minimum value symbol; max represents the maximum value symbol; A server corresponding to the highest fitness degree is selected from all final fitness degrees under each second classification data as a database server corresponding to the second classification data.

[0047] In this embodiment, the initial fitness degree indicates the initial matching degree between each second classification data and each server in the classification database.

[0048] In this embodiment, the adjustment function is a function used to adjust the initial fitness according to a specific attribute of the data and the relevance of the server.

[0049] In this embodiment, the association degree indicates the degree of association between the server and specific data in the second classification data.

[0050] In this embodiment, the server-data category association mapping table is a mapping table used to represent the association between the server and different data categories.

[0051] In this embodiment, the preset weight coefficient refers to a preset weight coefficient corresponding to the data in the second classification data.

[0052] In this embodiment, the final fitness refers to the fitness value corresponding to the second classification data and each server obtained by calculation under the priority condition.

[0053] The working principle and beneficial effect of the above technical solution are: by calculating the initial fitness of each classified data with the server, and combining the priority, calculating the final fitness, keeping the system running in a high-performance state, and improving system stability.

[0054] Embodiment 4: On the basis of the above-mentioned embodiment 1, according to the characteristics of all database servers, the process of selecting a load balancing technology and determining a configuration rule includes: Based on the characteristics of the database server and preset standards, the load information of each database server is obtained from the load information collection pool, and the first weight coefficient of all indicators under each database server is obtained through a pre-configured dynamic load balancing algorithm; The specific calculation method of the first weight coefficient is as follows:

[0055]

[0056] in, Indicates the standardized indicator set of all indicators under the corresponding database server The index information degree of the jth standardized index in , ln( ) represents the logarithmic function, Represents a standardized set of indicators The standard value of the jth standardized indicator in , Represents a standardized set of indicators The first weight coefficient of the jth standardized index in , Indicates that the corresponding database server has a total of m indicators, and m>2; Indicates all The maximum value in ; Indicates that based on all The average value of .

[0057] In this embodiment, the preset standard refers to a set of standards predetermined when designing the system, including: indicators considered by the load balancing algorithm and their weight distribution, standard value ranges or thresholds of various indicators, etc.

[0058] In this embodiment, the characteristics of the database server include: data processing capability, reliability and stability, scalability, high performance and the like.

[0059] In this embodiment, the load information collection pool is a software module for collecting, monitoring and storing the load information of each node in the system in real time, periodically or according to demand.

[0060] In this embodiment, the load information refers to the load status of the database server, including various indicators such as CPU usage, memory usage, disk I / O operations, and network traffic.

[0061] In this embodiment, the dynamic load balancing algorithm is an algorithm for adjusting system resource allocation in a real-time environment to achieve load balancing, wherein: the acquired load information is standardized, each indicator is mapped to the same dimension, and the load is dynamically adjusted to each server according to the preset indicator weight coefficient.

[0062] In this embodiment, the first weight coefficient is a coefficient used for the dynamic load balancing algorithm obtained by calculating and normalizing all indicators under each database server.

[0063] In this embodiment, the indicator information degree represents the information uncertainty difference of all indicators under the database server.

[0064] The working principle and beneficial effects of the above technical solution are: by standardizing the indicator set and calculating the first weight coefficient, the dynamic load balancing algorithm effectively schedules the database server load, keeps the system running in a high-performance state, and improves system stability.

[0065] Embodiment 5: On the basis of the above-mentioned embodiment 4, according to the characteristics of all database servers, a load balancing technology is selected and a configuration rule is determined, including: Based on all indicators and the first weight coefficient of the database server, the load condition of the database server is evaluated in combination with the evaluation function to obtain the load parameter of the database server; Matching the load balancing technology of the database server according to the load parameter-load balancing technology mapping table, and customizing the configuration rules of the central load balancer according to the load balancing technology; In combination with the configuration rules and the load parameters, the first weight coefficient of the database server indicator is dynamically adjusted to obtain a second weight coefficient; A configuration rule is determined based on the second weight coefficient and the load balancing technology, and a central load balancer is set as an intermediate layer to connect all database servers.

[0066] In this embodiment, the evaluation function is a parameter used to evaluate the load condition;

[0067] in, Indicates the evaluation result. Indicates that the database server has a total of q indicators. represents the parameter value of the kth indicator, Represents the first weight coefficient of the kth indicator.

[0068] In this embodiment, the load parameters are various indicators used to evaluate the load of the database server, including: CPU usage, memory utilization, disk read and write speed, network bandwidth utilization, request response time, etc.

[0069] In this embodiment, the load condition refers to the current workload and pressure condition of the database server, including: the number of requests currently being processed, resource utilization, response time, etc.

[0070] In this embodiment, the load parameter-load balancing technology mapping table is a mapping table indicating the correspondence between load parameters and load balancing technologies.

[0071] In this embodiment, the configuration rules refer to a series of operation rules determined based on information such as load parameters, load balancing technology and weight coefficients, including: load balancing algorithm selection, server health check settings, load scheduling strategies, weight coefficient adjustment rules and other rules.

[0072] In this embodiment, the second weight coefficient is determined as follows:

[0073] in, represents the second weight coefficient, represents the first weight coefficient, Indicates that there are a total of h configuration rules. Indicates the load parameters, represents the setting parameters of the fth configuration rule, represents the parameter weight of the fth configuration rule, Indicates standard parameters, Indicates from all Get the setting parameters of the configuration rule corresponding to the maximum weight; 1. Indicates the conversion coefficient, which is convenient for calculating the unification of numerical values.

[0074] The working principle and beneficial effects of the above technical solution are: by dynamically adjusting the weight coefficient, selecting appropriate load balancing technology and customizing configuration rules, the database server load balancing optimization is achieved, the system is kept running in a high-performance state, and the system stability is improved.

[0075] Embodiment 6: Based on the above embodiment 1, the distribution strategy is determined by the first strategy and the second strategy; The first strategy includes: an IP address of a database server obtained by a central load balancer; The second strategy includes: the central load balancer obtains the load status of the database server.

[0076] In this embodiment, the load condition refers to the current workload condition of the database server, including resource utilization, network load, service availability, and the like.

[0077] The working principle and beneficial effects of the above technical solution are: obtaining the IP address and loading status of the database server through the central load balancer, realizing intelligent load balancing scheduling, keeping the system running in a high-performance state, and improving system stability.

[0078] Embodiment 7: Based on the above embodiment 1, the process of real-time monitoring of the execution performance index of each database server includes: A database performance monitoring tool is configured in each database server, and log information generated under the execution performance index of the database server is monitored in real time according to the preset index standard of the database server; If the analysis results of the log information contain information that is inconsistent with the preset standards of the indicator, the inconsistent information will be locked and an early warning will be issued based on the alarm rules.

[0079] In this embodiment, the database performance monitoring tool is a software specifically used to monitor, analyze and manage the execution performance of the database system, and common tools include: SQL Profiler, MySQL Enterprise Monitor, PGAdmin and the like.

[0080] In this embodiment, the preset indicator standard is a standard of the database server execution performance indicator that is predefined.

[0081] In this embodiment, log information refers to records of the running status of the database server and execution performance indicators, including: performance statistics, query execution status, abnormal events, user activities, etc.

[0082] In this embodiment, the alarm rule is a set of conditions and actions preset in the database performance monitoring tool, which is used to generate real-time alarm notifications based on the monitoring data analysis results, including: trigger conditions, duration, alarm level, alarm action, notification object, etc.

[0083] The working principle and beneficial effects of the above technical solution are: the database performance monitoring tool monitors the server execution performance in real time, analyzes the log information and compares it with the preset standards, triggers alarm notifications under abnormal conditions, keeps the system running in a high-performance state, and improves system stability.

[0084] Embodiment 8: Based on the above embodiment 7, the load balancing strategy and the connection pool parameters of the database server are adjusted according to the monitoring data, including: When an early warning is issued, locate the database server where the abnormality occurs, and obtain the abnormal monitoring data in the log information of the located server; The current abnormal state of the corresponding located server is obtained according to the abnormal monitoring data, and the load balancing strategy of the located server is adjusted in combination with the load balancing technology; At the same time, the occupancy of the connection pool resources of the located server in the current abnormal state is analyzed to obtain a first load ratio; Monitor the current occupancy of the corresponding connection pool resources to obtain the second load ratio; When the second load ratio is greater than the first load ratio, adjusting the corresponding connection pool parameters; After the load balancing strategy and connection pool parameters are adjusted, continue to monitor the operation of the database server.

[0085] In this embodiment, abnormal monitoring data refers to the information and indicator data generated when an abnormal situation occurs during the operation of the database server, including: abnormal events, performance indicator abnormalities, connection pool resource occupancy, indicator comparison before and after load balancing strategy adjustment, and other data.

[0086] In this embodiment, the current abnormal state is that the database server has abnormal conditions such as poor performance, excessive load, response delay, etc. at a certain moment or in a certain period of time.

[0087] In this embodiment, the connection pool resource refers to a buffer in the database server used to manage and allocate database connections, including: connection number limit, idle connections, active connections, waiting time, etc.

[0088] In this embodiment, the occupancy refers to the degree to which connection pool resources or other system resources are used within a specific time period, including: connection pool resource occupancy, CPU occupancy, memory occupancy, network bandwidth occupancy, etc.

[0089] In this embodiment, the first load proportion refers to analyzing the occupancy of the connection pool resources of the located database server under an abnormal state.

[0090] In this embodiment, the second load proportion refers to monitoring and analyzing the real-time occupancy of the database server connection pool resources after the server load balancing strategy is adjusted.

[0091] In this embodiment, the adjustment includes: request routing adjustment, weight adjustment, fault switching, connection pool management and other operations.

[0092] The working principle and beneficial effect of the above technical solution are: by monitoring abnormal conditions and adjusting load balancing and connection pool parameters, the system is kept running in a high-performance state and the system stability is improved.

[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-database processing method based on load balancing, characterized in that: include: Step 1: Classify the target data according to business requirements and data access characteristics, and match the database server to each classified data according to the classification database; Step 2: Select load balancing technology and determine configuration rules based on the characteristics of all database servers. Set up a central load balancer as the middle layer to connect all database servers according to the configuration rules. Step 3: When the central load balancer receives the client request, it routes the request to different database servers connected to the central load balancer according to the distribution strategy; Step 4: Monitor the execution performance indicators of each database server in real time, and adjust the load balancing strategy and connection pool parameters of the database server based on the monitoring data.

2. A multi-database processing method based on load balancing according to claim 1, characterized in that: Classify target data according to business requirements and data access characteristics, including: Sending a query request to a business client to obtain business demand data matching the query request; The target data is first classified according to the characteristics of the business demand data; The first classified data is prioritized according to data access characteristics to obtain second classified data, wherein the second classified data is the result of classifying the target data.

3. The multi-database processing method based on load balancing according to claim 1 is characterized in that: Match each classification data to the database server, including: determining an initial fit of each second classification data to each server in the classification database; ;in, 1 indicates the initial fit between the second classification data and the corresponding server. ( ) represents the adjustment function, which is right Adjustment, represents the correlation between the corresponding server and the i-th data in the corresponding second classification data, which is obtained based on the server-data category correlation mapping table. represents the preset weight coefficient corresponding to the i-th data in the second classification data, represents the mean function, ln represents the logarithmic function, represents the standard relevance set to the corresponding server, and n represents the total number of all data in the corresponding second classification data; According to the priority of the corresponding second classification data and in combination with each initial fitness involved, the final fitness between the corresponding second classification data and each server is calculated; ;in, Indicates the final degree of fit between the corresponding second classification data and the corresponding server; Indicates the highest priority among all priorities; Indicates the priority of the corresponding second classification data; Express The floor rounding function of ; min represents the minimum value symbol; max represents the maximum value symbol; A server corresponding to the highest fitness degree is selected from all final fitness degrees under each second classification data as a database server corresponding to the second classification data.

4. The multi-database processing method based on load balancing according to claim 1 is characterized in that: According to the characteristics of all database servers, the process of selecting load balancing technology and determining configuration rules includes: Based on the characteristics of the database server and preset standards, the load information of each database server is obtained from the load information collection pool, and the first weight coefficient of all indicators under each database server is obtained through a pre-configured dynamic load balancing algorithm; The specific calculation method of the first weight coefficient is as follows: ;in, Indicates the standardized indicator set of all indicators under the corresponding database server The index information degree of the jth standardized index in , ln( ) represents the logarithmic function, Represents a standardized set of indicators The standard value of the jth standardized indicator in , Represents a standardized set of indicators The first weight coefficient of the jth standardized index in , Indicates that the corresponding database server has a total of m indicators, and m>2; Indicates all The maximum value in ; Indicates that based on all The average value of .

5. The multi-database processing method based on load balancing according to claim 4 is characterized in that: Select load balancing technology and determine configuration rules based on the characteristics of all database servers, including: Based on all indicators and the first weight coefficient of the database server, the load condition of the database server is evaluated in combination with the evaluation function to obtain the load parameter of the database server; Matching the load balancing technology of the database server according to the load parameter-load balancing technology mapping table, and customizing the configuration rules of the central load balancer according to the load balancing technology; In combination with the configuration rules and the load parameters, the first weight coefficient of the database server indicator is dynamically adjusted to obtain a second weight coefficient; A configuration rule is determined based on the second weight coefficient and the load balancing technology, and a central load balancer is set as an intermediate layer to connect all database servers.

6. The multi-database processing method based on load balancing according to claim 1 is characterized in that: The distribution strategy is determined by the first strategy and the second strategy; The first strategy includes: an IP address of a database server obtained by a central load balancer; The second strategy includes: the central load balancer obtains the load status of the database server.

7. The multi-database processing method based on load balancing according to claim 1 is characterized in that: The process of real-time monitoring of the execution performance indicators of each database server includes: A database performance monitoring tool is configured in each database server, and log information generated under the execution performance index of the database server is monitored in real time according to the preset index standard of the database server; If the analysis results of the log information contain information that is inconsistent with the preset standards of the indicator, the inconsistent information will be locked and an early warning will be issued based on the alarm rules.

8. The multi-database processing method based on load balancing according to claim 7 is characterized in that: Adjust the load balancing strategy and connection pool parameters of the database server based on the monitoring data, including: When an early warning is issued, locate the database server where the abnormality occurs, and obtain the abnormal monitoring data in the log information of the located server; The current abnormal state of the corresponding located server is obtained according to the abnormal monitoring data, and the load balancing strategy of the located server is adjusted in combination with the load balancing technology; At the same time, the occupancy of the connection pool resources of the located server in the current abnormal state is analyzed to obtain a first load ratio; Monitor the current occupancy of the corresponding connection pool resources to obtain the second load ratio; When the second load ratio is greater than the first load ratio, adjusting the corresponding connection pool parameters; After the load balancing strategy and connection pool parameters are adjusted, continue to monitor the operation of the database server.

Citation Information

Patent Citations

  • Web application cluster buffer utilization method and system

    CN106326012A

  • Load balancing method and system based on cloud service system

    CN108494868A

  • Acceleration method for dynamically judging data stream

    CN116896503A

  • Load balancing implementation method and device

    CN117155936A

  • Load balancing system in a cloud environment for algorithmic efficiency

    DE202024100297U1

Cited By

  • Database load dynamic management system

    CN120144413A

  • Data processing method and apparatus, data storage system, and electronic device

    WO2026114394A1