Method and apparatus for analyzing storage resources, and electronic device and storage medium

Through static and dynamic rule analysis of services, real-time detection of request data, regular health assessment and report generation, it solves the problem of inability to dynamically analyze and optimize storage resources in existing technologies, and improves the availability and performance of services.

WO2024179140A1PCT designated stage expired Publication Date: 2024-09-06CHINA TELECOM CLOUD TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/139989
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-01
Filing Date
2023-12-19
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The existing technology cannot perform dynamic analysis and adaptation of service storage resources during the operation of the service line, resulting in availability and performance problems caused by improper use of resources or lack of reasonable optimization.

Method used

Provides a storage resource analysis method and device that detects request data in real time by initializing static and dynamic rules of the service, regularly analyzes health, and generates reports to assist in discovering and solving storage resource usage problems.

Benefits of technology

It realizes dynamic tuning of storage resources during service operation, improves service availability and performance, and helps solve hidden dangers caused by improper use of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023139989_06092024_PF_FP
    Figure CN2023139989_06092024_PF_FP
Patent Text Reader

Abstract

The embodiments of the present application relate to the field of data analysis. Provided are a method and apparatus for analyzing storage resources, and an electronic device and a storage medium. The method comprises: when a service is started, initializing various pieces of information of storage resources corresponding to the service, and loading a static rule and a dynamic rule, which correspond to the service; performing static analysis according to the various pieces of information of the storage resources and the static rule, so as to obtain static analysis data; detecting a request for the service in real time, determining request data of the request, and performing dynamic analysis according to the request data and the dynamic rule, so as to obtain dynamic analysis data; regularly determining a degree of health of the service according to the static rule, the static analysis data, the dynamic rule, the dynamic analysis data and the request data; and generating a statement according to the static analysis data, the dynamic analysis data and the degree of health, and pushing the statement. By means of the method of the present embodiments, dynamic tuning of service storage resources can be performed in view of dynamic and static analysis results during service operation.
Need to check novelty before this filing date? Find Prior Art

Description

Storage resource analysis method, device, electronic device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on March 1, 2023, with application number 202310184318.9 and application name “Analysis method, device, electronic device and storage medium for storage resources”, all contents of which are incorporated by reference into this application. Technical Field

[0003] The embodiments of the present application relate to the field of data analysis, and in particular to a method, device, electronic device, and storage medium for analyzing storage resources. Background Art

[0004] Currently, most services primarily focus on performance and scalability in their storage layer, often using open-source storage solutions such as MySQL (a relational database management system) and Redis (a distributed cache and storage system). These services are typically characterized by diverse business scenarios, high concurrent traffic, and high availability requirements. However, during actual online service operations, the service's storage resources often fail to meet the expected capacity and performance targets. Instead, due to tight scheduling and system rush, slow SQL (Structured Query Language) queries, performance degradation caused by excessive data growth, flaws in the database design, and other issues, such as improper use or improper optimization, can lead to availability and performance issues under heavy service storage resource loads.

[0005] In other words, existing technologies are not able to dynamically analyze and adapt service storage resources during service online operation, resulting in availability issues with the actual storage resources of the service due to improper resource use or failure to make reasonable optimizations.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a storage resource analysis method, device, electronic device, and storage medium, which are intended to perform a combined dynamic and static analysis of storage resources. During service operation, the dynamic and static analysis results can be combined to dynamically optimize service storage resources to assist in discovering and resolving availability issues and performance risks caused by storage resource usage issues in online services.

[0008] A first aspect of an embodiment of the present application provides a method for analyzing storage resources, the method comprising:

[0009] When the service is started, initialize the information of the storage resources corresponding to the service and load the static rules and dynamic rules corresponding to the service;

[0010] Perform static analysis based on various information of storage resources and static rules to obtain static analysis data;

[0011] Detect service requests in real time, determine the request data, perform dynamic analysis based on the request data and dynamic rules, and obtain dynamic analysis data;

[0012] Regularly determine the health of the service based on static rules and static analysis data, dynamic rules and dynamic analysis data, and request data; the health of the service represents the degree of system standardization of the service and the capacity and status of the storage resources corresponding to the service;

[0013] Generate and push reports based on static analysis data, dynamic analysis data, and health status.

[0014] A second aspect of an embodiment of the present application provides a storage resource analysis device, the device comprising:

[0015] The rule engine module is used to initialize the information of the storage resources corresponding to the service and load the static rules and dynamic rules corresponding to the service when the service is started;

[0016] Static analysis module, used to perform static analysis based on various information of storage resources and static rules to obtain static analysis data;

[0017] The dynamic analysis module is used to detect service requests in real time, determine the request data of the request, and perform dynamic analysis based on the request data and dynamic rules to obtain dynamic analysis data;

[0018] A health determination module is used to regularly determine the health of a service based on static rules and static analysis data, dynamic rules and dynamic analysis data, and request data. The health of a service represents the degree of system standardization of the service and the capacity and status of the storage resources corresponding to the service.

[0019] The report push module is used to generate and push reports based on static analysis data, dynamic analysis data and health status.

[0020] A third aspect of an embodiment of the present application provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the computer program is executed by the processor, it implements the storage resource analysis method of the first aspect of the embodiment of the present application.

[0021] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the storage resource analysis method of the first aspect of the embodiment of the present application is implemented.

[0022] Through the storage resource analysis method provided by the embodiment of the present application, when the service is started, the various information of the storage resources corresponding to the service are initialized, and the static rules and dynamic rules corresponding to the service are loaded; static analysis is performed based on the various information of the storage resources and the static rules to obtain static analysis data; the service request is detected in real time to determine the request data of the request, and dynamic analysis is performed based on the request data and dynamic rules to obtain dynamic analysis data; the health of the service is determined regularly based on the static rules and static analysis data, the dynamic rules and dynamic analysis data, and the request data; a report is generated and pushed based on the static analysis data, the dynamic analysis data, and the health. Through the method of this embodiment, after the service is started, static analysis can be initialized on the storage resources of the service, real-time dynamic analysis can be performed on the service requests, and the health of the service storage resource capacity status can be determined regularly based on the dynamic and static analysis results, and a report is generated and pushed based on the dynamic and static analysis results and the health, so as to assist in discovering and solving the availability problems and performance risks caused by storage resource usage problems of online services during the operation of the service, and complete the dynamic optimization of online service storage resources. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] FIG1 is a flow chart of a storage resource analysis method according to an embodiment of the present application;

