A database dynamic deployment optimization method and system
Patent Information
- Application Number
- CN202410479922.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-19
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2044-04-19
AI Technical Summary
[0003]传统数据库大多采用静态的配置,无法适应应用程序性能的实时变化,导致问题被发现时已经影响了系统性能,而且一些系统缺乏自适应性,无法根据实时情况调整数据库配置
数据划分模块:基于数据分布策略将指定数据库中的存储数据划分成多个片段,且结合实际部署结果将每个片段分配在相应节点上;
Smart Images

Figure CN118467497B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of database management technology, and in particular to a method and system for dynamic database deployment optimization. Background Technology
[0002] With the widespread adoption of distributed systems and database applications, dynamic deployment and optimization of databases has become an important technical challenge. In large-scale applications, database performance and resource utilization efficiency are crucial to the stability and responsiveness of the entire system.
[0003] Traditional databases mostly use static configurations, which cannot adapt to real-time changes in application performance. This means that by the time problems are discovered, system performance has already been affected. Moreover, some systems lack adaptability and cannot adjust database configurations according to real-time conditions.
[0004] This invention introduces a method and system for dynamic deployment optimization of databases. Summary of the Invention
[0005] This invention provides a database dynamic deployment optimization method and system. By using real-time performance monitoring tools to capture application performance indicators in a timely manner, it achieves real-time monitoring of the application status. Based on the real-time monitoring results, a dynamic configuration adjustment strategy is adopted to adjust the database configuration in real time according to changes in application performance to optimize performance. Through real-time monitoring and dynamic configuration adjustment, the database deployment method can be flexibly adjusted to adapt to different application performance requirements, achieving adaptive dynamic deployment and configuration to better adapt to complex and changing application environments, thereby improving the overall system performance and efficiency.
[0006] This invention provides a method for optimizing dynamic database deployment, comprising: Step 1: Based on the data tracking tools deployed on the application, monitor the application's data flow and access patterns in real time, and then determine the data distribution strategy; Step 2: Determine node roles based on data distribution strategies. At the same time, determine the real-time performance metrics of the application and the number of nodes for each role category based on performance monitoring tools, and actually deploy the corresponding nodes based on node roles and node numbers. Step 3: Based on the data distribution strategy, divide the stored data in the specified database into multiple fragments, and allocate each fragment to the corresponding node based on the actual deployment results; Step 4: Develop adjustment strategies based on real-time performance metrics and dynamically adjust and deploy the allocated segments.
[0007] This invention provides a database dynamic deployment optimization method, which, based on a data tracking tool deployed on an application, monitors the application's data flow and access patterns in real time, including: Match the official operation documentation that matches the application type in the preset type - document library; The operation library is generated according to the official operation documentation, and the operation library is initialized according to the application's configuration file; Based on the preset type-function library, the required tracking functions that are consistent with the application type are determined, and a mapping relationship between the initialization operation library and the required tracking functions is established; Based on the mapping relationship, the code nodes integrated into the application are determined, and the corresponding trigger code is inserted; The trigger code determines the trigger points of the application during the application process, and the data generated during the application process is tracked based on the communication connection between the trigger points and the data tracking tool.
[0008] This invention provides a method for dynamic database deployment optimization, which monitors the data flow and access patterns of applications in real time to determine a data distribution strategy, including: Based on real-time monitoring of application data flow and access patterns using data tracking tools, several relevant metrics are identified. Based on the preset indicator-strategy library, determine the single indicator strategy for each indicator; Perform correlation analysis on the multiple indicators to obtain the correlation values between pairs of indicators, and combine the single indicator strategies for pairs of indicators whose correlation values are higher than a preset threshold. Choose the group that contains the most single-indicator strategies as the data distribution strategy.
[0009] This invention provides a method for dynamic database deployment optimization, which determines node roles based on data distribution strategies and simultaneously determines the real-time performance metrics of the application and the number of nodes for each role category based on performance monitoring tools, including: The main classification of node roles is determined based on data distribution strategies; Use performance monitoring tools to monitor applications and obtain real-time performance metrics. All real-time performance metrics are grouped based on a preset metric-node library and the main classifications of defined node roles. The performance requirements for each node category are determined based on the real-time performance metrics included in each group, and the category weights are determined accordingly. The number of nodes for each node category is determined based on the classification weight of each node and the total number of nodes in the database.
[0010] This invention provides a method for dynamic deployment optimization of databases, which determines the performance requirements of corresponding node categories based on the real-time performance indicators included in each group, including: For each group containing real-time performance metrics, construct multiple performance arrays; Calculate the relative performance requirement coefficient for each node category based on each performance array:
[0011] in, This represents the relative performance requirement coefficient for node category i. This represents the number of performance arrays corresponding to node category i. Let represent the weight coefficient of the j0th performance metric in the j1th performance array under node category i, and , This represents the adjustment coefficient of the j0th performance index in the j1th performance array under node category i. This represents the actual value of the j0th performance index in the j1st individual performance array under node category i; This represents the preset value of the j0th performance metric in the j1st performance array under node category i; This represents the number of performance metrics in the j1-th performance array under node category i; Based on the relative performance requirement coefficients for the corresponding node classifications, calculate the performance requirement weight coefficients for the corresponding node classifications:
[0012] in, This represents the performance requirement adjustment factor for node category i. This is a regulating factor used to adjust the relative performance requirements between different node classifications, and , The number of nodes to be categorized; Calculate the performance requirement value for each node category based on the performance requirement weighting coefficient for each node category:
[0013] in, This represents the performance requirement value for node category i. This indicates the preset demand value. This represents the preset conversion coefficient, which indicates the weighting coefficient of the performance requirements for node category i. Based on the performance requirement value and node classification, the performance requirements for the corresponding node classification are obtained from the classification-value-requirement mapping table.
[0014] This invention provides a method for dynamic database deployment optimization, which divides the stored data in a specified database into multiple fragments based on a data distribution strategy, and allocates each fragment to a corresponding node based on the actual deployment results, including: The sharding rules corresponding to each node category are determined based on the data sharding strategy. Based on sharding rules, the stored data in the specified database is divided into multiple segments of fixed size, and each segment is mapped to the corresponding node based on a preset algorithm that matches the actual deployment results.
[0015] This invention provides a method for dynamic deployment optimization of a database, which formulates an adjustment strategy based on real-time performance indicators and dynamically adjusts and deploys allocated segments, including: Real-time monitoring of deployed database nodes is performed using performance monitoring tools to obtain real-time performance metrics and their corresponding specific values. Based on the specific values of real-time performance indicators and the preset performance reference table, the performance of each node category is evaluated. If the performance evaluation score does not reach the preset score, an adjustment strategy will be formulated based on the node's performance evaluation results and the preset score-strategy comparison table. Based on the established adjustment strategy, the mapped segments are dynamically adjusted and deployed.
[0016] This invention provides a database dynamic deployment optimization system, comprising: Data tracking module: Based on data tracking tools deployed on the application, it monitors the application's data flow and access patterns in real time, thereby determining the data distribution strategy; Deployment determination module: Determines node roles based on data distribution strategy, and determines the application's real-time performance indicators and the number of nodes for each role category based on performance monitoring tools, and actually deploys the corresponding nodes based on node roles and node numbers. Data partitioning module: Based on the data distribution strategy, the stored data in the specified database is divided into multiple fragments, and each fragment is assigned to the corresponding node based on the actual deployment results; Strategy Adjustment Module: Formulates adjustment strategies based on real-time performance metrics and dynamically adjusts and deploys the allocated segments.
[0017] This invention provides a database dynamic deployment optimization method and system. By using real-time performance monitoring tools to capture application performance indicators in a timely manner, it achieves real-time monitoring of the application status. Based on the real-time monitoring results, a dynamic configuration adjustment strategy is adopted to adjust the database configuration in real time according to changes in application performance to optimize performance. Through real-time monitoring and dynamic configuration adjustment, the database deployment method can be flexibly adjusted to adapt to different application performance requirements, achieving adaptive dynamic deployment and configuration to better adapt to complex and changing application environments, thereby improving the overall system performance and efficiency. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a database dynamic deployment optimization method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a database dynamic deployment optimization system provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0021] Example 1 like Figure 1 As shown in the figure, an embodiment of the present invention provides a database dynamic deployment optimization method, including: Step 1: Based on the data tracking tools deployed on the application, monitor the application's data flow and access patterns in real time, and then determine the data distribution strategy; Step 2: Determine node roles based on data distribution strategies. At the same time, determine the real-time performance metrics of the application and the number of nodes for each role category based on performance monitoring tools, and actually deploy the corresponding nodes based on node roles and node numbers. Step 3: Based on the data distribution strategy, divide the stored data in the specified database into multiple fragments, and allocate each fragment to the corresponding node based on the actual deployment results; Step 4: Develop adjustment strategies based on real-time performance metrics and dynamically adjust and deploy the allocated segments.
[0022] In this embodiment, the data tracking tool is deployed on the application to monitor the data flow and access patterns within the application. It is used to track the data transmission path within the application in real time, record the source, destination, and processing of the data. For example, a data tracking tool can record the process of a user logging into an e-commerce website and browsing product pages, track the product information browsed by the user, associate it with the data in the shopping cart, and ultimately record the user's purchasing behavior. In this embodiment, data flow refers to the process of data being transmitted, flowing, or exchanged within an application, including the movement of data from one module, component, or node to another, as well as the transmission path of data between different parts of the system. For example, in an online social networking application, data flow involves a user posting a message, which is then processed by the server and transmitted to other users. In this embodiment, the access pattern refers to how data is used in an application, including the access methods and frequency of databases, files, or other storage resources, as well as the patterns of data reading and writing operations in the system. For example, in a student management system, the access pattern may include teachers frequently querying student grade information and students regularly updating their personal profiles. In this embodiment, the data distribution strategy is a method determined based on the monitoring results of the data tracking tool. It is used to divide the stored data in the database into multiple fragments and determine how to distribute these fragments on different nodes of the system. For example, if the data distribution strategy is based on the user's geographical location, the data can be distributed on the node closest to the user to improve access speed. If it is based on the data access frequency, frequently accessed data can be distributed on nodes with better performance.
[0023] In this embodiment, node role refers to the role classification of each node in the database system in the whole system. Different node roles have different tasks and functions, such as reading, writing, and storing. For example, in a distributed database system, node roles may include master node (responsible for coordinating and processing requests), storage node (responsible for storing data), computing node (responsible for processing computing tasks), etc. In this embodiment, the performance monitoring tool is a tool used to monitor the runtime performance of an application and collect real-time performance indicators such as system resource usage, response time, and throughput. For example, a performance monitoring tool can monitor performance indicators such as CPU utilization, memory usage, and database query response time of a database server. In this embodiment, real-time performance metrics refer to various performance metrics collected in real time during system operation, such as response time, throughput, and resource utilization. For example, in an online payment system, real-time performance metrics include the number of transactions processed per second, average response time, and server load.
[0024] In this embodiment, the specified database refers to a specific database in the system used to store and manage data, including relational databases, NoSQL databases, etc. For example, an e-commerce website may use a MySQL database to store user information, product information, and order information. In this embodiment, the actual deployment result refers to the deployment state in which the stored data in the database is actually divided into multiple fragments and allocated to various nodes according to the data distribution strategy and the monitoring results of the performance monitoring tool. For example, if a node role is determined to be a storage node, the actual deployment result will include the specific data fragments stored on that node, as well as the performance monitoring data of that node.
[0025] In this embodiment, the adjustment strategy is a set of rules or methods formulated based on real-time performance indicators to dynamically adjust and deploy the allocated segments in order to optimize the system performance. For example, if the performance evaluation score of a node is lower than a preset score, the adjustment strategy may include distributing its load to other nodes or reallocating data segments to improve performance.
[0026] The working principle and beneficial effects of the above technical solution are as follows: By using real-time performance monitoring tools, application performance indicators are captured in a timely manner, enabling real-time monitoring of the application status. Based on the real-time monitoring results, a dynamic configuration adjustment strategy is adopted to adjust the database configuration in real time according to changes in application performance to optimize performance. Through real-time monitoring and dynamic configuration adjustment, the database deployment method can be flexibly adjusted to adapt to different application performance requirements, achieving adaptive dynamic deployment and configuration to better adapt to complex and changing application environments, thereby improving the overall system performance and efficiency.
[0027] Example 2 This invention provides a database dynamic deployment optimization method, which, before real-time monitoring of the application's data flow and access patterns using a data tracking tool deployed on the application, includes: Match the official operation documentation that matches the application type in the preset type - document library; The operation library is generated according to the official operation documentation, and the operation library is initialized according to the application's configuration file; Based on the preset type-function library, the required tracking functions that are consistent with the application type are determined, and a mapping relationship between the initialization operation library and the required tracking functions is established; Based on the mapping relationship, the code nodes integrated into the application are determined, and the corresponding trigger code is inserted; The trigger code determines the trigger points of the application during the application process, and the data generated during the application process is tracked based on the communication connection between the trigger points and the data tracking tool.
[0028] In this embodiment, the preset type-document library refers to a predefined collection of documents that contains official operation documents consistent with the application type, including detailed documents about application operation, configuration and functions. For example, for an e-commerce website, the preset type-document library includes official operation documents about user registration, product management, order processing, etc.
[0029] In this embodiment, the operation library is a library generated based on the official operation documentation. It contains detailed information about the operations that the application may perform, and is used to initialize the application and provide necessary information for the data tracking tool. For example, the official operation documentation describes the user registration process, and the operation library includes detailed operation information about user registration, such as input fields, verification processes, etc. In this embodiment, the configuration file is a file containing the application's configuration information, such as database connection information and service port, which is used to initialize the application's runtime environment. For example, the configuration file BS5012b** contains information such as the database server's address, username, and password so that the application can correctly connect to the database when it starts up. In this embodiment, initialization refers to creating an initial state for the application based on the operation library and configuration file, including setting necessary parameters, establishing connections, and preparing to start accepting and processing requests. For example, when the application starts, the database connection information in the configuration file is applied to the application through initialization to ensure that the application can communicate with the database correctly.
[0030] In this embodiment, the preset type-function library refers to a predefined set of functions that includes functions that need to be tracked and a list of application functions that need to be monitored and tracked, consistent with the application type. For example, for a social media application, the preset type-function library includes functions that need to be tracked, such as user registration, posting messages, and liking.
[0031] In this embodiment, the mapping relationship refers to the correspondence established between the initialization operation library and the required tracking function. For example, if the initialization operation library describes the user registration process, the mapping relationship may associate the user registration function with the corresponding part in the initialization operation library.
[0032] In this embodiment, a code node refers to a specific code segment in the application, which is where the data tracking tool will insert trigger code. For example, if user registration is a function, the corresponding code node is the code segment that processes user registration. In this embodiment, the trigger code is a code snippet inserted into the application code by the data tracing tool to trigger data tracing at specific trigger points. For example, in the user registration function, the trigger code is inserted into the key steps of user registration so that data tracing is triggered at these steps.
[0033] In this embodiment, the trigger point is a specific event or state during the execution of the application. The trigger code will be executed at these points to identify the specific moment or condition that the data tracking tool should monitor. For example, in the user registration function, the trigger point may be the moment when the user clicks the registration button, which is the key point for triggering data tracking. In this embodiment, the communication connection relationship refers to the communication connection established between the trigger code and the data tracking tool, which is used to transmit tracking data. For example, the data tracking tool may collect information about data flow and access patterns during the user registration process by establishing a communication connection with the trigger code.
[0034] The working principle and beneficial effects of the above technical solution are as follows: By monitoring the data flow and access patterns of the application in real time, the system can dynamically adjust the database deployment to adapt to the actual needs of the application. By matching official operation documents and function libraries, the system can accurately track the execution process of key functions in the application, thereby providing more targeted optimization strategies for dynamic database deployment. Automatic matching of official documents and configuration files, automatic generation of operation libraries, and establishment of mapping relationships reduce the manual costs of configuration and mapping, and improve the system's automation level. By formulating adjustment strategies according to real-time performance indicators, the system can dynamically adjust the deployment based on the application's operating status. By determining the communication connection between trigger points and data tracking tools, the system achieves flexible monitoring of data flow, enabling the data generated during the application process to be effectively tracked and analyzed. This improves the system's performance and efficiency.
[0035] Example 3 This invention provides a database dynamic deployment optimization method that monitors application data flow and access patterns in real time to determine a data distribution strategy, including: Based on real-time monitoring of application data flow and access patterns using data tracking tools, several relevant metrics are identified. Based on the preset indicator-strategy library, determine the single indicator strategy for each indicator; Perform correlation analysis on the multiple indicators to obtain the correlation values between pairs of indicators, and combine the single indicator strategies for pairs of indicators whose correlation values are higher than a preset threshold. Choose the group that contains the most single-indicator strategies as the data distribution strategy.
[0036] In this embodiment, the relevant multiple indicators refer to multiple parameters or data related to application performance captured by the system in real-time monitoring, including throughput, number of concurrent connections, database read and write speed, connection response time, CPU utilization, etc.
[0037] In this embodiment, the preset index-strategy library is a predefined library that stores the relationship between various performance indices and corresponding optimization strategies; In this embodiment, a single-metric strategy is a specific scheme for adjusting database configuration defined for a single performance metric. For example, if the preset metric-strategy library defines a strategy of increasing the connection pool size for high concurrent connections, then it corresponds to a single-metric strategy. In this embodiment, single-indicator strategies for pairs of indicators with correlation values higher than a preset threshold are combined. For example, a data sharding strategy is determined based on multiple indicators, including three indicators: access frequency (AF), data size (DS), and node load (NL). The correlation between these three indicators is calculated, and 0.7 is selected as the threshold: correlation (AF, DS) = 0.8, correlation (AF, NL) = 0.7, correlation (DS, NL) = 0.7. The correlation between the three indicators meets the preset threshold, so a combined strategy A1 containing AF + DS + NL is generated. This ensures that high-frequency data is allocated to high-performance nodes, large-size fragments are allocated to low-load nodes, and the load of each node is balanced. The other three indicators are: data importance (DI), timeliness (TT), and security (SC). The calculated correlations are: (DI, TT) = 0.7, (DI, SC) = 0.5, (TT, SC) = 0.6. Based on the correlation values, a strategy A1 containing DI + DS + NL can be generated. TT combination strategy A3: Since combination strategy A1 contains more single indicator strategies than combination strategy A3, a data distribution strategy is generated based on combination strategy A1.
[0038] In this embodiment, the data distribution strategy is a method of distributing data stored in the database to different nodes based on real-time monitoring of application data flow and access patterns. For example, there are three performance metrics: read speed, write speed, and storage space utilization. Each metric has a corresponding single-metric strategy: For read speed, data with low read speed requirements is distributed to nodes with lower read speeds; data with high read speed requirements is distributed to nodes with higher read speeds. For write speed, data with low write speed requirements is distributed to nodes with lower write speeds; data with high write speed requirements is distributed to nodes with higher write speeds. For storage space utilization, data with low storage space utilization requirements is distributed to nodes with lower storage space utilization; data with high storage space utilization requirements is distributed to nodes with higher storage space utilization. Based on these single-metric strategies, a data distribution strategy is formed. For data requiring high read speed and low write speed, the system will consider distributing it to nodes with high read speed but low write speed. For data requiring high write speed and high storage space utilization, the system may distribute it to nodes with high write speed and high storage space utilization.
[0039] The working principle and beneficial effects of the above technical solution are as follows: By deploying data tracking tools on the application, the data flow and access patterns of the application are monitored in real time. This allows the system to adopt dynamic configuration adjustment strategies based on actual operating conditions to optimize database performance. Through real-time monitoring and dynamic configuration adjustments, the database deployment method can be flexibly adjusted to adapt to different workloads, improving the system's adaptability. Real-time performance monitoring and dynamic adjustment enable the system to better adapt to changes in workload, thereby improving the overall system performance and efficiency. This also enhances the system's responsiveness and resource utilization.
[0040] Example 4 This invention provides a database dynamic deployment optimization method that determines node roles based on a data distribution strategy and simultaneously determines the real-time performance metrics of the application and the number of nodes for each role category based on performance monitoring tools, including: The main classification of node roles is determined based on data distribution strategies; Use performance monitoring tools to monitor applications and obtain real-time performance metrics. All real-time performance metrics are grouped based on a preset metric-node library and the main classifications of defined node roles. The performance requirements for each node category are determined based on the real-time performance metrics included in each group, and the category weights are determined accordingly. The number of nodes for each node category is determined based on the classification weight of each node and the total number of nodes in the database.
[0041] In this embodiment, the main classification is based on the data distribution strategy to determine the role of nodes. The nodes in the system are divided according to key characteristics or attributes in order to more effectively manage and optimize the deployment of the database. For example, the database system divides nodes according to data access patterns. There may be master nodes responsible for hot data and slave nodes responsible for cold data.
[0042] In this embodiment, real-time performance metrics are based on performance monitoring tools. Real-time performance metrics refer to real-time data that reflects the running status of the application and the performance of the database, such as response time, throughput, and error rate.
[0043] In this embodiment, the preset index-node library is a predefined library that stores various performance indicators and node classification relationships. It helps the system determine the classification and performance requirements of nodes based on different combinations of performance indicators. For example, the preset index-node library includes node classifications for high loads, whose performance requirements include larger memory and higher processing power.
[0044] In this embodiment, the performance requirements for node classification are determined for each node classification, including hardware configuration and performance parameters. For example, if a node classification mainly handles write operations, its performance requirements include the ability to write to disk at high speed, while the classification weight reflects the relative importance of the classification in the entire system.
[0045] The working principle and beneficial effects of the above technical solution are as follows: By clearly defining the main categories and performance requirements, the system can manage each node more precisely to meet different workload requirements. Combined with real-time performance indicators, the system can obtain the running status of applications and databases in a timely manner, which helps to respond to performance issues more quickly. Based on preset indicators - node library and node classification weights, the system can flexibly adjust the configuration of nodes to adapt to different performance requirements and workloads.
[0046] Example 5 This invention provides a method for dynamically deploying and optimizing a database, characterized by determining the performance requirements of corresponding node categories based on the real-time performance indicators included in each group, including: For each group containing real-time performance metrics, construct multiple performance arrays; Calculate the relative performance requirement coefficient for each node category based on each performance array:
[0047] in, This represents the relative performance requirement coefficient for node category i. This represents the number of performance arrays corresponding to node category i. Let represent the weight coefficient of the j0th performance metric in the j1th performance array under node category i, and , This represents the adjustment coefficient of the j0th performance index in the j1th performance array under node category i. This represents the actual value of the j0th performance index in the j1st individual performance array under node category i; This represents the preset value of the j0th performance metric in the j1st performance array under node category i; This represents the number of performance metrics in the j1-th performance array under node category i; Based on the relative performance requirement coefficients for the corresponding node classifications, calculate the performance requirement weight coefficients for the corresponding node classifications:
[0048] in, This represents the performance requirement adjustment factor for node category i. This is a regulating factor used to adjust the relative performance requirements between different node classifications, and , The number of nodes to be categorized; Calculate the performance requirement value for each node category based on the performance requirement weighting coefficient for each node category:
[0049] in, This represents the performance requirement value for node category i. This indicates the preset demand value. This represents the preset conversion coefficient, which indicates the weighting coefficient of the performance requirements for node category i. Based on the performance requirement value and node classification, the performance requirements for the corresponding node classification are obtained from the classification-value-requirement mapping table.
[0050] In this embodiment, the relative performance requirement coefficient is based on the requirement coefficient of each node classification based on each performance array; In this embodiment, the adjustment coefficient of the performance index is used to adjust the actual value of the performance index to reflect the specific requirements of node classification for each performance index.
[0051] In this embodiment, the performance requirement weight coefficient is calculated based on the relative performance requirement coefficient. The performance requirement weight coefficient of each node category is then used to weigh the performance requirements of different categories based on the requirements of each node category for different performance indicators.
[0052] In this embodiment, the preset conversion coefficient is used to map the performance requirement weight coefficient to the actual performance requirement value. Based on the relationship between the preset requirement value and the weight coefficient, the final performance requirement value more accurately represents the actual requirements of the system.
[0053] The working principle and beneficial effects of the above technical solution are as follows: By comprehensively considering multiple performance indicators, weights, and adjustment factors, the system can more accurately calculate the performance requirements of each node classification, improving the accuracy of performance requirement calculation. The introduction of adjustment coefficients allows the system to flexibly adjust the requirements for different performance indicators to adapt to the actual situation of different node classifications. The calculation of performance requirement weight coefficients takes into account adjustment factors, ensuring that the performance requirements among different node classifications can achieve overall balance. This helps improve the overall stability and performance of the system.
[0054] Example 6 This invention provides a database dynamic deployment optimization method, characterized by dividing the stored data in a specified database into multiple segments based on a data distribution strategy, and allocating each segment to a corresponding node based on the actual deployment results, including: The sharding rules corresponding to each node category are determined based on the data sharding strategy. Based on sharding rules, the stored data in the specified database is divided into multiple segments of fixed size, and each segment is mapped to the corresponding node based on a preset algorithm that matches the actual deployment results.
[0055] In this embodiment, the sharding rule is determined based on the data distribution strategy and is used to divide the stored data in the specified database into multiple fragments. This includes how to divide the data so that the data contained in each fragment is similar or related to some extent. Different sharding rules are suitable for different scenarios, including hash sharding, for example: hashing the user ID and mapping the hash value to the range of shards, such as 0-99. The user with the hash value of user ID 45 is assigned to the 46th shard.
[0056] In this embodiment, the actual deployment result is that during the dynamic deployment of the database, the system allocates each fragment to the corresponding node according to the actual deployment result. For example, if the system detects that node A has a high load while node B has a relatively low load during operation, fragment 1 is redistributed from node A to node B based on the actual deployment result to achieve load balancing. In this embodiment, a preset algorithm is used to map each fragment to a corresponding node to achieve a reasonable distribution of data among nodes. For example, a preset algorithm determines the mapping of each fragment among nodes based on the access frequency and size of the data. The algorithm can make decisions based on the following indicators: Access frequency: measures how frequently each fragment is accessed. If a fragment is accessed frequently, the preset algorithm may tend to map the fragment to a node with higher performance to improve data access speed. Data size: measures the amount of data contained in each fragment. The preset algorithm may consider mapping large fragments to nodes with larger storage capacity to ensure that nodes have enough space to store these fragments. Node load: The preset algorithm can also consider the current load of each node. If a node has a high load, the algorithm may tend to map new fragments to nodes with lower load to achieve load balancing.
[0057] The working principle and beneficial effects of the above technical solution are as follows: By using sharding rules, the system can effectively divide the stored data in the database into multiple fragments, thereby achieving a more uniform and reasonable distribution of data. Based on the consideration of actual deployment results, the adaptability of dynamic database deployment is ensured. The system can flexibly adjust the distribution of data according to the actual situation to adapt to the load changes of nodes. The use of preset algorithms enables fragments to be intelligently mapped to the corresponding nodes, thereby achieving effective data management and load balancing, avoiding overload of some nodes, and improving the overall performance of the system.
[0058] Example 7 This invention provides a database dynamic deployment optimization method, characterized by formulating an adjustment strategy according to real-time performance indicators and dynamically adjusting and deploying allocated segments, including: Real-time monitoring of deployed database nodes is performed using performance monitoring tools to obtain real-time performance metrics and their corresponding specific values. Based on the specific values of real-time performance indicators and the preset performance reference table, the performance of each node category is evaluated. If the performance evaluation score does not reach the preset score, an adjustment strategy will be formulated based on the node's performance evaluation results and the preset score-strategy comparison table. Based on the established adjustment strategy, the mapped segments are dynamically adjusted and deployed.
[0059] In this embodiment, the preset performance reference table is a table containing expected values or standards for various performance indicators. The preset performance indicators are set based on system requirements, performance goals, or best practices. For example, the preset performance reference table of a database system specifies the optimal values for throughput, response time, and availability for each node category. The system can evaluate the performance of each node category based on these standards.
[0060] In this embodiment, the performance evaluation score is based on comparing the specific values of real-time performance indicators with a preset performance reference table. Each performance indicator of each node category is evaluated to generate a performance evaluation score, which represents the performance of each node category on each performance indicator. It is a numerical value that reflects the degree of performance excellence. In this embodiment, the preset score-strategy comparison table is a reference table or mapping rule used to formulate adjustment strategies. It associates performance evaluation scores with specific adjustment strategies and determines which dynamic adjustment deployment strategy should be adopted based on the different scores. For example, the preset score-strategy comparison table stipulates that if the performance evaluation score is lower than 70 points, a data migration strategy is adopted to migrate some data fragments from the node category to other node categories in order to reduce the load on the node. In this embodiment, the adjustment strategy is a series of operation steps or rules formulated based on the performance evaluation results of the nodes and a preset score-strategy comparison table. It is used to dynamically adjust and deploy the mapped database fragments, including operations such as migrating data fragments, reallocating load, and increasing node capacity, in order to optimize the performance and stability of the system.
[0061] The working principle and beneficial effects of the above technical solution are as follows: By monitoring real-time performance indicators and comparing them with preset performance reference tables, the system can dynamically identify performance problems and take corresponding measures to optimize the performance of database nodes. Using a preset score-strategy comparison table, the system automatically formulates adjustment strategies, reducing the need for manual intervention, improving the efficiency and response speed of dynamic database deployment, and effectively managing and controlling the performance of database nodes through strategy adjustment to ensure that they operate within the expected range, thereby improving the stability and maintainability of the system.
[0062] Example 8 This invention provides a database dynamic deployment optimization system, characterized in that it includes: Data tracking module: Based on data tracking tools deployed on the application, it monitors the application's data flow and access patterns in real time, thereby determining the data distribution strategy; Deployment determination module: Determines node roles based on data distribution strategy, and determines the application's real-time performance indicators and the number of nodes for each role category based on performance monitoring tools, and actually deploys the corresponding nodes based on node roles and node numbers. Data partitioning module: Based on the data distribution strategy, the stored data in the specified database is divided into multiple fragments, and each fragment is assigned to the corresponding node based on the actual deployment results; Strategy Adjustment Module: Formulates adjustment strategies based on real-time performance metrics and dynamically adjusts and deploys the allocated segments.
[0063] The working principle and beneficial effects of the above technical solution are as follows: By using real-time performance monitoring tools, application performance indicators are captured in a timely manner, enabling real-time monitoring of the application status. Based on the real-time monitoring results, a dynamic configuration adjustment strategy is adopted to adjust the database configuration in real time according to changes in application performance to optimize performance. Through real-time monitoring and dynamic configuration adjustment, the database deployment method can be flexibly adjusted to adapt to different application performance requirements, achieving adaptive dynamic deployment and configuration to better adapt to complex and changing application environments, thereby improving the overall system performance and efficiency.
[0064] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A database dynamic deployment optimization method, characterized in that, include: Step 1: Based on the data tracking tools deployed on the application, monitor the application's data flow and access patterns in real time, and then determine the data distribution strategy; Step 2: Determine node roles based on data distribution strategies. At the same time, determine the real-time performance metrics of the application and the number of nodes for each role category based on performance monitoring tools, and actually deploy the corresponding nodes based on node roles and node numbers. Step 3: Based on the data distribution strategy, divide the stored data in the specified database into multiple fragments, and allocate each fragment to the corresponding node based on the actual deployment results; Step 4: Develop adjustment strategies based on real-time performance metrics and dynamically adjust and deploy the allocated segments; Node roles are determined based on a data distribution strategy. Simultaneously, real-time performance metrics of the application and the number of nodes for each role category are determined using performance monitoring tools, including: The main classification of node roles is determined based on data distribution strategies; Use performance monitoring tools to monitor applications and obtain real-time performance metrics. All real-time performance metrics are grouped based on a preset metric-node library and the main classifications of defined node roles. The performance requirements for each node category are determined based on the real-time performance metrics included in each group, and the category weights are determined accordingly. The number of nodes in each node category is determined based on the classification weight of each node category and the total number of nodes in the database. The performance requirements for each node category are determined based on the real-time performance metrics included in each group, including: For each group containing real-time performance metrics, construct multiple performance arrays; Calculate the relative performance requirement coefficient for each node category based on each performance array: in, This represents the relative performance requirement coefficient for node category i. This represents the number of performance arrays corresponding to node category i. Let represent the weight coefficient of the j0th performance metric in the j1th performance array under node category i, and , This represents the adjustment coefficient of the j0th performance index in the j1th performance array under node category i. This represents the actual value of the j0th performance index in the j1st individual performance array under node category i; This represents the preset value of the j0th performance metric in the j1st performance array under node category i; This represents the number of performance metrics in the j1-th performance array under node category i; Based on the relative performance requirement coefficients for the corresponding node classifications, calculate the performance requirement weight coefficients for the corresponding node classifications: in, This represents the performance requirement adjustment factor for node category i. This is a regulating factor used to adjust the relative performance requirements between different node classifications, and , The number of nodes to be categorized; Calculate the performance requirement value for each node category based on the performance requirement weighting coefficient for each node category: in, This represents the performance requirement value for node category i. This indicates the preset demand value. This represents the preset conversion coefficient, which indicates the weighting coefficient of the performance requirements for node category i. Based on the performance requirement value and node classification, the performance requirements for the corresponding node classification are obtained from the classification-value-requirement mapping table.
2. The database dynamic deployment optimization method according to claim 1, characterized in that, Based on data tracking tools deployed on the application, real-time monitoring of the application's data flow and access patterns is conducted, including: Match the official operation documentation that matches the application type in the preset type - document library; The operation library is generated according to the official operation documentation, and the operation library is initialized according to the application's configuration file; Based on the preset type-function library, the required tracking functions that are consistent with the application type are determined, and a mapping relationship between the initialization operation library and the required tracking functions is established; Based on the mapping relationship, the code nodes integrated into the application are determined, and the corresponding trigger code is inserted; The trigger code determines the trigger points of the application during the application process, and the data generated during the application process is tracked based on the communication connection between the trigger points and the data tracking tool.
3. The database dynamic deployment optimization method according to claim 1, characterized in that, Real-time monitoring of application data flow and access patterns to determine data distribution strategies, including: Based on real-time monitoring of application data flow and access patterns using data tracking tools, several relevant metrics are identified. Based on the preset indicator-strategy library, determine the single indicator strategy for each indicator; Perform correlation analysis on the multiple indicators to obtain the correlation values between pairs of indicators, and combine the single indicator strategies for pairs of indicators whose correlation values are higher than a preset threshold. Choose the group that contains the most single-indicator strategies as the data distribution strategy.
4. The database dynamic deployment optimization method according to claim 1, characterized in that, Based on the data distribution strategy, the stored data in the specified database is divided into multiple fragments, and each fragment is assigned to a corresponding node based on the actual deployment results, including: The sharding rules corresponding to each node category are determined based on the data sharding strategy. Based on sharding rules, the stored data in the specified database is divided into multiple segments of fixed size, and each segment is mapped to the corresponding node based on a preset algorithm that matches the actual deployment results.
5. The database dynamic deployment optimization method according to claim 4, characterized in that, Develop adjustment strategies based on real-time performance metrics, and dynamically adjust and deploy the allocated segments, including: Real-time monitoring of deployed database nodes is performed using performance monitoring tools to obtain real-time performance metrics and their corresponding specific values. Based on the specific values of real-time performance indicators and the preset performance reference table, the performance of each node category is evaluated. If the performance evaluation score does not reach the preset score, an adjustment strategy will be formulated based on the node's performance evaluation results and the preset score-strategy comparison table. Based on the established adjustment strategy, the mapped segments are dynamically adjusted and deployed.
6. A database dynamic deployment optimization system, applied to the database dynamic deployment optimization method as described in any one of claims 1-5, characterized in that, include: Data tracking module: Based on data tracking tools deployed on the application, it monitors the application's data flow and access patterns in real time, thereby determining the data distribution strategy; Deployment determination module: Determines node roles based on data distribution strategy, and determines the application's real-time performance indicators and the number of nodes for each role category based on performance monitoring tools, and actually deploys the corresponding nodes based on node roles and node numbers. Data partitioning module: Based on the data distribution strategy, the stored data in the specified database is divided into multiple fragments, and each fragment is assigned to the corresponding node based on the actual deployment results; Strategy Adjustment Module: Formulates adjustment strategies based on real-time performance metrics and dynamically adjusts and deploys the allocated segments.
Citation Information
Patent Citations
Cloud system fault detection method combining self-adjustment strategy with virtualization technology
CN104794031A
Optimized cloud data node scheduling method and device, equipment and storage medium
CN117785425A