A database-oriented computing power measurement method, device, equipment, medium and product

CN123011668APending Publication Date: 2026-10-30CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611520407.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,这些定制化度量方案主要面向特定硬件平台或特定业务场景,并不能直接适用于数据库算力的度量需求

Benefits of technology

[0018]本发明实施例还提供了一种计算机程序产品,所述计算机程序产品包括计算机程序或计算机指令,所述计算机程序或所述计算机指令被处理器执行时实现如上述任意一项所述的面向数据库的算力度量方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011668A_ABST
    Figure CN123011668A_ABST
Patent Text Reader

Abstract

The application discloses a database-oriented computing power measurement method and device, equipment, medium and product, obtains a set of external measurement parameters of an external service dimension and a set of internal measurement parameters of an internal computing power consumption dimension of a target database in a process of processing a user request; according to the set of external measurement parameters and the set of internal measurement parameters, a first computing power measurement value and a second computing power measurement value are respectively calculated by using an entropy weight evaluation method; and according to the first computing power measurement value and the second computing power measurement value, a comprehensive computing power evaluation result of the target database is calculated. By using the application, accurate computing power perception and measurement can be realized according to the database business characteristics on the premise of ensuring the universality of measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a computational power method, apparatus, device, medium and product for databases. Background Technology

[0002] In computing network architecture, computing power is the technical foundation for evaluating node service capabilities and supporting business scheduling decisions. With the rapid development of cloud computing, big data, and artificial intelligence technologies, databases, as an important basic software service, can also serve as computing resources to provide data services. How to accurately and efficiently measure database computing power has become a key technical issue in the construction of computing networks.

[0003] In existing technologies, unified computing power systems for different business applications have been extensively studied. For example, relevant industry standards have proposed a three-layer, four-sided computing power architecture, which is based on heterogeneous resource metrics such as computing, communication, storage, and memory, supported by comprehensive node metrics, and uses business capability metrics as the interface to construct a relatively complete computing power system.

[0004] However, the aforementioned unified measurement system overemphasizes generality and comprehensiveness in its design, primarily measuring basic resources such as computing, storage, and communication used by all computer programs. While this general architecture facilitates the unified integration of different services within the computing network, it lacks customized measurement dimensions for database services—which act as both providers and consumers of computing resources. This results in insufficient accuracy of measurement information when applied to database services, failing to accurately reflect the actual computing power status of database nodes while providing data services. Consequently, it affects the optimization of computing power addressing and scheduling, leading to unnecessary resource waste and performance loss.

[0005] To address the aforementioned issues, some existing technologies have begun to research customized computing power solutions for specific business applications. For example, some patented solutions target user-side coprocessor platforms, analyzing basic operation metrics by monitoring the specific content of arithmetic operation calls to characterize the coprocessor computing power consumed by the user; other solutions use the throughput of intelligent computing services as an indicator, predicting resource usage and evaluating service throughput through computing power card data tables. However, these customized measurement solutions are mainly geared towards specific hardware platforms or specific business scenarios and cannot be directly applied to the measurement needs of database computing power. Summary of the Invention

[0006] The purpose of this invention is to provide a computing power measurement method, apparatus, device, medium, and product for databases, which can achieve accurate computing power perception and measurement based on the characteristics of database business while ensuring the universality of measurement.

[0007] To achieve the above objectives, embodiments of the present invention provide a database-oriented computational force method, comprising: Obtain the set of external metrics parameters for the external service dimension and the set of internal metrics parameters for the internal computing power consumption dimension of the target database during the process of processing user requests; Based on the set of external and internal measurement parameters, the first and second computational strength values ​​are calculated using the entropy weight evaluation method. The comprehensive computing power evaluation result of the target database is calculated based on the first computing power value and the second computing power value.

[0008] As an improvement to the above solution, the step of obtaining the set of external metric parameters for the external service dimension exhibited by the target database during the processing of user requests includes: The target database collects the external service dimension operation parameters of the target database during the process of processing user requests through multiple preset external measurement modules, and records them as external measurement parameters to generate an external measurement parameter set. The external measurement module includes a service performance measurement module, an operation status measurement module, and a hardware resource measurement module; the external measurement parameters correspond to service performance indicators, operation status indicators, and hardware resource indicators.

[0009] As an improvement to the above solution, the service performance indicators include one or more of the following: request response latency, number of requests processed per unit time, and disaster recovery capability indicators. The operational status indicators include one or more of the following: data transmission throughput, processor utilization, and memory utilization. The hardware resource indicators include one or more of the following: available communication resources, available computing resources, available memory resources, and available storage resources.

[0010] As an improvement to the above solution, the set of internal measurement parameters for the internal computing power consumption dimension exhibited by the target database during user request processing includes: The computing power consumption parameters of multiple functional modules within the target database during the processing of the user request are collected by multiple preset internal measurement modules and recorded as internal measurement parameters to generate an internal measurement parameter set. The functional modules include a request perception module, an operator computing power module, and a general computing power module; the internal measurement modules correspondingly include a request perception measurement module, an operator computing power measurement module, and a general computing power measurement module; the internal measurement parameters include the computing power consumption parameters of the request perception module, the operator computing power module, and the general computing power module.