[0025] FIG2 is an example diagram of a request syntax tree provided in an embodiment of the present application;

[0026] FIG3 is a flow chart of a storage resource analysis method according to an embodiment of the present application;

[0027] FIG4 is a schematic diagram of the structure of a storage resource analysis system according to an embodiment of the present application;

[0028] FIG5 is a structural block diagram of a storage resource analysis device provided in an embodiment of the present application;

[0029] FIG6 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0031] Hereinafter, specific examples of this solution will be described in more detail with reference to the accompanying drawings.

[0032] Referring to Figure 1, Figure 1 is a flow chart of a storage resource analysis method according to an embodiment of the present application. As shown in Figure 1, the storage resource analysis method of this embodiment may include the following steps:

[0033] Step S11: When the service is started, various information of the storage resources corresponding to the service is initialized, and static rules and dynamic rules corresponding to the service are loaded.

[0034] In this embodiment, when the service is started, the storage resources corresponding to the service can be initialized, and various information about the storage resources corresponding to the service can be loaded. Specifically, the various information about the storage resources corresponding to the service can at least include: system-level dimensional information about the storage resources corresponding to the service, static rules and dynamic rules corresponding to the service, storage resource usage environment and alarm level corresponding to the service, online historical SQL logs, online redis stat (Redis graphical monitoring), etc. Among them, the system-level dimensional information about the storage resources corresponding to the service can be, for example: for the database: database table structure, index information, constraint information, storage capacity information, etc., for the cache: cache LRU information, cache stat (statistical monitoring) information, etc. The storage resource usage environment corresponding to the service can be, for example: development environment, test environment, production environment, etc. In addition, this embodiment can also periodically load various information about the storage resources corresponding to the above-mentioned services, such as periodically loading system-level dimensional information and SQL log information.

[0035] Step S12: Perform static analysis based on various information of storage resources and static rules to obtain static analysis data.

[0036] In this embodiment, after loading and obtaining the various information of the storage resources corresponding to the service, the various information of the storage resources corresponding to the service can be statically analyzed according to the obtained static rules corresponding to the service to obtain static analysis data and static analysis results. The static rules refer to the relevant rules formulated for analyzing and maintaining alarms for various basic information of the service storage resources.

[0037] Specifically, the database of the storage resource can be analyzed according to static rules, such as analyzing the rationality of the database table design and index rationality; analyzing the standardization of database query statements and index analysis; SQL anti-pattern analysis, etc.; and the cache Redis of the storage resource can be analyzed according to static rules, such as analyzing the LRU (Least Recently Used) strategy, eviction status, command call frequency and size distribution; thereby obtaining various static analysis data.

[0038] In one embodiment, the configured static rules may be as shown in Table 1 below:

[0039] Table 1

[0040] Step S13: Detect the service request in real time, determine the request data of the request, perform dynamic analysis based on the request data and dynamic rules, and obtain dynamic analysis data.

[0041] When a user accesses a service, each access request reaches the business service, and then, through the business service, reaches the storage resource corresponding to the service. This embodiment can perform real-time detection on each service request, determine the request data corresponding to each request, and then dynamically analyze the detected request data based on dynamic rules loaded at service startup to obtain corresponding dynamic analysis data. Dynamic rules refer to the rules developed to analyze and maintain alerts based on the request data related to service requests.

[0042] Step S14: Regularly determine the health of the service based on static rules and static analysis data, dynamic rules and dynamic analysis data, and request data.

[0043] In this embodiment, static analysis data, dynamic analysis data, and service request data obtained over a period of time can be collected periodically (i.e., periodically). Based on the static analysis data and static rules, the dynamic analysis data and dynamic rules, and the request data, the health of the service can be determined to intuitively quantify the current status of the service. The health represents the degree of system standardization of the service and the capacity and status of the storage resources corresponding to the service.

[0044] Step S15: Generate and push a report based on the static analysis data, dynamic analysis data, and health status.

[0045] In this embodiment, after obtaining static analysis data, an analysis report can be generated and distributed based on the static analysis data (including the static analysis results), and immediate alerts can be issued for serious issues. Furthermore, after obtaining dynamic analysis data, an analysis report can be generated and distributed based on the dynamic analysis data (including the dynamic analysis results), and immediate alerts can be issued for serious issues. Furthermore, after obtaining the health of the service, a report can be generated and distributed, allowing relevant personnel to address the service concerns.

[0046] Among them, in some implementations, the same report can be generated and pushed based on static analysis data, dynamic analysis data and health, or different reports can be generated and pushed based on static analysis data, dynamic analysis data and health respectively. This embodiment does not impose any restrictions on this.

[0047] In this embodiment, the static and dynamic rules of the service are loaded after the service is started. Static analysis can be performed on the storage resources of the service, real-time dynamic analysis can be performed on the service requests, and the health of the service storage resource capacity status can be regularly determined based on the dynamic and static analysis results. Reports are generated and pushed based on the dynamic and static analysis results and health. This can be used to assist in discovering and resolving availability issues and performance risks caused by storage resource usage problems of online services during service operation, and to complete dynamic optimization of online service storage resources.

[0048] In conjunction with the above embodiments, in one embodiment, the present application also provides a method for analyzing storage resources. In this method, the request data includes at least: the request type and the execution time of each request; the above step S14 may specifically include steps S21 to S25:

[0049] Step S21: Obtain a static standard score for each request based on static rules and static analysis data.

[0050] In this embodiment, for each request of a service, a static standard score of each request may be determined according to the static rules corresponding to the service and the static analysis data corresponding to the service.

[0051] In some embodiments, the above step S21 may specifically include steps S21-1 to S21-2:

[0052] Step S21 - 1 : scoring multiple static rules according to the static rules and static analysis data to obtain multiple static rule score vectors.

[0053] In this embodiment, multiple static rules can be scored based on the service's static rules and static analysis data to obtain static rule score vectors. Specifically, the scoring in this embodiment can be performed manually or automatically based on the rules and data, without limitation. For example, if m static rules are determined, these m static rules are scored based on the static rules and static analysis data to obtain m static rule score vectors.

[0054] Step S21 - 2 : Obtain a static standard score for each request based on the maximum value of the static rule, the number of the multiple static rules, the multiple static rule score vectors, and the corresponding static rule weight vectors.

[0055] In this embodiment, each of the multiple static rules corresponds to a pre-set static rule weight vector, and in this embodiment, a static rule maximum value is pre-set for the static normative score, which is the maximum score for the static rules. In this embodiment, after obtaining the multiple static rule score vectors, the static normative score of each request can be calculated based on the static rule maximum value, the number of rules in the multiple static rules, the multiple static rule score vectors, and the corresponding static rule weight vectors.

[0056] For example, the static rule score vector is X=(x1, x2, ..., x m ), the corresponding static rule weight vector is A = (α1, α2, ..., α m ), then the static rule score is as follows (1):

[0057] After normalization, the static norm score of each request is obtained as shown in the following formula (2), where A max is the static rule maximum:

[0058] Step S22: Obtain a dynamic normative score for each request based on dynamic rules and dynamic analysis data.

[0059] In this embodiment, for each request of a service, a dynamic standard score of each request may be determined according to the dynamic rules corresponding to the service and the dynamic analysis data corresponding to the service.

[0060] In some embodiments, the above step S22 may specifically include steps S22-1 to S22-2:

[0061] Step S22 - 2 : scoring the multiple dynamic rules according to the dynamic rules and the dynamic analysis data to obtain multiple dynamic rule score vectors.

[0062] In this embodiment, multiple dynamic rules can be scored based on the dynamic rules and dynamic analysis data of the service to obtain dynamic rule score vectors. For example, if n dynamic rules are determined, these n dynamic rules can be scored based on the dynamic rules and dynamic analysis data to obtain n dynamic rule score vectors.

[0063] Step S22 - 2 : Obtain a dynamic norm score for each request based on the dynamic rule maximum value, the number of dynamic rules, the dynamic rule score vectors, and the corresponding dynamic rule weight vectors.

[0064] In this embodiment, each of the multiple dynamic rules corresponds to a pre-set dynamic rule weight vector, and in this embodiment, a dynamic rule maximum value is pre-set for the dynamic normative score, which is the maximum score for the dynamic rule. In this embodiment, after obtaining the multiple dynamic rule score vectors, the dynamic normative score for each request can be calculated based on the dynamic rule maximum value, the number of rules in the multiple dynamic rules, the multiple dynamic rule score vectors, and the corresponding dynamic rule weight vectors.

[0065] For example, the dynamic rule score vector is Y=(y1, y2, ..., y n ), the corresponding dynamic rule weight vector is B = (β1, β2, ..., β n ), the dynamic rule score is as follows (3):

[0066] After normalization, the dynamic norm score of each request is obtained as shown in the following formula (4), where B max is the dynamic rule maximum value:

[0067] Step S23: Determine the responsiveness of each request based on the request type and execution time of each request. In this embodiment, the request data includes at least the request type and execution time of each request. Request types may include database requests, cache requests, HTTP requests, and the like. This embodiment determines the responsiveness of each request served based on the request type and execution time distribution.

[0068] In some embodiments, the above step S23 may specifically include steps S23-1 to S23-2:

[0069] Step S23 - 1 : Score multiple response rules of the service according to the request type and request execution time of each request to obtain multiple response rule score vectors.

[0070] In this embodiment, multiple response rules for each request can be scored based on the request type and execution time of each request to obtain a response rule score vector. For example, if there are p response rules, each of the p response rules can be scored based on the request type and execution time of each request to obtain p response rule score vectors.

[0071] Step S23 - 2 : Obtain the responsiveness of each request according to the maximum value of the response rule, the number of the multiple response rules, the multiple response rule score vectors, and the corresponding response rule weight vectors.

[0072] In this embodiment, each of the multiple response rules corresponds to a pre-set response rule weight vector. In addition, in this embodiment, a maximum response rule value is pre-set for responsiveness, which is the maximum score for the response rule. In this embodiment, after obtaining the multiple response rule score vectors, the responsiveness of each request can be calculated based on the maximum response rule value, the number of response rules, the multiple response rule score vectors, and the corresponding response rule weight vectors.

[0073] For example, the response rule score vector is Z=(z1, z2, ..., z p ), the corresponding response rule weight vector is C = (δ1, δ2, ..., δ p ), the responsiveness score is as follows (5):

[0074] After normalization, the responsiveness of each request is obtained as shown in the following formula (6), where C max is the maximum value of the response rule:

[0075] Step S24: Determine the health of each request based on the static norm score of each request, the dynamic norm score of each request, and the responsiveness of each request.

[0076] After obtaining the static standard score, dynamic standard score, and responsiveness of each request, this embodiment can determine the health of each request based on the static standard score, dynamic standard score, and responsiveness of each request.

[0077] In some embodiments, the above step S24 may specifically include step S24-1:

[0078] Step S24-1: Determine the health of each request based on the tuning factor weight constant, the static factor weight constant and the static norm score of each request, the dynamic factor weight constant and the dynamic norm score of each request, and the response factor weight constant and the responsiveness of each request.

[0079] In this embodiment, various factor weight constants are pre-set, such as a tuning factor weight constant, a static factor weight constant, a dynamic factor weight constant, and a response factor weight constant. Thus, after obtaining the static normalized score, dynamic normalized score, and responsiveness of each request, the health of each request can be determined based on the tuning factor weight constant, the static factor weight constant and the static normalized score of each request, the dynamic factor weight constant and the dynamic normalized score of each request, and the response factor weight constant and the responsiveness of each request.

[0080] Specifically, the health of each request can be expressed as follows (7), where λ0 is the weight constant of the tuning factor, λ s is the static factor weight constant, λ d is the dynamic factor weight constant and λ t is the response factor weight constant:

[0081] Among them, the system standard score of a single request can be expressed as follows (8):

[0082] Step S25: Determine the health of the service per unit time based on the health of each request and the total number of requests served per unit time.

[0083] After obtaining the health of each request, this embodiment can determine the health of the service per unit time according to the health of each request and the total number of requests served per unit time.

[0084] In some embodiments, the above step S25 may specifically include step S25-1:

[0085] Step S25-1: Determine the health of the service per unit time based on the health of each request, the total number of requests served per unit time, the tuning factor weight constant, the static factor weight constant, the dynamic factor weight constant, and the response factor weight constant.

[0086] In this embodiment, after obtaining the health of each request, the health of the service per unit time can be determined based on the health of each request, the total number of requests served per unit time, the tuning factor weight constant, the static factor weight constant, the dynamic factor weight constant and the response factor weight constant.

[0087] Specifically, the health of the service per unit time can be expressed as follows (9), where N is the total number of service requests per unit time:

[0088] In this embodiment, the health of the service can be calculated regularly. Continuously tracking changes in health is an effective way to understand the system and services. It can intuitively understand changes in service storage resource capacity and efficiency, as well as data support for the effects of each optimization during the iterative process.

[0089] In conjunction with the above embodiments, in one embodiment, the present application also provides a method for analyzing storage resources. In this method, the service connects to the storage resource through a proxy, and the above step S13 may specifically include steps S31 and S33:

[0090] Step S31: Receive a service request through a proxy.

[0091] In this embodiment, the service connects to the storage resources corresponding to the service through a proxy, wherein the deployment scheme between the service and the proxy can be flexibly configured: for example, it can be centrally configured, that is, multiple services correspond to the same proxy, and multiple services connect to the corresponding storage resources through the same proxy; it can also be deployed in a sidecar manner, that is, a one-to-one configuration: one service corresponds to one proxy.

[0092] In this embodiment, the proxy connected to the service can perform real-time detection and processing of service requests, and dynamically analyze them according to dynamic rules. When a user accesses a service, each access request can pass through the firewall and service gateway to reach the service, and then to the proxy, which receives the service request through the proxy. In other words, the service processes all requests uniformly through the proxy.

[0093] Step S32: Detect the service request through the proxy to obtain request data.

[0094] In this embodiment, the proxy may detect the request for the service and determine relevant request data for the request, that is, determine relevant request indicators for the request.

[0095] Step S33: The proxy performs dynamic analysis based on the request data and dynamic rules to obtain dynamic analysis data.

[0096] In this embodiment, after the proxy obtains the request data, it can dynamically analyze the request data according to the dynamic rules to obtain corresponding dynamic analysis data. If the core indicators in the request data are determined to trigger the threshold set by the dynamic rules according to the dynamic rules, a timely alarm will be issued.

[0097] In combination with the above embodiments, in one embodiment, the present application also provides a method for analyzing storage resources. In this method, "connecting a service to a storage resource through a proxy" may include steps S41 to S43:

[0098] Step S41: The service accesses the proxy through the SDK. The SDK supports switching between directly connecting to storage resources or connecting to storage resources through the proxy.

[0099] In this embodiment, the service can access its corresponding proxy through the SDK (Software Development Kit). The SDK of this embodiment supports switching to enable the service to directly connect to its corresponding storage resource or to connect to its corresponding storage resource through the proxy.

[0100] Step S42: When the SDK is open, the service connects to the storage resource through the proxy.

[0101] In this embodiment, when the SDK switch is on, services can connect to their corresponding storage resources through a proxy. This is proxy access mode: when a service initiates a resource request, the resource request proxy device performs proxy processing, providing real-time dynamic rule analysis, static analysis, report generation, and push notification capabilities.

[0102] Step S43: When the SDK is off, the service directly connects to the storage resource.

[0103] In this embodiment, when the SDK switch is off, the service directly connects to its corresponding storage resource. This is direct access mode: the service directly initiates a request to the service storage resource, skipping the real-time dynamic rule verification and analysis, and providing static verification and analysis, report generation and push functions.

[0104] That is to say, in this embodiment, considering that there are many complex situations and various possible constraints in the services in actual work, the design can take into account multiple situations and support multiple modes of docking: 1. Proxy access mode; 2. Direct access mode; 3. Intrusive full-function access mode: It can be accessed through SDK+proxy, supporting all the functions of the above embodiments, and switched through the SDK switch to realize proxy connection resources, direct connection resources, or sampling proxy connection mode (a mode in which some services are connected to the proxy and some services are not connected to the proxy), making this method suitable for scenarios with very high performance requirements.

[0105] In combination with the above embodiments, in one embodiment, the present application also provides a method for analyzing storage resources. In this method, the above step S33 may specifically include steps S51 to S53:

[0106] Step S51: when the proxy determines, based on the dynamic rule, that the request execution time is higher than the request execution time threshold, it is determined that the request execution is slow.

[0107] In this embodiment, the request data detected may include various indicators related to the request, wherein the request data in this embodiment includes at least: the request type and request execution time of each request. Therefore, when the agent performs dynamic analysis according to the dynamic rule, the agent can determine whether the request execution time of the request is higher than the request time threshold according to the request time threshold in the dynamic rule. The request time threshold represents the maximum value of the normal request time, which can be set freely. When the agent determines that the request execution time of the request is higher than the request time threshold according to the request time threshold in the dynamic rule, it can be determined that the request is executed slowly.

[0108] Step S52: When the proxy determines that the number of slow-executed requests exceeds a preset ratio according to dynamic rules, it is determined that there are service pressure and load problems, and dynamic analysis data is obtained.

[0109] In this embodiment, the dynamic rule also includes a preset ratio, which represents the maximum proportion of slow requests. If the proxy determines that the number of slow requests exceeds the preset ratio based on the dynamic rule, service pressure and load issues can be determined. In this case, various indicators of the service storage resources can be monitored to identify the root cause of the problem and generate dynamic analysis data.

[0110] Step S53: When the proxy determines that the number of slow-executed requests is lower than a preset ratio according to dynamic rules, it is determined that there is a SQL statement programming problem, and dynamic analysis data is obtained.

[0111] In this embodiment, if the proxy determines that the number of slow requests is lower than a preset ratio based on a preset ratio in a dynamic rule, it can be determined that the slowness is due to an individual request, and there are problems such as unreasonable SQL statement programming or unreasonable index and database paradigm design. In this case, the SQL statement can be dynamically analyzed based on the request syntax tree to obtain dynamic analysis data. As shown in Figure 2, Figure 2 is an example diagram of a request syntax tree provided in one embodiment of the present application. Figure 2 shows an SQL statement. "select," "from," and "where" are all SQL statement keywords. "select" followed by "fields" specifies which fields to query. A "fields" value pointing to "*" queries all fields. "from" followed by "table" specifies which table to query. A "table" value pointing to "tt" queries the table named "tt." "Where" is followed by "conditions." Among the conditions in Figure 2, "and" stands for "and," "gt" stands for "greater than," "lt" stands for "less than," and "in" stands for "in." Therefore, the conditions shown in Figure 2 include: Condition 1: a is greater than 20 and b is less than 5; Condition 2: c is in the range (1, 2, 3). In summary, the SQL statement in Figure 2 represents a query of all fields from the table named "tt," where the conditions are a > 20 and b < 5, and C ∈ (1, 2, 3).