[0011] As an improvement to the above solution, the request perception module is used to parse user requests to access the target database, identify the operation type of the user request, and determine the corresponding operator computing power module and general computing power module according to the first mapping relationship between the preset operation type and computing power resource requirements; then the internal measurement parameters collected by the request perception measurement module include the parsing computing power consumption and the identification computing power consumption of the request perception module. The operator computing power module includes a language processing module, a log processing module, and a storage processing module. The language processing module performs syntax parsing, statement rewriting, and query optimization on the user request, and predicts the required general computing power resource demand based on a preset second mapping relationship between operator computing power resources and general computing power resources to generate an execution plan. The log processing module records and synchronizes relevant database operations through logs. The storage processing module performs hierarchical storage and management of relevant database data. The internal measurement parameters collected by the operator computing power module include the syntax parsing consumption, statement rewriting consumption, query optimization consumption, and plan execution consumption of the language processing module, the log recording consumption and log synchronization consumption of the log processing module, and the data reading consumption, data writing consumption, and cache management consumption of the storage processing module. The general computing power module is used to allocate corresponding communication resources, computing resources, memory resources and storage resources according to the general computing power resource requirements in the execution plan, and to execute the user request; then the internal measurement parameters collected by the general computing power module include the communication resource consumption, computing resource consumption, memory resource consumption and storage resource consumption of the general computing power module.

[0012] As an improvement to the above scheme, the step of calculating the first computational strength value using entropy weight evaluation based on the set of external measurement parameters includes: Based on the current value of each external metric parameter and its corresponding external metric module, calculate the weight value of each external metric parameter within its corresponding external metric module. Based on the weight value of each external metric parameter within its respective external metric module, the entropy value of each external metric module is calculated; wherein the entropy value is used to characterize the degree of dispersion of each external metric parameter within the external metric module. The first computational power value of the external metric parameter set is calculated based on the entropy value of the external metric module and the weight value of the external metric parameter.

[0013] As an improvement to the above scheme, the step of calculating the second computational power value using entropy weight evaluation based on the internal metric parameter set includes: Calculate the weight value of each internal metric parameter within its respective internal metric module based on the current value of each internal metric parameter and its internal metric module. Based on the weight value of each internal metric parameter within its respective internal metric module, the entropy value of each internal metric module is calculated; wherein the entropy value is used to characterize the degree of dispersion of each internal metric parameter within the internal metric module. The second computational power value of the internal metric parameter set is calculated based on the entropy value of the internal metric module and the weight value of the internal metric parameter.

[0014] As an improvement to the above scheme, the step of calculating the comprehensive computing power evaluation result of the target database based on the first computing power value and the second computing power value includes: The first computing power value and the second computing power value are weighted and summed according to preset weighting coefficients to generate the comprehensive computing power evaluation result.

[0015] This invention also provides a database-oriented computational power device, comprising: The measurement parameter acquisition module is used to acquire the set of external measurement parameters for the external service dimension and the set of internal measurement parameters for the internal computing power consumption dimension of the target database during the process of processing user requests. The computational strength module is used to calculate the first computational strength value and the second computational strength value respectively based on the external measurement parameter set and the internal measurement parameter set using the entropy weight evaluation method. The comprehensive computing power evaluation module is used to calculate the comprehensive computing power evaluation result of the target database based on the first computing power value and the second computing power value.

[0016] This invention also provides a database-oriented computational power device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the database-oriented computational power method as described in any of the preceding embodiments.

[0017] This invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the database-oriented computational power method as described in any of the preceding embodiments.

[0018] This invention also provides a computer program product, which includes a computer program or computer instructions. When the computer program or computer instructions are executed by a processor, they implement the database-oriented computational power method as described in any of the above embodiments.

[0019] Compared with existing technologies, the computing power measurement method, apparatus, device, medium, and product for databases disclosed in this invention comprehensively captures the computing power characteristics of databases from two independent but interrelated dimensions: external service capabilities and internal computing power consumption. It covers both external dynamic service indicators and in-depth analysis of operator-level computing power consumption within the database kernel. Furthermore, it objectively determines the weights of parameters within each dimension using an entropy-weighted evaluation method, ultimately fusing them to obtain a comprehensive computing power evaluation result. This effectively avoids the inaccuracy of measurement information caused by the lack of business-customized dimensions in traditional unified measurement systems, and also avoids the inaccuracy of computing power scales caused by business-customized measurement systems, significantly improving the accuracy of computing power measurement for database services. This invention can more comprehensively and accurately reflect the true computing power level of database instances, providing a reliable data foundation for intelligent scheduling and decision-making of computing power networks, thereby effectively avoiding resource waste caused by inaccurate measurement information. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating a database-oriented computational force method provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the external measurement system in an embodiment of the present invention; Figure 3 This is a schematic diagram of the internal measurement system in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a database-oriented computational power device provided in an embodiment of the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0023] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0024] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0025] See Figure 1 This is a flowchart illustrating a database-oriented computational force method provided in an embodiment of the present invention. The embodiment of the present invention provides a database-oriented computational force method, including steps S11 to S13: S11. Obtain the set of external measurement parameters for the external service dimension and the set of internal measurement parameters for the internal computing power consumption dimension of the target database during the process of processing user requests. S12. Based on the external measurement parameter set and the internal measurement parameter set, the first computing power value and the second computing power value are calculated respectively using the entropy weight evaluation method. S13. Calculate the comprehensive computing power evaluation result of the target database based on the first computing power value and the second computing power value.