[0112] In this embodiment, when performing dynamic analysis through the proxy, if an anomaly is detected, it can be determined whether it is a system-level problem or an individual programming problem, so that further detection can be performed to generate dynamic analysis results to generate and push reports. It should be noted that the situation for Redis is similar to the above and will not be repeated here.

[0113] In conjunction with the above embodiments, in one implementation, the present application also provides a method for analyzing storage resources. In addition to the above steps, the method may also include at least one of the following steps:

[0114] Step S61: Regularly identify and automatically attribute static analysis data and dynamic analysis data according to static rules and dynamic rules, generate corresponding reports and push them.

[0115] In this embodiment, the data reported by dynamic analysis and static analysis can be processed regularly, and the static analysis data and dynamic analysis data can be distinguished and automatically attributed according to static rules and dynamic rules respectively, and corresponding reports can be generated and pushed to relevant personnel.

[0116] Among them, regular dynamic and static reporting data analysis can include: operation standardization analysis, library table and index design optimization analysis, SQL anti-pattern analysis, cache usage optimization analysis, etc.

[0117] Step S62: regularly analyzing the relevant data of the service during the peak period of business traffic, as well as the hot spot data corresponding to the service, to obtain the hot spot analysis results, and evaluating the capacity of the storage resource according to the hot spot analysis results.

[0118] In this embodiment, service-related data during peak business traffic periods and hotspot data corresponding to the services can also be analyzed regularly to obtain hotspot analysis results, so as to evaluate the capacity information of storage resources based on the hotspot analysis results and push corresponding reports.

[0119] Step S63: Periodically analyze potential failure points of storage resources, obtain and distribute the failure point analysis results. In this embodiment, the analysis can also be performed on specific potential failure points of storage resources, such as early warning analysis of common database potential failure points, early warning analysis of common Redis potential failure points, etc., and the failure point analysis results are generated into a report and distributed to relevant personnel for attention and processing.

[0120] It should be noted that the periodicity in the above steps S61-S63 all represent periodicity. The periodicity referred to in different steps (such as the above steps S61-S63 and step S14) can be the same or different, and the period can be long or short. If it is short, it is equivalent to semi-real time. This implementation does not impose any restrictions on this.

[0121] In this embodiment, through regular analysis, that is, quasi-real-time analysis, the rationality of SQL at each stage can be solved through dynamic proxy. Based on the native lexical analysis of the database (such as Mysql), combined with the analysis of the where conditions, aggregation conditions, multi-table Join relationships, and index conditions in SQL, operations that affect performance and may even cause slow queries are forcibly avoided; and capacity and efficiency analysis is performed regularly.

[0122] In addition, in one embodiment, this embodiment can also support offline analysis, that is, based on the relevant data reported by statistics, an offline task can be started to analyze the SQL execution frequency (how many times a day), the library table growth rate, etc. to see whether it is reasonable, and to provide optimization suggestions for problems such as joins and attribute indexes with low discrimination.

[0123] In combination with the above embodiments, in one embodiment, the present application also provides a method for analyzing storage resources. In this method, in addition to the above steps, step S71 may also be included:

[0124] Step S71: In response to the user's modification operation in the rule engine editing interface, the modified static rule configuration and / or dynamic rule configuration corresponding to the service is determined and saved. After saving, the service hot update automatically takes effect to achieve rule editing and synchronization.

[0125] In this embodiment, the service comes with static and dynamic rule configurations when it is installed. During service operation, if the user needs to enhance indicators or optimize rule engine parameters, they can modify the corresponding configuration directly through the rule engine editing page. In response to the user's modification operation in the rule engine editing interface, the modified static and / or dynamic rule configuration corresponding to the service is determined and saved. After saving, it automatically takes effect after the service is hot-updated, thereby enabling rule editing and synchronization. Hot-updating is an instant update that users will encounter when accessing the service, without having to re-download the entire service installation package.

[0126] In this embodiment, dynamic and static rules support online hot updates of rules, thereby ensuring that service storage resources can be effectively covered in various environments. By combining dynamic and static methods, it effectively makes up for the shortcomings of traditional resource auditing and solves the problem of storage resource utilization effectiveness in a more efficient and automated manner.

[0127] In combination with the above embodiments, in one implementation, the present application also provides a method for analyzing storage resources. In this method, the above step S11 may specifically include steps S81 to S83:

[0128] Step S81: Initialize the application scenario of the storage resources corresponding to the service; different application scenarios support different rule engine templates.

[0129] In this embodiment, the information of the storage resources corresponding to the initialized service may include the application scenario of the storage resources corresponding to the service, that is, after the service is started, the application scenario of the storage resources corresponding to the service will be initialized. The application scenarios may include: database scenarios (application development, financial security, data archiving, etc.) and redis scenarios (cache, storage, etc.); different application scenarios support different rule engine templates.

[0130] Step S82: Determine a rule engine template corresponding to the application scenario according to the application scenario.

[0131] This embodiment can determine the rule engine template corresponding to the loaded application scenario according to the loaded application scenario. Step S83: Load the static rules and dynamic rules corresponding to the service application scenario according to the rule engine template corresponding to the application scenario.

[0132] In this embodiment, after obtaining the corresponding rule engine template, the static rules and dynamic rules corresponding to the application scenario of the service can be loaded according to the rule engine template corresponding to the application scenario, that is, the service storage resource usage specifications and dynamic and static rule configurations can be loaded according to the application scenario.

[0133] In this embodiment, low-level resource usage issues are avoided and scenario-based usage solutions are supported. Specifically, this can be reflected in service-level restrictions on resource usage, prohibition of industry SQL anti-patterns, and the ability to select different rule engine templates based on different business scenarios (such as payment, e-commerce, and user services), making dynamic and static rule configurations more flexible and available.

[0134] In another embodiment, as shown in FIG3 , FIG3 is a flow chart of a storage resource analysis method according to an embodiment of the present application.

[0135] In Figure 3, the service starts and loads its corresponding specification information, namely, the dynamic and static rules corresponding to the service. Next, the service initializes various information about its storage resources and analyzes them according to static rules, performing static specification matching. It then performs static analysis of system request resources (storage structure, paradigm, constraints, and storage capacity), and initializes various analytical benchmarks. These metrics are automatically updated and recalibrated periodically, and capacity growth-related metrics are initialized / calibrated based on interval content volume changes. Next, the service determines request data in real time based on the service request, performs dynamic request parsing (such as SQL syntax trees) according to dynamic rules, performs dynamic specification matching, and detects dynamic request types and time consumption distribution statistics in real time. Next, the service's health is regularly calculated using a specific algorithm based on dynamic and static rules, request types, time consumption distribution, and various weighting factors. Finally, based on the health threshold and the calculated health, reports are pushed and corresponding monitoring alerts are generated. This effectively avoids issues through resource servitization (dynamic proxying, static analysis, offline statistics, etc.), quickly discovers and resolves them, and effectively improves service availability and robustness.

[0136] Furthermore, this embodiment targets projects that run for extended periods and experience bursts of traffic, requiring developers with a high level of development experience. In real-world projects, availability issues often arise from improper resource utilization or inadequate optimization. This provides low-cost, three-dimensional availability assurance at the resource level: This capability is not limited by process execution granularity or developer capabilities, enabling low-cost, three-dimensional optimization and monitoring of the entire process, while also enabling automated, fine-grained assessment and inspection of system capacity. During the online service operation phase, it proactively identifies and guides developers in optimizing storage resources before they become problematic.

[0137] In another embodiment, the storage resource analysis method of any of the above embodiments can be applied to the storage resource analysis system proposed in this embodiment. The storage resource analysis system can effectively cover several important R&D links of design, development, testing and online services by being deployed in different environments, and supports multi-cloud and multi-language scenarios, and the online service deployment is flexible. For example, Golang (a programming language) or Java and other programming languages ​​can be used to implement deployment in various links such as service design, development, testing and online monitoring. As shown in Figure 4, Figure 4 is a structural diagram of a storage resource analysis system shown in an embodiment of the present application. The storage resource analysis system of this embodiment may include at least: a request proxy device (proxy), a rule engine device, a static analysis device, a capacity & efficiency evaluation device, and a report & push device.

[0138] Among them, the user's access request for the service can reach each service through the firewall and service gateway, and then be uniformly proxied through the request proxy device (proxy). Among them, the rule engine is used to load the dynamic rules and static rules corresponding to each service; the request proxy device is used to perform dynamic analysis of service storage resources; the static analysis device is used to perform static analysis of service storage resources; the capacity & efficiency evaluation device is used to regularly evaluate the capacity efficiency of service storage resources based on the reported dynamic and static analysis data; the report & push device is used to generate corresponding reports for the various analysis data received and push them, and issue response alarms in a timely manner. It should be noted that for the method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0139] Based on the same inventive concept, an embodiment of the present application provides a storage resource analysis device 500. Referring to FIG5 , FIG5 is a block diagram of the storage resource analysis device provided by an embodiment of the present application. As shown in FIG5 , the device 500 includes:

[0140] The rule engine module 501 is used to initialize the information of the storage resources corresponding to the service and load the static rules and dynamic rules corresponding to the service when the service is started;

[0141] Static analysis module 502, used to perform static analysis based on various information of storage resources and static rules to obtain static analysis data;

[0142] The dynamic analysis module 503 is used to detect service requests in real time, determine request data of the request, and perform dynamic analysis based on the request data and dynamic rules to obtain dynamic analysis data;

[0143] Health determination module 504, for periodically determining the health of a service based on static rules and static analysis data, dynamic rules and dynamic analysis data, and request data; the health of a service represents the degree of system standardization of the service and the capacity and status of the storage resources corresponding to the service;

[0144] The report push module 505 is used to generate and push reports based on static analysis data, dynamic analysis data and health status.

[0145] In some embodiments of the present application, the request data includes at least: the request type and the request execution time of each request; the health determination module 504 includes:

[0146] A static normative score determination module is used to obtain a static normative score for each request based on static rules and static analysis data;

[0147] Dynamic normative score determination module, used to obtain the dynamic normative score of each request based on dynamic rules and dynamic analysis data;

[0148] A responsiveness determination module is used to determine the responsiveness of each request based on the request type and request execution time of each request;

[0149] a first health determination module, configured to determine the health of each request based on a static norm score of each request, a dynamic norm score of each request, and a responsiveness of each request;

[0150] The second health determination module is used to determine the health of the service per unit time according to the health of each request and the total number of requests served per unit time.

[0151] In some embodiments of the present application, the static specification point determination module includes:

[0152] A first score vector determination module is used to score multiple static rules according to the static rules and static analysis data to obtain multiple static rule score vectors;

[0153] A static normative score determination submodule is used to obtain a static normative score for each request based on the maximum value of a static rule, the number of rules of multiple static rules, multiple static rule score vectors, and their corresponding static rule weight vectors;

[0154] Dynamic specification points determination module, including:

[0155] A second score vector determination module is used to score multiple dynamic rules according to the dynamic rules and dynamic analysis data to obtain multiple dynamic rule score vectors;

[0156] A dynamic normative score determination submodule, configured to obtain a dynamic normative score for each request based on a dynamic rule maximum value, the number of dynamic rules, multiple dynamic rule score vectors, and their corresponding dynamic rule weight vectors;

[0157] A responsiveness determination module, comprising:

[0158] A third score vector determination module is configured to score multiple response rules of the service according to the request type and request execution time of each request, thereby obtaining multiple response rule score vectors;

[0159] A responsiveness determination submodule, configured to obtain the responsiveness of each request based on the maximum value of the response rule, the number of the multiple response rules, the multiple response rule score vectors, and the corresponding response rule weight vectors;

[0160] The first health determination module includes:

[0161] a first health determination submodule, configured to determine the health of each request based on a tuning factor weight constant, a static factor weight constant and a static norm score of each request, a dynamic factor weight constant and a dynamic norm score of each request, and a response factor weight constant and a responsiveness of each request;

[0162] The second health determination module includes:

[0163] The second health determination submodule is used to determine the health of the service per unit time based on the health of each request, the total number of requests served per unit time, the tuning factor weight constant, the static factor weight constant, the dynamic factor weight constant and the response factor weight constant.

[0164] In some embodiments of the present application, the service connects to the storage resource via a proxy, and the dynamic analysis module 503 includes: a request receiving module for receiving a request for the service via the proxy;

[0165] The detection module is used to detect service requests through the proxy and obtain request data;

[0166] The dynamic analysis submodule is used to perform dynamic analysis based on request data and dynamic rules through a proxy to obtain dynamic analysis data.

[0167] In some embodiments of the present application, the service connects to the storage resource through a proxy, including:

[0168] The service accesses the proxy through the SDK. The SDK supports switching between directly connecting to storage resources or connecting to storage resources through the proxy.

[0169] When the SDK is enabled, the service connects to storage resources through a proxy;