[0026] To address the problem that existing technologies using general-purpose measurement systems struggle to accurately measure computing power for specific business applications, while customized computing power measurement systems for specific business applications result in insufficient universality of computing power, affecting the correspondence between dedicated and general-purpose computing power and leading to inaccurate measurement processes, this invention takes data service business as its starting point and constructs a database computing power intelligent perception measurement technology to achieve refined measurement of the overall computing power outside the database core and the computing power of operators within the core.

[0027] In this embodiment of the invention, an external measurement parameter system and an internal measurement parameter system for the database are first constructed. The external measurement parameter system is used to characterize the operating parameters of the database in the external service dimension when processing user requests, and can reflect a general measurement system for the computing power of the database. The internal measurement parameter system is used to characterize the internal computing power resource consumption of the database when processing user requests, and can reflect the computing power operator relationship of the database's specific business, and refine the computing power process.

[0028] When computational power needs to be applied to the target database, external service dimension parameters exhibited by the database instance when processing user requests (such as SQL queries) are collected through interaction with the database's service interface, monitoring agent, and underlying virtualization platform. These parameters include average request response time (RTT), transactions per second (TPS), current CPU utilization, and available storage bandwidth, forming a set of external metric parameters.

[0029] Meanwhile, by attaching probes to the database kernel or analyzing database kernel logs, parameters of internal computing power consumption are collected, such as CPU time consumption during SQL parsing, memory usage during execution plan generation, and I / O wait time when the storage engine reads and writes data pages, forming a set of internal measurement parameters.

[0030] Next, the entropy-weighted evaluation method is used to process the two parameter sets mentioned above. First, the metric parameters within each metric parameter set are standardized. Then, the entropy value and weight of each metric parameter are calculated. Finally, a weighted sum is obtained to obtain a quantified first computing power value and a quantified second computing power value. The first computing power value is used to represent the comprehensive score of the external service dimension, and the second computing power value is used to represent the comprehensive score of the internal computing power consumption dimension.

[0031] Finally, based on the different levels of emphasis placed on internal and external performance in different business scenarios, corresponding weight values ​​are determined. For example, for online transaction businesses, the external service dimension can be given a higher weight. The two computing power weight values ​​mentioned above are then weighted and summed to obtain a comprehensive computing power evaluation score for the target database under the current load. This score can be directly used for subsequent computing power scheduling or service level assessment.

[0032] This invention employs the technical means of embodiments of the present invention to comprehensively capture the computing power characteristics of a database from two independent yet interrelated dimensions: external service capabilities and internal computing power consumption. It covers both external dynamic service indicators and in-depth analysis of operator-level computing power consumption within the database kernel. Furthermore, it objectively determines the weights of parameters within each dimension using an entropy-weighted evaluation method, ultimately fusing them to obtain a comprehensive computing power evaluation result. This effectively avoids the inaccuracy of measurement information caused by the lack of business-customized dimensions in traditional unified measurement systems, and also avoids the inaccuracy of computing power measurement scales caused by business-customized measurement systems, significantly improving the accuracy of computing power measurements for database services. This invention can more comprehensively and accurately reflect the true computing power level of database instances, providing a reliable data foundation for intelligent scheduling and decision-making in computing power networks, thereby effectively avoiding resource waste caused by inaccurate measurement information.

[0033] The comprehensive computing power evaluation results of database nodes generated by this invention can serve as an important basic reference for computing power network scheduling decisions. This helps the scheduling system accurately perceive the real-time service capabilities of each database node, enabling refined on-network scheduling of data services, thereby improving the overall utilization efficiency of computing power resources and reducing resource waste and performance loss caused by inaccurate measurement.

[0034] As a preferred embodiment, the present invention further implements the above embodiments and further optimizes the process of obtaining the set of external measurement parameters.

[0035] In step S11, obtaining the set of external metric parameters for the external service dimension exhibited by the target database during the processing of user requests includes: The target database collects the external service dimensions of the target database during the user request processing process through multiple preset external measurement modules, and records them as external measurement parameters to generate an external measurement parameter set.