[0170] When the SDK is turned off, the service connects directly to the storage resource.

[0171] In some embodiments of the present application, the request data includes at least: the request type and the execution time of each request; the dynamic analysis submodule includes:

[0172] A first determining module is configured to determine that the request execution is slow when the proxy determines, based on a dynamic rule, that the request execution time exceeds a request time threshold;

[0173] The second determination module is configured to determine that there is a service pressure and load problem when the proxy determines that the number of slow-executed requests exceeds a preset ratio according to dynamic rules, and obtain dynamic analysis data;

[0174] The third determination module is used to determine that there is an SQL statement programming problem when the proxy determines according to dynamic rules that the number of slow-executed requests is lower than a preset ratio, and obtain dynamic analysis data.

[0175] In some embodiments of the present application, the apparatus 500 further includes:

[0176] The first regular analysis module is used to regularly identify and automatically attribute static analysis data and dynamic analysis data based on static rules and dynamic rules, generate corresponding reports and push them;

[0177] The second periodic analysis module is used to regularly analyze the relevant data of the service during the business traffic peak period, as well as the hot spot data corresponding to the service, to obtain the hot spot analysis results, and to evaluate the capacity of the storage resources based on the hot spot analysis results;

[0178] The third regular analysis module is used to regularly analyze potential failure points of storage resources, obtain failure point analysis results and push them.

[0179] In some embodiments of the present application, the apparatus 500 further includes:

[0180] The rule editing module is used to respond to the user's modification operations in the rule engine editing interface, determine the modified static rule configuration and / or dynamic rule configuration corresponding to the service and save it. After saving, the service hot update automatically takes effect to realize rule editing and synchronization.

[0181] In some embodiments of the present application, the rule engine module 501 includes:

[0182] The scenario loading module is used to initialize the application scenario of the storage resources corresponding to the service; different application scenarios support different rule engine templates;

[0183] The template determination module is used to determine the rule engine template corresponding to the application scenario according to the application scenario;

[0184] The rule engine submodule is used to load the static rules and dynamic rules corresponding to the service application scenario based on the rule engine template corresponding to the application scenario.

[0185] Based on the same inventive concept, another embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in the storage resource analysis method of any of the above embodiments of the present application.

[0186] Based on the same inventive concept, another embodiment of the present application provides an electronic device 600, as shown in Figure 6. Figure 6 is a schematic diagram of an electronic device according to one embodiment of the present application. The electronic device includes a memory 602, a processor 601, and a computer program stored in the memory and executable on the processor. When executed by the processor, the computer program implements the steps of the storage resource analysis method of any of the above embodiments of the present application.

[0187] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0188] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0189] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0190] The present application embodiment is described with reference to the flow chart and / or block diagram of the method, terminal device (system), and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flow chart and / or block diagram and the combination of the process and / or box in the flow chart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device produce a device for realizing the function specified in one process or multiple processes and / or one box or multiple boxes of the flow chart.

[0191] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0193] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0194] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0195] The above is a detailed introduction to the storage resource analysis method, device, electronic device and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for analyzing storage resources, characterized in that: The method comprises: When the service is started, various information of the storage resources corresponding to the service is initialized, and static rules and dynamic rules corresponding to the service are loaded; Performing static analysis according to the information of the storage resources and the static rules to obtain static analysis data; Detecting the request for the service in real time, determining the request data of the request, and performing dynamic analysis according to the request data and the dynamic rules to obtain dynamic analysis data; Regularly determining the health of the service according to the static rules and the static analysis data, the dynamic rules and the dynamic analysis data, and the request data; the health represents the system standardization degree of the service and the capacity and status of the storage resources corresponding to the service; A report is generated and pushed based on the static analysis data, the dynamic analysis data and the health status.

2. The storage resource analysis method according to claim 1, characterized in that: The request data at least includes: the request type and the request execution time of each request; the periodic determination of the health of the service according to the static rules and the static analysis data, the dynamic rules and the dynamic analysis data, and the request data includes: Obtaining a static normative score for each request according to the static rules and the static analysis data; Obtaining a dynamic norm score for each request according to the dynamic rules and the dynamic analysis data; Determine the responsiveness of each request according to the request type and the request execution time of each request; Determine the health of each request according to the static norm score of each request, the dynamic norm score of each request and the responsiveness of each request; The health of the service per unit time is determined according to the health of each request and the total number of requests for the service per unit time.

3. The storage resource analysis method according to claim 2, characterized in that: The step of obtaining a static standard score for each request according to the static rules and the static analysis data includes: Scoring the multiple static rules according to the static rules and the static analysis data to obtain multiple static rule score vectors; Obtaining a static normative score for each request according to the maximum value of the static rule, the number of rules of the multiple static rules, the multiple static rule score vectors, and the corresponding static rule weight vectors; The obtaining of a dynamic norm score for each request according to the dynamic rule and the dynamic analysis data comprises: scoring a plurality of dynamic rules according to the dynamic rule and the dynamic analysis data to obtain a plurality of dynamic rule score vectors; Obtaining a dynamic norm score for each request according to the dynamic rule maximum value, the number of rules of the multiple dynamic rules, the multiple dynamic rule score vectors, and the corresponding dynamic rule weight vectors; Determining the responsiveness of each request according to the request type and the request execution time of each request includes: Scoring the multiple response rules of the service according to the request type and the request execution time of each request to obtain multiple response rule score vectors; Obtaining the responsiveness of each request according to the maximum value of the response rule, the number of the multiple response rules, the multiple response rule score vectors, and the corresponding response rule weight vectors; Determining the health of each request according to the static norm score of each request, the dynamic norm score of each request and the responsiveness of each request includes: According to the tuning factor weight constant, the static factor weight constant and the static norm score of each request, the dynamic factor weight constant and the dynamic norm score of each request, and the response factor weight constant and the The responsiveness of each request is determined to determine the health of each request; Determining the health of the service per unit time according to the health of each request and the total number of requests for the service per unit time includes: The health of the service within the unit time is determined based on the health of each request, the total number of requests for the service within the unit time, the tuning factor weight constant, the static factor weight constant, the dynamic factor weight constant and the response factor weight constant.

4. The storage resource analysis method according to claim 1, characterized in that: The service is connected to the storage resource through a proxy, the real-time detection is performed on the request of the service, the request data of the request is determined, and the dynamic analysis is performed according to the request data and the dynamic rule to obtain the dynamic analysis data, including: receiving, through the proxy, a request for the service; Detecting the request for the service through the proxy to obtain the request data; The agent performs dynamic analysis according to the request data and the dynamic rules to obtain the dynamic analysis data.

5. The storage resource analysis method according to claim 4, characterized in that: The service connects to the storage resource through a proxy, including: The service accesses the proxy through the SDK, and the SDK supports switching to directly connect to the storage resource or connect to the storage resource through the proxy; In case the SDK is open, the service connects to the storage resource through the proxy; When the SDK is off, the service directly connects to the storage resource.

6. The storage resource analysis method according to claim 4, characterized in that: The request data at least includes: the request type and the request execution time of each request; the dynamic analysis data obtained by the agent according to the request data and the dynamic rules includes: In the case where the proxy determines, according to the dynamic rule, that the execution time of the request is higher than the request time threshold, determining that the execution of the request is slow; When the proxy determines, according to the dynamic rule, that the number of requests that are executed slowly is higher than a preset ratio, it is determined that there are service pressure and load problems, and the dynamic analysis data is obtained; When the proxy determines, according to the dynamic rule, that the number of requests that are executed slowly is lower than a preset ratio, it is determined that there is a problem with the SQL statement programming, and the dynamic analysis data is obtained.

7. The storage resource analysis method according to claim 1, characterized in that: The method further comprises at least one of the following steps: Regularly distinguish and automatically attribute the static analysis data and the dynamic analysis data according to the static rules and the dynamic rules, generate corresponding reports and push them; Regularly analyzing the relevant data of the service during the peak period of business traffic and the hot spot data corresponding to the service to obtain hot spot analysis results, and evaluating the capacity of the storage resource according to the hot spot analysis results; Periodically analyze the potential failure points of the storage resources, obtain the failure point analysis results and push them.

8. The storage resource analysis method according to claim 1, characterized in that: The method further comprises: In response to the user's modification operation in the rule engine editing interface, the modified static rule configuration and / or dynamic rule configuration corresponding to the service is determined and saved. After saving, the service hot update automatically takes effect to realize rule editing and synchronization.

9. The storage resource analysis method according to claim 1, characterized in that: Initializing various information of storage resources corresponding to the service and loading static rules and dynamic rules corresponding to the service include: Initialize the application scenario of the storage resources corresponding to the service; different application scenarios support different Rule engine template; According to the application scenario, determine a rule engine template corresponding to the application scenario; According to the rule engine template corresponding to the application scenario, the static rules and dynamic rules corresponding to the application scenario of the service are loaded.

10. A storage resource analysis device, characterized in that: The device comprises: A rule engine module is used to initialize various information of storage resources corresponding to the service and load static rules and dynamic rules corresponding to the service when the service is started; A static analysis module, used for performing static analysis according to various information of the storage resources and the static rules to obtain static analysis data; A dynamic analysis module, used to detect the request for the service in real time, determine the request data of the request, perform dynamic analysis according to the request data and the dynamic rules, and obtain dynamic analysis data; A health determination module, used to regularly determine the health of the service according to the static rules and the static analysis data, the dynamic rules and the dynamic analysis data, and the request data; the health represents the system standardization degree of the service and the capacity and status of the storage resources corresponding to the service; The report push module is used to generate and push a report based on the static analysis data, the dynamic analysis data and the health status.

11. The storage resource analysis device according to claim 10, characterized in that: The request data includes at least: the request type and the request execution time of each request; the health determination module includes: a static standard score determination module, which is used to obtain the static standard score of each request according to the static rules and the static analysis data; A dynamic normative score determination module, used to obtain a dynamic normative score for each request according to the dynamic rules and the dynamic analysis data; A responsiveness determination module, used to determine the responsiveness of each request according to the request type and request execution time of each request; A first health determination module, configured to determine the health of each request according to the static norm score of each request, the dynamic norm score of each request and the responsiveness of each request; The second health determination module is used to determine the health of the service per unit time according to the health of each request and the total number of requests for the service per unit time.

12. The storage resource analysis device according to claim 11, characterized in that: The static specification points determination module includes: A first score vector determination module, configured to score a plurality of static rules according to the static rules and the static analysis data to obtain a plurality of static rule score vectors; A static norm score determination submodule, configured to obtain a static norm score for each request according to a static rule maximum value, the number of rules of the plurality of static rules, the plurality of static rule score vectors, and the corresponding static rule weight vectors; The dynamic specification points determination module comprises: A second score vector determination module is used to score multiple dynamic rules according to the dynamic rules and the dynamic analysis data to obtain multiple dynamic rule score vectors; A dynamic norm score determination submodule, configured to obtain a dynamic norm score for each request according to a dynamic rule maximum value, the number of rules of the multiple dynamic rules, the multiple dynamic rule score vectors, and the corresponding dynamic rule weight vectors; The responsiveness determination module comprises: A third score vector determination module is used to score the multiple response rules of the service according to the request type and the request execution time of each request to obtain multiple response rule score vectors; A responsiveness determination submodule, configured to obtain the responsiveness of each request according to the maximum value of the response rules, the number of the multiple response rules, the multiple response rule score vectors, and the corresponding response rule weight vectors; The first health determination module includes: A first health determination submodule, used to determine the health of each request according to a tuning factor weight constant, a static factor weight constant and a static norm score of each request, a dynamic factor weight constant and a dynamic norm score of each request, and a response factor weight constant and a responsiveness of each request; The second health determination module includes: The second health determination submodule is used to determine the health of the service within the unit time based on the health of each request, the total number of requests for the service within the unit time, the tuning factor weight constant, the static factor weight constant, the dynamic factor weight constant and the response factor weight constant.

13. The storage resource analysis device according to claim 10, characterized in that: The service is connected to the storage resource through a proxy, and the dynamic analysis module includes: A request receiving module, used for receiving a request for the service through the proxy; A detection module, used for detecting the request for the service through the proxy to obtain the request data; The dynamic analysis submodule is used to perform dynamic analysis according to the request data and the dynamic rules through the agent to obtain the dynamic analysis data.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by the processor, the storage resource analysis method according to any one of claims 1 to 9 is implemented.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the storage resource analysis method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Systems and methods for improving control system reliability

    CN104412247A

  • A method and apparatus for managing storage resources in a cloud data system

    CN109213451A

  • Storage equipment health degree detection method and device and storage medium

    CN110471802A

  • Storage resource analysis method and device, electronic equipment and storage medium

    CN115857838A

  • Method and system for providing rule-based contextadaptive service

    KR1020060061190A