[0036] The external measurement module includes a service performance measurement module, an operation status measurement module, and a hardware resource measurement module; the external measurement parameters correspond to service performance indicators, operation status indicators, and hardware resource indicators.

[0037] It should be noted that, in the face of the integrated needs of multiple heterogeneous engines in the era of computing power networks, the computing power outside the database core is the technical cornerstone for integrating database computing power through the network, and is an important method for effectively identifying and measuring computing power resources.

[0038] See Figure 2This is a schematic diagram of the external measurement system in an embodiment of the present invention. In this embodiment of the present invention, an external measurement system is constructed. Compared with the existing standard computing power measurement architecture, the measurement system of this embodiment of the present invention adds two layers of architecture: database service performance measurement and operation status measurement, forming a measurement system including three measurement levels: service performance indicators, operation status indicators, and hardware resource indicators.

[0039] Preferably, the service performance indicators include one or more of the following: request response latency, number of requests processed per unit time, and disaster recovery capability indicators.

[0040] The request-response latency refers to the round-trip time (RTT), calculated by the time difference between sending an SQL request and receiving a complete response. The number of requests processed per unit time is represented by Queries Per Second (QPS) or Transactions Per Second (TPS). Disaster recovery capability metrics are represented by Recovery Time Objective (RTO) or Recovery Point Objective (RPO). These data can be obtained through the database's high availability management component interface. Using these service performance metrics as top-level metrics not only effectively meets the specific database computing power requirements of the business but also shields the business from the underlying resource configuration, reducing the complexity of database computing power usage.

[0041] Preferably, the operating status indicators include one or more of data transmission throughput, processor utilization, and memory utilization.

[0042] The data transmission throughput is the number of bytes of data sent and received per second by the database network card; the processor utilization rate is the percentage of CPU time occupied by the database process; and the memory utilization rate is the ratio of the physical memory occupied by the database process to the total memory allocated to the instance.

[0043] Besides relying on the underlying general computing power, the measurement of certain dynamic computing power metrics also plays a crucial role in database computing power performance metrics, directly impacting relevant performance parameters. Therefore, this solution uses metrics such as throughput, CPU idle rate, and memory idle rate as the basis for measuring operational status at the second-level of the measurement system. These second-level parameters not only effectively support performance measurement but also enable timely assessment of database computing power in the face of dynamically changing demands such as business activity levels and data volumes.

[0044] Preferably, the hardware resource indicators include one or more of the following: available communication resources, available computing resources, available memory resources, and available storage resources.

[0045] The available communication resources refer to the remaining available network bandwidth; the available computing resources refer to the remaining available number of vCPU cores or computing quota; the available memory resources refer to the remaining available memory size; and the available storage resources refer to the remaining available storage space and the current IOPS (Input / Output Operations Per Second) quota. The lower and uppermost layers of this metric architecture still focus on four basic general computing power indicators: communication, computing, memory, and storage, aiming to evaluate the basic service capabilities of nodes.

[0046] All the above metrics data are timestamped to ensure the timeliness of the measurements.

[0047] Specifically, the process of obtaining the set of external metrics is completed collaboratively by three pre-defined external metrics modules. The service performance metrics module intercepts and analyzes network packets for each request and response by embedding a lightweight proxy on the database server, and provides real-time statistics on service performance metrics such as request-response latency (RTT) and queries per second (QPS). The runtime status metrics module periodically collects dynamic runtime metrics of the database process, such as data transfer throughput, CPU utilization, and memory utilization, by calling the database's own management view or the process monitoring interface provided by the operating system. The hardware resource metrics module obtains the available amount of communication, computing, memory, and storage resources allocated to the database instance through API interaction with the underlying container orchestration platform or virtualization management platform.

[0048] These three modules work in parallel, and the external metrics they collect are aggregated into a data normalization processing unit to form a structured set of external metrics for subsequent entropy weight evaluation. The collection cycle of each module can be dynamically adjusted according to actual needs; for example, the collection interval can be shortened during peak business periods to obtain more refined metric data.

[0049] By employing the technical means of this invention, the external measurement parameter collection process is refined into three dedicated modules: service performance, operational status, and hardware resources. This not only improves the efficiency and accuracy of data collection but also enhances the maintainability and scalability of the entire measurement system, enabling flexible adaptation to the monitoring needs of different database deployment environments. Furthermore, this solution clearly defines a three-tiered key indicator system for external services, encompassing the end-user experience of database services, the status of the underlying resources supporting these services, and considering business continuity requirements. This comprehensive and specific indicator system provides a quantitative basis for accurately measuring the database's ability to provide services as a computing resource, making the computing power measurement results more relevant to practical business guidance.

[0050] As a preferred embodiment, the present invention further optimizes the process of obtaining the internal measurement parameter set based on the above embodiments.

[0051] In step S11, obtaining the set of internal measurement parameters for the internal computing power consumption dimension of the target database during user request processing includes: The computing power consumption parameters of multiple functional modules within the target database during the processing of the user request are collected by multiple preset internal measurement modules and recorded as internal measurement parameters to generate an internal measurement parameter set.

[0052] The functional modules include a request perception module, an operator computing power module, and a general computing power module; the internal measurement modules correspondingly include a request perception measurement module, an operator computing power measurement module, and a general computing power measurement module; the internal measurement parameters include the computing power consumption parameters of the request perception module, the operator computing power module, and the general computing power module.

[0053] Preferably, the request perception module is used to parse user requests to access the target database, identify the operation type of the user request, and determine the corresponding operator computing power module and general computing power module according to the first mapping relationship between the preset operation type and computing power resource requirements; the operation type includes at least one of query, delete, insert, replace, update, set, view and clear. The internal measurement parameters collected by the request perception measurement module include the parsing computing power consumption and the identification computing power consumption of the request perception module.

[0054] Preferably, the operator computing power module includes a language processing module, a log processing module, and a storage processing module; the language processing module is used to perform syntax parsing, statement rewriting, and query optimization on the user request, and predict the required general computing power resource demand according to the preset second mapping relationship between operator computing power resources and general computing power resources, so as to generate an execution plan; the log processing module is used to record and synchronize relevant database operations through logs; the storage processing module is used to perform hierarchical storage and management of relevant database data; then the internal measurement parameters collected by the operator computing power module include the syntax parsing consumption, statement rewriting consumption, query optimization consumption, and plan execution consumption of the language processing module, the log recording consumption and log synchronization consumption of the log processing module, and the data reading consumption, data writing consumption, and cache management consumption of the storage processing module.

[0055] Preferably, the general computing power module is used to allocate corresponding communication resources, computing resources, memory resources and storage resources according to the general computing power resource requirements in the execution plan, and to execute the user request; then the internal measurement parameters collected by the general computing power module include the communication resource consumption, computing resource consumption, memory resource consumption and storage resource consumption of the general computing power module.

[0056] It's important to note that unlike existing measurement technologies that treat all factors except general-purpose computing power as part of the business layer, databases require not only general-purpose computing capabilities like CPUs but also dedicated database computing power for parsing and optimization. Furthermore, this dedicated database computing power relies on general-purpose computing power, and its processing results impact the use of general-purpose computing power. For example, read and write operations consume different amounts of computing and storage resources, and read requests will also differ. Therefore, constructing a refined, kernel-aware computing power system is crucial.

[0057] Taking a user request as an example, see [link to relevant documentation]. Figure 3 This diagram illustrates the internal measurement system in this embodiment of the invention. This embodiment designs a two-layer mapping mechanism between user requests and computing power, and between operator computing power and general computing power. In this architecture, the SQL awareness layer (i.e., the request awareness module) is responsible for sensing SQL requests made by the business when operating the database. Based on the separation of read and write requests, the requests are further refined and categorized according to their basic computing power usage. This includes seven types of requests with significant differences in computing power resource usage: select, delete, insert / replace, update, set, show, and truncate. Based on this, a preliminary resource mapping relationship between SQL requests and computing power resource requirements is established.

[0058] The operator computing power module is a database-specific computing power module responsible for processing SQL requests and returning results. This process mainly involves SQL module computing power, log module computing power, and storage module computing power, corresponding to the language processing module, log processing module, and storage processing module, respectively. The SQL module computing power mainly includes four sub-parts: parsing, rewriting, optimization, and execution, responsible for calculating SQL requests and ultimately generating and distributing execution plans. The log module computing power records relevant database operations through logs and transmits information between nodes in the cloud-native database architecture. The storage module computing power implements hierarchical storage and management of basic business data.

[0059] The generated execution plan includes basic information such as operation sequence, access path, and connection strategy, providing predictions and usage of general computing resources such as computing and memory, and realizing the mapping of computing power between operator computing resources and general computing resources.

[0060] In this architecture, the SQL-aware module receives user SQL requests and initially parses the SQL's classification information, achieving a comprehensive mapping between SQL requests and computing resources. The operator computing power module provides basic database services, measures the computing power consumption of its SQL engine, storage engine, etc., and generates execution plans. The general computing power module, based on the execution plans, translates them into underlying computing and storage operations, directly measuring hardware resources, including CPU, memory, storage, and network resources.

[0061] In this embodiment of the invention, the step of obtaining the internal measurement parameter set is implemented through three preset internal measurement modules, which correspond to the three major functional modules of the database kernel. When a user request (such as a complex SQL statement) arrives at the database, the request-aware measurement module first records the CPU time and memory consumed by the request-aware module when parsing the SQL syntax tree, identifying the operation type, and performing preliminary resource mapping. Subsequently, the operator computational power module starts working, which monitors the time and memory allocation of the language processing module when performing syntax parsing, statement rewriting, generating multiple candidate execution plans and performing cost optimization, the I / O consumption of the log processing module when writing transaction logs and synchronizing logs to slave nodes, and the I / O and CPU consumption of the storage processing module when performing data page reading, filtering, sorting, and writing. Finally, the general computational power module records the actual communication, computation, memory, and storage resource consumption of the underlying computing and storage resources when performing specific operations after the execution plan is issued. Each internal measurement module summarizes the collected computing power consumption parameters to generate an internal measurement parameter set.

[0062] By employing the technical means of this invention, this solution designs a two-layer mapping mechanism between request awareness and database functions, and between database functions and general computing power, for database kernel functional modules. It abstracts the database-specific computing power consumption, such as structured query language processing, log recording, and data storage, into measurable operator computing power units, and maps operator computing power requirements to general hardware resource consumption such as processors, memory, storage, and networks through execution plans. This mapping mechanism retains the business semantics of database-specific computing power while quantifying it into a unified basic resource measurement standard, thus solving the technical deficiency of the ambiguous correspondence between dedicated computing power and general computing power in existing customized measurement schemes.

[0063] This invention achieves end-to-end computing power awareness from the user request entry point to the underlying hardware resource consumption by binding the internal measurement process with three core layers of the database kernel: request awareness, operator execution, and general resource consumption. It can clearly distinguish between the consumption of database-specific computing power and general computing power, solving the problem that existing technologies cannot accurately separate the consumption of business-specific computing power, and providing data support for in-depth optimization of database computing power and problem localization.

[0064] As a preferred embodiment, the present invention further optimizes the calculation process of internal and external computational force values ​​based on the above embodiments.

[0065] In this embodiment of the invention, both the external and internal measurement systems have several measurement modules and corresponding measurement parameters within each module. The same evaluation standard is used to calculate the computational strength value to enhance the universality of the evaluation.

[0066] Preferably, the step of calculating the first computational strength value using entropy weighting based on the set of external metric parameters includes: Based on the current value of each external metric parameter and its corresponding external metric module, calculate the weight value of each external metric parameter within its corresponding external metric module. Based on the weight value of each external metric parameter within its respective external metric module, the entropy value of each external metric module is calculated; wherein the entropy value is used to characterize the degree of dispersion of each external metric parameter within the external metric module. The first computational power value of the external metric parameter set is calculated based on the entropy value of the external metric module and the weight value of the external metric parameter.

[0067] Preferably, the step of calculating the second computational power value using entropy weight evaluation based on the internal metric parameter set includes: Calculate the weight value of each internal metric parameter within its respective internal metric module based on the current value of each internal metric parameter and its internal metric module. Based on the weight value of each internal metric parameter within its respective internal metric module, the entropy value of each internal metric module is calculated; wherein the entropy value is used to characterize the degree of dispersion of each internal metric parameter within the internal metric module. The second computational power value of the internal metric parameter set is calculated based on the entropy value of the internal metric module and the weight value of the internal metric parameter.

[0068] Specifically, whether it is an external or internal measurement system, the weight value of a measurement parameter is determined based on the proportion of the current value of that parameter to the sum of the current values ​​of all parameters in the measurement module to which it belongs.

[0069] Suppose the value of the nth metric parameter under the mth metric module is expressed as: The weight of this parameter is then calculated as follows:

[0070] This invention uses entropy weighting to measure the scores of specific parameters, thus avoiding the physical meaning of the parameters themselves and mapping them to a comparable data space. The entropy value of a specific measurement module is calculated as follows:

[0071] Where M is the total number of modules in the metric system. These are constant coefficients.

[0072] Therefore, the corresponding calculated force value can be expressed as:

[0073] in, This means that the calculation method can be applied to both external and internal measurement systems.

[0074] For example, in a specific computational instance, the specific process of calculating the first computational force value based on the set of external metric parameters for an external metric system is as follows: First, assuming that after one data collection cycle, standardized values ​​for three parameters (RTT, QPS, RTO) belonging to the service performance measurement module are obtained, calculate the weight value of the first parameter, RTT, within its respective service performance measurement module. Calculate the weight values ​​of QPS and RTO within their respective service performance measurement modules using the same method.

[0075] Next, the entropy value of the service performance measurement module is calculated using the information entropy formula. This entropy value reflects the degree of dispersion of the three parameters within the module; the smaller the entropy value, the greater the amount of information provided by that parameter. The same operation is performed on the running status measurement module and the hardware resource measurement module to obtain their respective entropy values.

[0076] Finally, the entropy values ​​of each external metric module and their corresponding weight values ​​for each external metric parameter are summarized to calculate the first computational power value. The principle is as follows: for each parameter, its weight is multiplied by (1 - the entropy value of its module), and then the products of all parameters are summed. The final summation value is the first computational power value characterizing the overall performance of the external service dimension of the database. The larger this value, the higher the level of external service computing power.

[0077] Understandably, the process of calculating the second power value based on the set of internal measurement parameters is completely consistent with the calculation logic of the first power value, but its target is the set of internal measurement parameters.

[0078] For example, there are multiple parameters belonging to the operator computational power module, such as query optimization consumption (CPU time) and data read consumption (I / O time). During calculation, firstly, within the same collection period, the value of query optimization consumption is compared with the sum of the values ​​of all parameters within the module to obtain its weight value. Then, based on the weight values ​​of all parameters in the module, the entropy value of the operator computational power module is calculated. The same process is performed on the request-aware measurement module and the general computational power module. Finally, each internal measurement parameter is multiplied by the weight coefficient (1 - entropy value) of its respective module, and the results are accumulated; the final result is the second computational power value. This value is used to quantify the overall computational power consumption efficiency and health status of the various functional modules within the database when processing requests.

[0079] By employing the technical means of this invention, a comprehensive evaluation method based on an entropy weight model is adopted. By performing weight calculation and entropy analysis on each measurement module and measurement parameter, the influence weight of each parameter on the overall system is automatically determined according to the dispersion of the indicator data. This effectively avoids evaluation bias caused by differences in the dimensions and physical meanings of different physical indicators, making the final comprehensive computing power evaluation result more objective and comparable, and able to adaptively adjust the evaluation focus according to changes in the business operation status.

[0080] As a preferred embodiment, this invention further implements the above embodiments, with step S13, namely, calculating the comprehensive computing power evaluation result of the target database based on the first computing power value and the second computing power value, including: The first computing power value and the second computing power value are weighted and summed according to preset weighting coefficients to generate the comprehensive computing power evaluation result.

[0081] After calculating the first computational force value respectively (Characterizing external service capabilities) and the second computational strength value After representing the internal computing power efficiency, a fusion calculation is performed based on the preset weighting coefficient α, and the formula is as follows:

[0082] in, The first calculated force value, This is the second calculated force value. The weighting coefficients reflect the urgency of the business's requirements for both external overall computing power and internal operator computing power.

[0083] In a specific application scenario, assuming that the target database mainly supports financial transaction business that is extremely sensitive to response latency and does not allow service jitter, the system administrator or upper-level scheduler can set the weighting coefficient α to a high value, such as α=0.8. This means that the comprehensive computing power evaluation result S will depend heavily on the performance of external services (i.e., user experience), while the weight of internal consumption efficiency only accounts for 0.2.

[0084] Conversely, if the database instance is primarily used for background batch processing tasks with low real-time requirements but maximizing resource utilization efficiency, α can be set to a lower value, such as α=0.3, so that the overall evaluation focuses more on the rationality of internal computing power consumption. The final calculated S value is the overall computing power evaluation result of the target database, which can be used for horizontal comparison with other database nodes or as input for scheduling decisions.

[0085] By employing the technical means of this invention and introducing configurable weighting coefficients, the flexibility and customizability of the comprehensive computing power evaluation results are achieved. This allows for adaptive adjustment of the relative importance of external and internal metrics based on the core requirements of different business scenarios. This mechanism significantly enhances the practicality and adaptability of computing power in real-world production environments, thereby improving the overall utilization efficiency of heterogeneous resources and the quality of business services within the computing power network.

[0086] See Figure 4 This is a schematic diagram of a database-oriented computational power device provided in an embodiment of the present invention. The embodiment of the present invention provides a database-oriented computational power device 10, comprising: The measurement parameter acquisition module 11 is used to acquire the set of external measurement parameters of the external service dimension and the set of internal measurement parameters of the internal computing power consumption dimension of the target database in the process of processing user requests. The computational strength module 12 is used to calculate the first computational strength value and the second computational strength value respectively based on the external measurement parameter set and the internal measurement parameter set using the entropy weight evaluation method. The comprehensive computing power evaluation module 13 is used to calculate the comprehensive computing power evaluation result of the target database based on the first computing power value and the second computing power value.

[0087] It should be noted that the database-oriented computational force device provided in this embodiment of the invention is used to execute all the process steps of the database-oriented computational force method in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0088] This invention also provides a database-oriented computational power device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the database-oriented computational power method as described in any of the above embodiments.

[0089] This invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform a database-oriented computational power method as described in any of the foregoing embodiments.

[0090] This invention also provides a computer program product, which includes a computer program or computer instructions. When the computer program or computer instructions are executed by a processor, they implement the database-oriented computational power method as described in any of the above embodiments.

[0091] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0092] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A database-oriented computational force method, characterized in that, include: Obtain the set of external metrics parameters for the external service dimension and the set of internal metrics parameters for the internal computing power consumption dimension of the target database during the process of processing user requests; Based on the set of external and internal measurement parameters, the first and second computational strength values ​​are calculated using the entropy weight evaluation method. The comprehensive computing power evaluation result of the target database is calculated based on the first computing power value and the second computing power value.

2. The database-oriented computational force method as described in claim 1, characterized in that, The set of external metric parameters for the external service dimension exhibited by the target database during the processing of user requests includes: The target database collects the external service dimension operation parameters of the target database during the process of processing user requests through multiple preset external measurement modules, and records them as external measurement parameters to generate an external measurement parameter set. The external measurement module includes a service performance measurement module, an operation status measurement module, and a hardware resource measurement module; the external measurement parameters correspond to service performance indicators, operation status indicators, and hardware resource indicators.

3. The database-oriented computational force method as described in claim 2, characterized in that, The service performance metrics include one or more of the following: request response latency, number of requests processed per unit time, and disaster recovery capability metrics. The operational status indicators include one or more of the following: data transmission throughput, processor utilization, and memory utilization. The hardware resource indicators include one or more of the following: available communication resources, available computing resources, available memory resources, and available storage resources.

4. The database-oriented computational force method as described in claim 1, characterized in that, The set of internal measurement parameters for the internal computing power consumption dimension of the target database during user request processing includes: The computing power consumption parameters of multiple functional modules within the target database during the processing of the user request are collected by multiple preset internal measurement modules and recorded as internal measurement parameters to generate an internal measurement parameter set. The functional modules include a request perception module, an operator computing power module, and a general computing power module; the internal measurement modules correspondingly include a request perception measurement module, an operator computing power measurement module, and a general computing power measurement module; the internal measurement parameters include the computing power consumption parameters of the request perception module, the operator computing power module, and the general computing power module.

5. The database-oriented computational force method as described in claim 4, characterized in that, The request perception module is used to parse user requests to access the target database, identify the operation type of the user request, and determine the corresponding operator computing power module and general computing power module according to the first mapping relationship between the preset operation type and computing power resource requirements; then the internal measurement parameters collected by the request perception measurement module include the parsing computing power consumption and the identification computing power consumption of the request perception module. The operator computing power module includes a language processing module, a log processing module, and a storage processing module. The language processing module performs syntax parsing, statement rewriting, and query optimization on the user request, and predicts the required general computing power resource demand based on a preset second mapping relationship between operator computing power resources and general computing power resources to generate an execution plan. The log processing module records and synchronizes relevant database operations through logs. The storage processing module performs hierarchical storage and management of relevant database data. The internal measurement parameters collected by the operator computing power module include the syntax parsing consumption, statement rewriting consumption, query optimization consumption, and plan execution consumption of the language processing module, the log recording consumption and log synchronization consumption of the log processing module, and the data reading consumption, data writing consumption, and cache management consumption of the storage processing module. The general computing power module is used to allocate corresponding communication resources, computing resources, memory resources and storage resources according to the general computing power resource requirements in the execution plan, and to execute the user request; then the internal measurement parameters collected by the general computing power module include the communication resource consumption, computing resource consumption, memory resource consumption and storage resource consumption of the general computing power module.

6. The database-oriented computational force method as described in claim 2 or 3, characterized in that, The step of calculating the first computational strength value using entropy weight evaluation based on the set of external metric parameters includes: Based on the current value of each external metric parameter and its corresponding external metric module, calculate the weight value of each external metric parameter within its corresponding external metric module. Based on the weight value of each external metric parameter within its respective external metric module, the entropy value of each external metric module is calculated; wherein the entropy value is used to characterize the degree of dispersion of each external metric parameter within the external metric module. The first computational power value of the external metric parameter set is calculated based on the entropy value of the external metric module and the weight value of the external metric parameter.

7. The database-oriented computational force method as described in claim 4 or 5, characterized in that, The step of calculating the second computational strength value using entropy weight evaluation based on the internal metric parameter set includes: Calculate the weight value of each internal metric parameter within its respective internal metric module based on the current value of each internal metric parameter and its internal metric module. Based on the weight value of each internal metric parameter within its respective internal metric module, the entropy value of each internal metric module is calculated; wherein the entropy value is used to characterize the degree of dispersion of each internal metric parameter within the internal metric module. The second computational power value of the internal metric parameter set is calculated based on the entropy value of the internal metric module and the weight value of the internal metric parameter.

8. The database-oriented computational force method as described in claim 1, characterized in that, The step of calculating the comprehensive computing power evaluation result of the target database based on the first computing power value and the second computing power value includes: The first computing power value and the second computing power value are weighted and summed according to preset weighting coefficients to generate the comprehensive computing power evaluation result.

9. A computational power device for databases, characterized in that, include: The measurement parameter acquisition module is used to acquire the set of external measurement parameters for the external service dimension and the set of internal measurement parameters for the internal computing power consumption dimension of the target database during the process of processing user requests. The computational strength module is used to calculate the first computational strength value and the second computational strength value respectively based on the external measurement parameter set and the internal measurement parameter set using the entropy weight evaluation method. The comprehensive computing power evaluation module is used to calculate the comprehensive computing power evaluation result of the target database based on the first computing power value and the second computing power value.

10. A computational power device for databases, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the database-oriented computational power method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the database-oriented computational power method as described in any one of claims 1 to 8.

12. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions, which, when executed by a processor, implement the database-oriented computational power method as described in any one of claims 1 to 8.