Database product state detection method and system and electronic equipment

By identifying the fluctuation query operations and total query operations within the historical detection period of the database product, it automatically judges its stability status, solving the problem of low detection efficiency of database product, reducing the time of investigation and improving the user experience.

CN119166699AActive Publication Date: 2024-12-20HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410084770.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-19
Publication Date
2024-12-20
Estimated Expiration
2044-01-19

AI Technical Summary

Technical Problem

When the stability of the database product in an emergency state of stability occurs, the detection efficiency is low, resulting in a long inspection time and affecting its use.

Method used

By obtaining the query operations within the historical detection period of the database product, identifying fluctuation query operations with response time exceeding the threshold, determining the status detection indicators, automatically determining the stability status of the database product, and outputting prompt information for abnormal stable state.

Benefits of technology

It reduces the time for database product problem investigation, provides an automated operation and maintenance basis, improves user experience, and solves the problem of low status detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166699A_ABST
    Figure CN119166699A_ABST
Patent Text Reader

Abstract

The invention discloses a database product state detection method and system and electronic equipment. The method comprises the steps of obtaining at least one query operation responded by a database product in a historical detection time period; in the at least one query operation, at least one fluctuation query operation is recognized, and the fluctuation query operation is the query operation with the response time exceeding a time threshold value in the at least one query operation; based on the at least one fluctuation query operation and the at least one query operation, determining a state detection index of the database product, the state detection index being used for representing a stability state of the database product; and if the state detection index is greater than the state detection index threshold, determining that the database product is in an abnormal stability state in the historical detection time period. The technical problem that the state detection efficiency of database products is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data management, and in particular to a method, system and electronic device for detecting the status of a database product. Background Art

[0002] At present, the status stability problem of database products with a large number of customers is very complicated. When an urgent status stability problem occurs, from discovering the problem to reporting a work order, and then having the front-line R&D personnel investigate the problem and finally solve the problem, the entire process takes a long time and affects the use. Therefore, there is a technical problem of low status detection efficiency of database products.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method, system and electronic device for detecting the status of a database product, so as to at least solve the technical problem of low efficiency in detecting the status of a database product.

[0005] According to one aspect of an embodiment of the present application, a method for detecting the state of a database product is provided, which is applied to a cloud server, and a database product is deployed on the cloud server. The method may include: obtaining at least one query operation responded to by the database product within a historical detection period; identifying at least one fluctuation query operation in the at least one query operation, wherein the fluctuation query operation is a query operation whose response time exceeds a time threshold in the at least one query operation; determining a state detection index of the database product based on the at least one fluctuation query operation and the at least one query operation, wherein the state detection index is used to characterize the stability state of the database product; if the state detection index is greater than the state detection index threshold, determining that the database product is in an abnormal stability state within the historical detection period.

[0006] According to another aspect of the embodiment of the present application, a state detection method for a database product is also provided, which is applied to a cloud server, and a database product is deployed on the cloud server. The method may include: obtaining at least one query operation responded to by the database product within a historical detection period by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter is at least one query operation; in at least one query operation, identifying at least one fluctuation query operation, wherein the fluctuation query operation is a query whose response time exceeds a time threshold in at least one query operation; determining a state detection index of the database product based on at least one fluctuation query operation and at least one query operation, wherein the state detection index is used to characterize the stability state of the database product; if the state detection index is greater than the state detection index threshold, determining that the database product is in an abnormal stability state within the historical detection period; outputting prompt information of the abnormal stability state by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is prompt information of the abnormal stability state.

[0007] According to another aspect of the embodiment of the present application, a state detection device for a database product is also provided. The device may include: an acquisition unit, configured to acquire at least one query operation to which the database product responds within a historical detection period; a first identification unit, configured to identify at least one fluctuation query operation in the at least one query operation, wherein the fluctuation query operation is a query operation whose response time exceeds a time threshold in the at least one query operation; a first determination unit, configured to determine a state detection index of the database product based on the at least one fluctuation query operation and the at least one query operation, wherein the state detection index is used to characterize the stability state of the database product; and a second determination unit, configured to determine that the database product is in an abnormal stability state within the historical detection period when the state detection index is greater than the state detection index threshold.

[0008] According to another aspect of the embodiment of the present application, a state detection device for a database product is also provided. The device may include: a first calling unit, used to call a first interface to obtain at least one query operation responded by the database product within a historical detection period, wherein the first interface includes a first parameter, and the parameter value of the first parameter is at least one query operation; a second identifying unit, used to identify at least one fluctuation query operation in at least one query operation, wherein the fluctuation query operation is a query whose response time exceeds a time threshold in at least one query operation; a third determining unit, used to determine a state detection index of the database product based on at least one fluctuation query operation and at least one query operation, wherein the state detection index is used to characterize the stability state of the database product; a fourth determining unit, used to determine that the database product is in an abnormal stability state within the historical detection period when the state detection index is greater than the state detection index threshold; a second calling unit, used to call a second interface to output prompt information of an abnormal stability state, wherein the second interface includes a second parameter, and the parameter value of the second parameter is prompt information of an abnormal stability state.

[0009] According to another aspect of the embodiment of the present application, a state detection system for a database product is also provided. The state detection system may include: a client, used to upload a state detection instruction of the database product; a cloud server, used to obtain at least one query operation responded to by the database product within a historical detection period in response to the state detection instruction; in at least one query operation, identifying at least one fluctuation query operation, wherein the fluctuation query operation is a query whose response time exceeds a time threshold in at least one query operation; based on at least one fluctuation query operation and at least one query operation, determining a state detection index of the database product, wherein the state detection index is used to characterize the stability state of the database product; if the state detection index is greater than the state detection index threshold, determining that the database product is in an abnormal stability state within the historical detection period; and returning prompt information of the abnormal stability state to the client.

[0010] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory and a processor, the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, and the computer-executable instructions are executed by the processor to perform steps of a database product status detection method.

[0011] According to another aspect of an embodiment of the present application, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored program, wherein when the program processor runs, the device where the computer storage medium is located is controlled to execute the steps of the database product status detection method.

[0012] According to another aspect of an embodiment of the present application, a computer program product is also provided, including computer instructions, which, when executed by a processor, implement the steps of the status detection method of the database product of the embodiment of the present application.

[0013] In an embodiment of the present application, at least one query operation responded to by a database product within a historical detection period is obtained; among the at least one query operation, at least one fluctuation query operation is identified, wherein the fluctuation query operation is a query operation in which the response time exceeds a time threshold among the at least one query operation; based on the at least one fluctuation query operation and the at least one query operation, a state detection index of the database product is determined, wherein the state detection index is used to characterize the stability state of the database product; if the state detection index is greater than the state detection index threshold, it is determined that the database product is in an abnormal stability state within the historical detection period. That is to say, in the embodiment of the present application, the state detection index is determined based on at least one fluctuation query operation within the historical detection period and at least one query operation within the historical detection period. Therefore, the state detection index can accurately represent the proportion of fluctuation query operations within the historical detection period. Based on this, the state detection index of the database product is compared with the state detection index threshold. If the state detection index is greater than the state detection index threshold, it is determined that the database product is in an abnormally stable state. That is, the embodiment of the present application does not require manual troubleshooting, and uses the state detection index threshold as a data reference. When the state detection index is greater than the state detection index threshold, it can be automatically determined that the database product is in an abnormally stable state, which greatly reduces the troubleshooting time when problems occur in the database product, and provides basic preparation for the automated operation and maintenance of the database product, improves user experience, and thereby solves the technical problem of low state detection efficiency of the database product.

[0014] It is easy to notice that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0016] Figure 1 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a status detection method of a database product according to an embodiment of the present application;

[0017] Figure 2 is a structural block diagram of a computing environment according to an embodiment of the present application;

[0018] Figure 3is a structural block diagram of a service grid according to an embodiment of the present application;

[0019] Figure 4 is a flow chart of a method for detecting a database product according to an embodiment of the present application;

[0020] Figure 5 A method for detecting the status of a database product according to an embodiment of the present application;

[0021] Figure 6 is a schematic diagram of a status detection system for a database product according to an embodiment of the present application;

[0022] Figure 7 This is a schematic diagram of a change in a volatility upper limit multiple with the median of the historical response time of the SQL pattern according to an embodiment of the present application;

[0023] Figure 8 is another schematic diagram of the change of the volatility upper limit multiple with the median of the historical response time of the SQL pattern according to an embodiment of the present application;

[0024] Fig. 9 is a flow chart of a root cause troubleshooting method based on timing correlation according to an embodiment of the present application;

[0025] Fig.10 is a schematic diagram of a state detection device for a database product according to an embodiment of the present application;

[0026] Fig.11 is a schematic diagram of a state detection device for a database product according to an embodiment of the present application;

[0027] Fig.12 It is a structural block diagram of a computer terminal according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0031] Query response time is the time from when a query operation is sent to the database system to when the database system returns the query result corresponding to the query operation;

[0032] The query language mode is used to indicate the mode or wildcard used in the query statement, which is used to match part or all of the text data. Queries with the same query language mode refer to query statements with the same structure and syntax. For example, specific parameters in the query language are replaced with wildcards to make the query language templated.

[0033] Status detection indicators are used to indicate whether the database product is in a stable state;

[0034] The median response time is the response time corresponding to the median of the corresponding values ​​of multiple response times;

[0035] The target abnormality indicator is a query indicator that causes abnormal stability of the database product.

[0036] Example 1

[0037] According to an embodiment of the present application, a method for detecting the status of a database product is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for detecting the status of a database product according to an embodiment of the present application. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0039] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0040] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the state detection method of the database product in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the state detection method of the database product described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0041] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0042] The display may be, for example, a touch screen liquid crystal display (LCD), which enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0043] Figure 1 The hardware structure block diagram shown can be used not only as an exemplary block diagram of the above-mentioned computer terminal 10 (or mobile device), but also as an exemplary block diagram of the above-mentioned server. In an optional embodiment, Figure 2 The block diagram shows the use of the above Figure 1 The computer terminal 10 (or mobile device) shown is an embodiment of a computing node in the computing environment 201. Figure 2 A structural block diagram of a computing environment is shown, such as Figure 2 As shown, computing environment 201 includes multiple computing nodes (such as servers) running on a distributed network (shown as 210-1, 210-2, ..., in the figure). The computing nodes all contain local processing and memory resources, and end users 202 can remotely run applications or store data in computing environment 201. Applications can be provided as multiple services 220-1, 220-2, 220-3 and 220-4 in computing environment 201, representing services "A", "D", "E" and "H" respectively.

[0044] The end user 202 can provide and access services through a web browser or other software application on the client, and in some embodiments, the end user 202's provision and / or request can be provided to the entry gateway 230. The entry gateway 230 can include a corresponding agent to handle the provision and / or request for the service (one or more services provided in the computing environment 201).

[0045] Services are provided or deployed based on various virtualization technologies supported by the computing environment 201. In some embodiments, services can be provided based on virtual machine (VM)-based virtualization, container-based virtualization, and / or similar methods. Virtual machine-based virtualization can be to simulate a real computer by initializing a virtual machine, and execute programs and applications without directly contacting any actual hardware resources. While the virtual machine virtualizes the machine, according to container-based virtualization, a container can be started to virtualize the entire operating system (Operating System, referred to as OS) so that multiple workloads can run on a single operating system instance.

[0046] In an embodiment based on container virtualization, several containers of a service can be assembled into a Pod (e.g., a Kubernetes Pod). Figure 2 As shown, service 220-2 can be equipped with one or more Pods 240-1, 240-2, ..., 240-N (collectively referred to as Pods). Pods can include a proxy 245 and one or more containers 242-1, 242-2, ..., 242-M (collectively referred to as containers). One or more containers in a Pod process requests related to one or more corresponding functions of the service, and the proxy 245 generally controls network functions related to the service, such as routing, load balancing, etc. Other services can also be equipped with Pods similar to Pods.

[0047] During operation, executing a user request from end user 202 may require invoking one or more services in computing environment 201, and executing one or more functions of a service may require invoking one or more functions of another service. Figure 2 As shown, service "A" 220-1 receives a user request from end user 202 from ingress gateway 230, service "A" 220-1 may call service "D" 220-2, and service "D" 220-2 may request service "E" 220-3 to perform one or more functions.

[0048] The computing environment described above can be a cloud computing environment, where the allocation of resources is managed by the cloud service provider, allowing the development of functions without considering the implementation, adjustment or expansion of servers. The computing environment allows developers to execute code in response to events without building or maintaining complex infrastructure. Services can be divided into a set of functions that can be automatically and independently scaled, rather than expanding a single hardware device to handle potential loads.

[0049] In another optional embodiment, Figure 3 The block diagram shows the use of the above Figure 1 The computer terminal 10 (or mobile device) is shown as an embodiment of the service grid. Figure 3 A structural diagram of a service grid is shown, Figure 3 As shown, the service grid 300 is mainly used to facilitate secure and reliable communication between multiple microservices. Microservices refer to decomposing an application into multiple smaller services or instances and distributing them on different clusters / machines.

[0050] like Figure 3 As shown, the microservice may include an application service instance A and an application service instance B, which form a functional application layer of the service grid 300. In one embodiment, the application service instance A runs in a machine / workload container group 314 (Pod) in the form of a container / process 308, and the application service instance B runs in a machine / workload container group 316 (Pod) in the form of a container / process 310.

[0051] In one embodiment, application service instance A may be for obtaining at least one query operation responded to by a database product within a historical detection period and identifying at least one fluctuation query operation in at least one query operation; application service instance B may be for determining a status detection indicator of a database product based on at least one fluctuation query operation and at least one query operation.

[0052] like Figure 3 As shown, application service instance A and grid proxy (sidecar) 303 coexist in machine workload container group 614, and application service instance B and grid proxy 305 coexist in machine workload container 314. Grid proxy 303 and grid proxy 305 form the data plane layer (data plane) of service grid 300. Grid proxy 303 and grid proxy 305 run in the form of container / process 304 and container / process 306 respectively, and can receive request 312 for commodity query service, and grid proxy 303 and application service instance A can communicate bidirectionally, and grid proxy 305 and application service instance B can communicate bidirectionally. In addition, grid proxy 303 and grid proxy 305 can also communicate bidirectionally.

[0053] In one embodiment, the traffic of application service instance A is routed to a suitable destination through grid proxy 303, and the network traffic of application service instance B is routed to a suitable destination through grid proxy 305. It should be noted that the network traffic mentioned here includes but is not limited to Hyper Text Transfer Protocol (HTTP), Representational State Transfer (REST), high-performance, general open source framework (google Remote Procedure Call, gRPC), open source in-memory data structure storage system (Redis), etc.

[0054] In one embodiment, the function of extending the data plane layer can be realized by writing a custom filter for the proxy (Envoy) in the service grid 300. The service grid proxy configuration can be to enable the service grid to correctly proxy service traffic and realize service intercommunication and service governance. The grid proxy 303 and the grid proxy 305 can be configured to perform at least one of the following functions: service discovery, health checking, routing, load balancing, authentication and authorization, and observability.

[0055] like Figure 3 As shown, the service grid 300 also includes a control plane layer. The control plane layer can be a group of services running in a dedicated namespace, and these services are hosted by a hosting control plane component 301 in a machine / workload container group (machine / Pod) 302. Figure 3 As shown, the managed control plane component 301 performs bidirectional communication with the grid agent 303 and the grid agent 305. The managed control plane component 301 is configured to perform some control and management functions. For example, the managed control plane component 301 receives telemetry data transmitted by the grid agent 303 and the grid agent 305, and can further aggregate the telemetry data. For these services, the managed control plane component 301 can also provide a user-oriented application programming interface (Application Programming Interface, referred to as API) to more easily manipulate network behavior and provide configuration data to the grid agent 303 and the grid agent 305.

[0056] Under the above operating environment, this application provides Figure 4 The database product detection method shown is applied to a cloud server on which the database product is deployed. Figure 4 FIG. 1 is a flow chart of a method for detecting a database product according to an embodiment of the present application. Figure 4 As shown, the method may include the following steps:

[0057] Step S401, obtaining at least one query operation responded to by a database product within a historical detection time period.

[0058] In the technical solution provided in the above step S401 of the present application, the database product includes query objects corresponding to multiple query operations. For example, the database product can be a database system or a database cluster, which is not specifically limited here; at least one query operation can be a total query on the database product within a historical detection time period, wherein the query operation can be an operation of retrieving and obtaining data from the database product through a query statement, and at least one query operation can be executed through Structured Query Language (SQL); the historical detection time period is used to indicate a period of time in the past, and the length of the historical detection time period can be pre-set, for example, the historical detection time period can be the past minute, the past hour, etc., which is not specifically limited here.

[0059] In this embodiment, the historical query records of the database product can be used to obtain at least one query operation that the database product responds to within the historical detection time period, wherein at least one query operation corresponds to a query response time, and the query response time is used to indicate the time from when the query operation is sent to the database product to when the database product returns the query result corresponding to the query operation.

[0060] For example, you can query the logs of a database product or use a detection tool to obtain the query operations that the database product responds to and the query response time corresponding to the query operations.

[0061] Step S402, identifying at least one fluctuation query operation in at least one query operation.

[0062] In the technical solution provided by the above step S402 of the present application, it can be known from the introduction of step S401 that at least one query operation corresponds to a query response time. Based on this, after obtaining at least one query operation responded by the database product within the historical detection time period, at least one fluctuating query operation can be identified according to the query response time corresponding to the at least one query operation. Among them, the fluctuating query operation is a query operation in which the response time exceeds the time threshold in at least one query operation, wherein the response time can also be referred to as the query response time, the query execution time, etc., which is not specifically limited here. The time threshold can be determined according to the historical query response time of the historical query operation that matches the query pattern of the query operation, wherein the query pattern is used to indicate the pattern corresponding to the query language of the query operation, for example, the structured query language pattern (StructuredQuery Language pattern, referred to as SQL pattern), wherein the query type of the above query operation is the same as the query type of the historical query operation, including parameters under the same SQL pattern, which can be replaced by wildcards.

[0063] In this embodiment, the query response time corresponding to at least one query operation is compared with a time threshold. In response to the query response time of a certain query operation in at least one query operation exceeding the time threshold, the query operation is determined to be a fluctuating query operation. According to this method, at least one fluctuating query operation can be identified in at least one query operation.

[0064] Optionally, for each query operation within the historical detection time period, the SQL mode corresponding to the query operation can be determined, and then multiple historical response times corresponding to the query operation with the same SQL mode in the time period before the historical detection period can be determined, and then the target response time can be determined based on the multiple historical response times, wherein the target response time can be any one of the average response time, median response time, maximum response time, etc. of the multiple historical response times, and no specific restrictions are made here. After determining the target response time, the target response time can be multiplied by the fluctuation upper limit multiplier to obtain a time threshold. After determining the time threshold, the query response time of the query operation can be compared with the time threshold. If the query response time of the query operation is greater than the time threshold, the query operation is determined to be a fluctuation query operation, wherein the fluctuation upper limit multiplier can be preset, for example, the fluctuation upper limit multiplier can be 2, and no specific restrictions are made here.

[0065] For example, assuming that the fluctuation upper limit multiplier is 2, when the query response time of a query operation exceeds twice the median of the historical response time of query operations with the same SQL pattern as the query operation in the period before the historical detection period, the query operation is determined to be a fluctuation query operation.

[0066] Step S403: determining a status detection index of a database product based on at least one fluctuation query operation and at least one query operation.

[0067] In the technical solution provided in the above step S403 of the present application, after determining at least one fluctuation query operation, a state detection index of the database product can be determined based on at least one fluctuation query operation and at least one query operation, wherein the state detection index is used to characterize the stability state of the database product. For example, the state detection index can be a response time volatility index, which can be used to represent the query response time volatility, wherein the query response time volatility can be the ratio of the number of fluctuation queries in the historical detection time period to the total number of queries in the database product.

[0068] In this embodiment, at least one fluctuation query operation is used to indicate a query operation whose query response time exceeds a time threshold among at least one query operation responded to by the database product within the historical detection period, and at least one query operation is used to indicate the total query operations responded to by the database product within the historical detection time period. Based on this, the status detection index of the database product can be determined according to the ratio of the number of at least one fluctuation query operation within the historical detection time period to the number of at least one query operation, that is, the query response time fluctuation rate of the database product is determined, and then the stability state of the database product within the historical detection time period is determined according to the fluctuation rate.

[0069] Step S404: if the state detection index is greater than the state detection index threshold, it is determined that the database product is in an abnormal stability state during the historical detection period.

[0070] In the technical solution provided in the above step S404 of the present application, after determining the state detection index of the database product, the state detection index can be compared with the state detection index threshold to determine the stability state of the database product in the historical time period. Among them, the state detection index threshold is a judgment threshold for judging whether the database product is in an abnormal stability state. The specific value of the state detection index threshold can be preset and is not specifically limited here.

[0071] In this embodiment, if the state detection index is greater than the state detection index threshold, it is determined that the database product is in an abnormal stability state during the historical detection period.

[0072] For example, assuming that the state detection index threshold is 20%, that is, when the ratio of the number of fluctuation query operations to the total number of queries in the historical detection period is greater than 20%, it means that the database product is in an abnormal stability state. As can be seen from the introduction of the aforementioned step S403, the state detection index of the database product can be the query response time fluctuation rate of the database product in the historical detection period, that is, the ratio of the number of at least one fluctuation query operation to the number of at least one query operation in the historical detection period. Based on this, the state detection index of the database product can be compared with the state detection index threshold of 20%. If the state detection index is greater than 20%, it means that the state detection index of the database product is greater than the state detection index threshold, and it can be determined that the database product is in an abnormal stability state. On the contrary, if the state monitoring index is less than 20%, it means that the state detection index of the database product is not greater than the state detection index threshold, that is, the database product is in a normal stability state.

[0073] Based on step S401 to step S404 of the above embodiment, the state detection index is determined based on at least one fluctuation query operation and at least one query operation in the historical detection period. Therefore, the state detection index can accurately represent the proportion of fluctuation query operations in the historical detection period. Based on this, the state detection index of the database product is compared with the state detection index threshold. If the state detection index is greater than the state detection index threshold, it can be determined that the database product is in an abnormally stable state. That is, there is no need for manual troubleshooting. The state detection index threshold is used as a data reference. When the state detection index is greater than the state detection index threshold, it can be automatically determined that the database product is in an abnormally stable state, which greatly reduces the troubleshooting time when problems occur in the database product, and provides basic preparation for the automated operation and maintenance of the database product, improves user experience, and thereby solves the technical problem of low state detection efficiency of the database product.

[0074] The above method of this embodiment is further introduced below.

[0075] As an optional implementation, step S403 determines the status detection index of the database product based on at least one waveform query operation and at least one query operation, including: counting the number of fluctuation queries that perform the fluctuation query operation, and the total number of queries that perform the query operation; determining the proportion of the number of fluctuation queries to the total number of queries; and using the proportion as the status detection index of the database product.

[0076] In this embodiment, at least one fluctuation query operation is used to indicate the query operation whose query response time exceeds the time threshold among at least one query operation responded by the database product in the historical detection period, and at least one query operation is used to indicate the total query operation responded by the database product in the historical detection period. Based on this, the number of fluctuation queries executed by the database product in the historical period and the total number of queries executed by the query operation can be counted. Afterwards, the ratio of the number of fluctuation queries executed in the historical period to the total number of queries executed can be determined, and the ratio is used as the status detection indicator of the database product, that is, the status detection indicator is the query response time fluctuation rate in the historical detection period.

[0077] For example, assuming that the historical detection period is the past 1 minute, within the past 1 minute, the number of fluctuation queries responded to by the database product is 10, and the number of all query operations responded to is 50. Since the ratio between the number of fluctuation queries and the total number of queries is 20%, that is, within the past 1 minute, the number of fluctuation queries of the database product accounts for 20% of the total number of queries. Based on this, 20% can be determined as the status detection indicator of the database product, that is, the query response time volatility in the past 1 minute is 20%.

[0078] As an optional implementation, the status detection method of the database product further includes: if the proportion is greater than a preset proportion threshold, determining that the status detection index is greater than the status detection index threshold, wherein the status detection index threshold includes the proportion threshold.

[0079] In this embodiment, the proportion threshold is a data parameter for measuring whether the state detection index of the database product is greater than the state detection index threshold. Based on this, after determining the proportion of the number of fluctuation queries in the database product during the historical detection period to the total number of queries, the proportion can be compared with the preset proportion threshold. If the proportion is greater than the proportion threshold, it can be determined that the state detection index is greater than the state detection index threshold.

[0080] Optionally, if the proportion of the number of fluctuation queries in the database product to the total number of queries during the historical detection period is not greater than a proportion threshold, it can be determined that the state detection index is not greater than the state detection index threshold.

[0081] As an optional implementation, the status detection method of a database product further includes: determining a query pattern matched by at least one query operation; and determining a time threshold based on the query pattern.

[0082] In this embodiment, the query operation can be performed through a query language, and the query language corresponds to different query modes. Based on this, after determining at least one query operation to which the database product responds within a historical period, the query mode matched by the query operation can be determined based on the query language corresponding to at least one query operation. Different query modes correspond to different time thresholds. Based on this, after determining the query mode corresponding to the query operation, the corresponding time threshold can be determined based on the query mode. Among them, the time threshold corresponding to a query mode can be determined based on the median of the query response time of the query operation of the query mode in a period of time before the historical detection period.

[0083] For example, the query language may be SQL, and the query pattern corresponding to the SQL language may be SQLpattern, where SQL Pattern is used to indicate the result obtained after the SQL language is templated. The SQL pattern corresponding to each query operation in the historical detection period may be determined based on the SQL language corresponding to the query operation, and then the time threshold corresponding to the corresponding query operation may be obtained based on the SQL pattern.

[0084] As an optional implementation, determining a time threshold based on a query pattern includes: obtaining at least one historical query operation of a database product that matches the query pattern within a preset period before a historical detection period; determining a historical response time of the historical query operation; and determining a time threshold based on the historical response time.

[0085] In this embodiment, based on different application scenarios, the data source range and accuracy of the time threshold statistics may be different. For example, the preset time period may be one week, half a month, one month, etc. before the historical detection period, and no specific limitation is made here. At least one historical query operation matching the query pattern may be a query operation corresponding to a query pattern similar to or identical to the query pattern within the preset time period. The historical response time may be the query response time of at least one historical query matching the query pattern within the preset time period.

[0086] For example, taking the preset period as one week before the historical detection period, assuming that the query pattern is SQLpattern, the query response time of multiple historical queries corresponding to the same or similar SQLpattern as the SQL pattern in the past week can be determined based on the SQL pattern, and the determined query response time is used as the historical response time corresponding to the query operation of the SQLpattern. After determining the historical response time of the historical query matching the SQL pattern, the time threshold can be determined based on the historical response time.

[0087] As an optional implementation, determining a time threshold based on historical response time includes: determining a target response time based on multiple historical response times corresponding to multiple historical query operations, wherein the target response time is used to describe the overall statistical results of multiple historical response times; determining a time threshold based on the target response time.

[0088] In this embodiment, after determining the historical response times of multiple historical query operations matching the query pattern, the target response time can be further determined based on the multiple historical response times corresponding to the multiple historical query operations. The target response time can be any one of the median response time of multiple historical response times, the average response time of multiple historical response times, the response time corresponding to the percentile of multiple historical response times (for example, P80 of multiple historical response times), and the maximum response time of multiple historical response times. No specific limitation is imposed on the determination of the target response time.

[0089] For example, the median response time can be determined according to the median of multiple historical response times; the average response time can be determined according to the average of multiple historical response times; the P80 of multiple historical response times can be determined according to the 80th percentile of multiple historical response times, that is, according to 80% of the multiple historical response times; the maximum response time can be determined according to the maximum value of multiple historical response times. The target response time can also be one of the above response times, or other response time other than the above response times, and no specific limitation is made here.

[0090] As an optional implementation, determining a time threshold based on a target response time includes: determining an adjustment parameter based on the target response time, wherein the adjustment parameter is used to represent a multiple of an adjustment to the target response time; adjusting the target response time according to the adjustment parameter; and determining the adjusted target response time as the time threshold.

[0091] In this embodiment, the adjustment parameter is used to indicate the multiple of the target response time adjustment, for example, the fluctuation upper limit multiple of the fluctuation query operation. Since the query operation responded to by the database product may be a short query or a long query. Among them, short queries are usually used to indicate fast and simple database query operations, and the corresponding query response time is short, while long queries are usually used to indicate complex and time-consuming database query operations, and the corresponding query response time is long. Based on this, in order to avoid misjudgment of fluctuations, a larger fluctuation range can be set for short query operations with short query response times, that is, a larger adjustment parameter is set for query operations with short query times, and a shorter fluctuation range is set for long query operations with long query times, that is, a smaller adjustment parameter is set for query operations with long query times. Among them, the adjustment parameter can be determined by the target response time of the query operation. For example, the target response time can be the median of the historical response time of historical query operations consistent with the query mode of the query operation.

[0092] For example, assuming that the fluctuation upper limit multiple is y times, the target response time can be adjusted according to the fluctuation upper limit multiple y. For example, the target response time can be multiplied by the fluctuation upper limit multiple to obtain the adjusted target response time, and the adjusted target response time is determined as the time threshold. For example, assuming that the fluctuation upper limit multiple is 2, then 2 times the target response time can be determined as the time threshold.

[0093] For example, the adjustment parameter may be determined by a weighted function of the following function.

[0094] y = e^-(Same as SQL_Pattern historical response time median / 200-2)+2

[0095] Among them, y can be used to represent an adjustment parameter, and the median historical response time of the same SQL pattern can be used to indicate the median historical response time of historical query operations in the period before the historical detection period, wherein the query pattern of the historical query operations in the period before the historical detection period is consistent with the query pattern of the query operations in the historical detection period.

[0096] As an optional implementation, the state detection method of the database product further includes: determining a target abnormality indicator of the database product based on a state detection indicator corresponding to the abnormal stability state, wherein the target abnormality indicator is used to put the database product in an abnormal stability state.

[0097] In this embodiment, as can be seen from the above introduction, when the state detection indicator is greater than the state detection indicator threshold, it is determined that the database product is in an abnormal stability state. When the database product continues to be in an abnormal stability state, it can be determined that there are abnormal indicators in the database product. The target abnormal indicator of the database product can be determined based on the state detection indicator corresponding to the abnormal stability state.

[0098] For example, when a database product is in an abnormal stability state, the target abnormality indicator of the database product can be determined based on the state detection indicator in the abnormal stability state. The target abnormality indicator is the root cause of the abnormality of the database product. By determining the target abnormality indicator in the database product, the root cause of the abnormality of the database product can be found out.

[0099] As an optional implementation, based on a state detection indicator corresponding to an abnormal stability state, a target abnormal indicator of a database product is determined, including: based on the state detection indicator, determining an abnormal period in which the database product is in an abnormal stability state within a historical detection period; based on the abnormal period, determining a period to be tested for a target abnormal indicator; determining the period to be tested as a historical detection period, and returning to execute from the following steps to obtain the state detection indicator within the period to be tested: obtaining at least one query operation to which the database product responds within the historical detection period; and determining a target abnormal indicator based on the state detection indicator within the period to be tested.

[0100] In this embodiment, the state detection index is used to indicate the stability state of the database product, and the state detection index is obtained through the fluctuation query operation and the total query operation within the historical detection period. Based on this, when it is determined that the database product is in an abnormal stability state within the historical period based on the state detection index, the abnormal time period when the database product has an abnormal stability state can be further determined. The abnormal time period is used to indicate the time interval of the abnormal fluctuation of the response time corresponding to the fluctuation query operation of the database product.

[0101] Optionally, after determining the abnormal period in which the database product has an abnormal stability state, the start time of the fluctuation anomaly can be further determined, wherein the start time of the fluctuation anomaly is the time when the database product responds to the fluctuation query operation. After determining the start time of the fluctuation anomaly, the start time of the fluctuation anomaly can be used as the basis to extend forward for a period of time, for example, it can be extended forward for 30 minutes, and no specific restrictions are made here. For the convenience of explanation, the time period extended forward can be called the leading time period, based on which, the time period composed of the abnormal period and the leading time period can be determined as the time period to be tested, that is, the time range to be tested.

[0102] Optionally, after the period to be tested is determined, the period to be tested may be determined as a historical detection period, and the aforementioned steps S401 to S403 are performed to obtain the state detection index within the period to be tested.

[0103] Optionally, after determining the state detection index in the time period to be tested, the target abnormality index of the database product may be determined according to the state detection index in the time period to be tested.

[0104] As an optional implementation, based on the state detection indicator within the time period to be tested, determining the target abnormality indicator includes: obtaining candidate abnormality indicators of the database product within the time period to be tested, wherein the candidate abnormality indicator is an indicator to be determined that puts the database product in an abnormal stability state; obtaining the correlation between the state detection indicator within the time period to be tested and the candidate abnormality indicator, wherein the correlation is used to indicate the degree of correlation between the state detection indicator within the time period to be tested and the candidate abnormality indicator; in response to the correlation being greater than a correlation threshold, determining the candidate abnormality indicator as a target abnormality indicator, wherein the target abnormality indicator is used to put the database product in an abnormal stability state.

[0105] In this embodiment, the candidate abnormality indicator is an indicator to be determined that puts the database product in an abnormal stability state, wherein the candidate abnormality indicator may be a core indicator of the database product, based on which the candidate abnormality indicator of the database product in the time period to be tested may be obtained, and then the correlation between the state detection indicator in the time period to be tested and the candidate abnormality indicator may be obtained, and then the correlation may be compared with the correlation threshold, and in response to the correlation being greater than the correlation threshold, the candidate abnormality indicator may be determined as the target abnormality indicator. The correlation threshold may be preset, for example, the correlation threshold may be 0.8, which is further exemplified here.

[0106] For example, the candidate anomaly indicator may be an anomaly correlation indicator of a cluster, which may include pattern-level indicators, scanned data volume, memory usage, transmitted data volume, Java Virtual Machine (JVM) memory usage rate, Java Virtual Machine Garbage Collection (JVM GC) time, network rewrite rate, amount of written data per unit time (Transactions Per Second, TPS), etc., without specific limitation here.

[0107] As an optional implementation, obtaining the correlation between the state detection index and the candidate abnormality index within the test period includes: obtaining a first feature vector of the state detection index; obtaining a second feature vector of the candidate abnormality index; and determining the similarity between the first feature vector and the second feature vector as the correlation.

[0108] In this embodiment, the detection period corresponding to the state detection indicator is the same as the detection period corresponding to the candidate abnormal indicator, so the number of data points corresponding to the two is also the same, and the two state detection indicators can be equated with two feature vectors. For the convenience of explanation, the feature vector corresponding to the state detection indicator can be called the first feature vector, and the feature vector corresponding to the candidate abnormal indicator can be called the second feature vector, and then the similarity between the first feature vector and the second feature vector is calculated, and the similarity is determined as the correlation between the state detection indicator and the candidate abnormal indicator in the test period.

[0109] For example, the similarity between the first feature vector and the second feature vector may be determined by using a cosine similarity algorithm, which is merely an illustrative example and does not limit the process of determining the similarity between the first feature vector and the second feature vector.

[0110] As an optional implementation, obtaining a first characteristic vector of a state detection indicator includes: normalizing the state detection indicator to obtain a first characteristic vector; obtaining a second characteristic vector of a candidate abnormality indicator includes: normalizing the candidate abnormality indicator to obtain a second characteristic vector.

[0111] In this embodiment, when obtaining the first feature vector of the state detection indicator, the state detection indicator can be normalized to obtain the first feature vector. Similarly, when obtaining the second feature vector of the candidate abnormality indicator, the second feature vector of the candidate abnormality indicator can be normalized to obtain the second feature vector.

[0112] For example, the state detection index can be normalized by z-score normalization to obtain the first eigenvector, and the candidate abnormality index can be normalized to obtain the second detection index. It should be noted that the z-score normalization method is used to normalize the state detection index and the candidate abnormality index to have a mean of 0, a variance of 1, and a mean of 0, which can facilitate the subsequent calculation of the similarity between the first eigenvector of the state detection index and the second eigenvector of the candidate abnormality index.

[0113] As an optional implementation, based on the abnormal period, determining the test period of the target abnormal indicator includes: determining a preceding period before the start time of the abnormal period; and determining the abnormal period and the preceding period as the test period.

[0114] In this embodiment, as can be seen from the above introduction, the start time of the abnormal period is the time when the database product responds to the fluctuation query, and the preceding period before the start time of the abnormal period can be a period of time extended forward based on the start time of the abnormal period, for example, 30 minutes extended forward, and no specific restrictions are made here. After obtaining the preceding period, since the abnormal period and the preceding period are two adjacent periods, based on this, the period composed of the abnormal period and the preceding period can be determined as the period to be tested.

[0115] As an optional implementation, based on the state detection indicator, the target abnormality indicator of the database product is determined, including: inputting the state detection indicator into a machine learning model for prediction to obtain the target abnormality indicator, wherein the machine learning model is trained based on state detection indicator samples and abnormal indicator samples of the database product, the state detection indicator samples are used to characterize the abnormal stability state of the database product, and the abnormal indicator samples are used to make the database product be in the abnormal stability state corresponding to the state detection indicator samples.

[0116] In this embodiment, when determining the target abnormality index of the database product based on the state detection index, the target abnormality index of the database product can be predicted by a machine learning model.

[0117] For example, the machine learning model is a model that has been pre-trained based on abnormal indicator samples when different database products are in an abnormal stability state. Based on the machine learning model, the abnormal indicators of the database products can be predicted. Based on this, the state detection indicators can be input into the machine learning model to automatically predict the target abnormal indicators of the database products.

[0118] In the above steps, the state detection index is determined based on at least one fluctuation query operation in the historical detection period and at least one query operation in the historical detection period. Therefore, the state detection index can accurately represent the proportion of fluctuation query operations in the historical detection period. Based on this, the state detection index of the database product is compared with the state detection index threshold. If the state detection index is greater than the state detection index threshold, it can be determined that the database product is in an abnormally stable state. That is, there is no need for manual investigation. The state detection index threshold is used as a data reference. When the state detection index is greater than the state detection index threshold, it can be automatically determined that the database product is in an abnormally stable state, which greatly reduces the investigation time when problems occur in the database product, and provides basic preparation for the automated operation and maintenance of the database product, improves user experience, and thereby solves the technical problem of low state detection efficiency of the database product.

[0119] In the above operating environment, this application also provides Figure 5The database product status detection method shown is applied to a cloud server on which the database product is deployed. Figure 5 A method for detecting the status of a database product according to an embodiment of the present application is provided. Figure 5 As shown, the method may include the following steps:

[0120] Step 501: Obtain at least one query operation responded by a database product within a historical detection period by calling a first interface.

[0121] In the technical solution provided in the above step S501 of the present application, the first interface may be an interface for data interaction between the cloud server and the client, and the server may obtain at least one query operation responded to by the database product within the historical detection period by calling the first interface. The at least one query operation is used to indicate all query operations responded to by the database product within the historical detection period.

[0122] Step S502, identifying at least one fluctuation query operation in at least one query operation.

[0123] In the technical solution provided in the above step S502 of the present application, at least one query operation corresponds to a query response time. Based on this, after obtaining at least one query operation responded by the database product within the historical detection time period, at least one fluctuating query operation can be identified according to the query response time corresponding to the at least one query operation, wherein the fluctuating query operation is a query operation in which the response time exceeds a time threshold in at least one query operation, wherein the response time may also be referred to as a query response time, a query execution time, etc., without specific limitation herein, wherein the time threshold may be determined according to the historical query response time of historical query operations that match the query pattern of the query operation, wherein the query pattern is used to indicate a pattern corresponding to the query language of the query operation, for example, a structured query language pattern SQL pattern.

[0124] Step S503: determining a status detection index of a database product based on at least one fluctuation query operation and at least one query operation.

[0125] In the technical solution provided in the above step S503 of the present application, after determining at least one fluctuation query operation, a state detection index of the database product can be determined based on at least one fluctuation query operation and at least one query operation, wherein the state detection index is used to characterize the stability state of the database product. For example, the state detection index can be a query response time volatility, wherein the query response time volatility can be the ratio of the number of fluctuation queries in the historical detection time period to the total number of queries in the database product.

[0126] Step S504: if the state detection index is greater than the state detection index threshold, it is determined that the database product is in an abnormal stability state during the historical detection period.

[0127] In the technical solution provided in the above step S504 of the present application, after determining the state detection index of the database product, the state detection index can be compared with the state detection index threshold to determine the stability state of the database product in the historical time period. Among them, the state detection index threshold is a judgment threshold for judging whether the database product is in an abnormal stability state. The specific value of the state detection index threshold can be preset and is not specifically limited here.

[0128] In this embodiment, if the state detection index is greater than the state detection index threshold, it is determined that the database product is in an abnormal stability state during the historical detection period. The specific implementation method can refer to the above step S404, which will not be repeated here.

[0129] Step S505: outputting prompt information of the abnormal stable state by calling the second interface.

[0130] In the technical solution provided in the above step S505 of the present application, the second interface can be an interface for data interaction between the cloud server and the client. After determining the stability status of the database product, if the database product is in an abnormal stability state, the cloud server can output prompt information of the abnormal stability status of the database product to the client through the second interface for display, so that the user can check the cause of the abnormality according to the content displayed by the client.

[0131] In the technical solution provided by the above steps S501 to S505 of the present application, the stability state of the database product is judged by the state detection index. Since the state detection index is determined based on at least one fluctuation query operation and at least one query operation in the historical detection period, the state detection index can accurately represent the proportion of fluctuation query operations in the historical detection period. Based on this, the state detection index of the database product is compared with the state detection index threshold. If the state detection index is greater than the state detection index threshold, it is determined that the database product is in an abnormally stable state. That is, there is no need for manual troubleshooting. The state detection index threshold is used as a data reference. When the state detection index is greater than the state detection index threshold, it can be automatically determined that the database product is in an abnormally stable state, which greatly reduces the troubleshooting time when problems occur in the database product, and provides basic preparation for the automated operation and maintenance of the database product, improves user experience, and thereby solves the technical problem of low state detection efficiency of the database product.

[0132] Figure 66 is a schematic diagram of a database product status detection system according to an embodiment of the present application. The database product status detection system 600 may include a client 601 and a cloud server 602 .

[0133] The client 601 is used to upload the status detection instruction of the database product.

[0134] In this embodiment, the status detection instruction is used to instruct the detection database product to detect at least one query operation responded to within a historical detection period. The status detection instruction can be input into the client by the user and uploaded to the cloud server through the client.

[0135] Cloud server 602 is used to respond to a status detection instruction and obtain at least one query operation responded by a database product within a historical detection period; in at least one query operation, identify at least one fluctuation query operation, wherein the fluctuation query operation is a query in which the response time exceeds a time threshold in at least one query operation; based on at least one fluctuation query operation and at least one query operation, determine a status detection indicator of the database product, wherein the status detection indicator is used to characterize the stability state of the database product; if the status detection indicator is greater than the status detection indicator threshold, determine that the database product is in an abnormal stability state within the historical detection period; and return prompt information of the abnormal stability state to the client.

[0136] In this embodiment, after responding to the status detection instruction sent by the client, the cloud server can obtain at least one query operation responded by the database product within the historical detection period according to the status detection instruction, wherein the at least one query operation is all query operations responded by the database product within the historical detection period. After obtaining at least one query operation responded by the database product within the historical detection period, at least one fluctuation query operation can be identified in the at least one query operation, wherein the fluctuation query operation is a query whose response time exceeds the time threshold in the at least one query operation. Based on the at least one fluctuation query operation and the at least one query operation, the status detection index of the database product can be determined. If the status detection index is greater than the status detection index threshold, it is determined that the database product is in an abnormal stability state within the historical detection period. After determining that the database product is in an abnormal stability state, a prompt information of the abnormal stability state can be returned to the client, so that the user can troubleshoot the cause of the abnormality of the database product according to the abnormal stability state.

[0137] The technical solution of the embodiment of the present application is further introduced below with examples in combination with the preferred implementation manner.

[0138] At present, the stability issues of database products with a large number of customers are very complicated. When an urgent stability problem occurs, from the customer discovering the problem to reporting the work order, to the front-line R&D personnel troubleshooting the problem, and finally solving the problem, the entire process takes a long time and affects the use. Therefore, there is a technical problem of low detection efficiency of database products.

[0139] However, the present application provides a state detection method for a database product, which obtains at least one query operation responded to by the database product within a historical detection period; in the at least one query operation, identifies at least one fluctuation query operation, wherein the fluctuation query operation is a query operation in which the response time exceeds a time threshold in the at least one query operation; based on the at least one fluctuation query operation and the at least one query operation, determines a state detection index of the database product, wherein the state detection index is used to characterize the stability state of the database product; if the state detection index is greater than the state detection index threshold, it is determined that the database product is in an abnormal stability state within the historical detection period. That is to say, in the embodiment of the present application, the state detection index is determined based on at least one fluctuation query operation within the historical detection period and at least one query operation within the historical detection period. Therefore, the state detection index can accurately represent the proportion of fluctuation query operations within the historical detection period. Based on this, the state detection index of the database product is compared with the state detection index threshold. If the state detection index is greater than the state detection index threshold, it can be determined that the database product is in an abnormally stable state. That is, there is no need for manual troubleshooting. The state detection index threshold is used as a data reference. When the state detection index is greater than the state detection index threshold, it can be automatically determined that the database product is in an abnormally stable state, which greatly reduces the troubleshooting time when problems occur in the database product, and provides basic preparation for the automated operation and maintenance of the database product, improves user experience, and thereby solves the technical problem of low state detection efficiency of the database product.

[0140] Next, the query response time volatility is further introduced.

[0141] In this embodiment, in order to automatically discover the abnormality of the database product, it is necessary to set an abnormality judgment indicator. The field judgment indicator should not be too detailed to avoid only discovering some local problems, nor too rough to avoid causing a large number of misjudgments. Since the query response time volatility is an indicator that users can directly feel, based on this, the query response time volatility is used as the abnormality judgment indicator. Among them, the database product can be a database cluster, which is not specifically limited here.

[0142] The query response time volatility is calculated by the query response time of the query pattern (e.g., SQL pattern) of the query operation within a period of time and the historical response time of the query pattern. When the execution time of a query operation exceeds y times the median of the historical response time of the query operation consistent with the SQL pattern of the query operation, the query operation can be positioned as a fluctuating query.

[0143] The query response time fluctuation rate of database products is defined as the ratio of the number of fluctuating queries to the total number of queries in the system over the past period of time (the default is 1 minute), and this is used to determine whether the system is currently in an abnormal state. By default, 20% is used as the threshold for determining whether it is abnormal. That is, when 20% of the queries have response time fluctuations in the past minute, the algorithm will automatically determine that the system is currently in an abnormal state, and the next actions may include telephone alarms, automatic fault reporting, etc.

[0144] Next, the method for determining the upper limit of volatility will be further introduced.

[0145] In this embodiment, the volatility upper limit multiplier can be set to a fixed value, such as 2. However, a fixed value can only adapt to some situations. For example, if the volatility upper limit multiplier is fixed to 2, when the query response time exceeds 2 times the median historical response time of the query SQL pattern, it will be judged as a fluctuating query. This is suitable for queries with longer execution times, but there are often a large number of short queries in database products. When a query with a historical median response time of only 10ms encounters some factors that cause it to fluctuate to more than 20ms, it does not mean that its fluctuation is an abnormality, otherwise a large number of fluctuation misjudgments will appear in the database product. Therefore, it is necessary to give queries with shorter response times a larger normal fluctuation range to avoid misjudgments, and set a basically reasonable fluctuation upper limit for larger queries. Among them, large queries can be the process of querying and analyzing a large amount of data, which usually involves data in large databases or data warehouses, and requires the use of complex query languages ​​and technologies to process and analyze large amounts of data.

[0146] Optionally, for large queries, if the time granularity is 1 minute, there is a high probability that the large query will span 2 or even more time granularities, that is, the large query may affect the stability of the cluster for a whole period of time. If there is a problem with the stability of the cluster for a whole period of time, it may be related to the large query. Therefore, it is inaccurate to count the various indicators of the large query only at the time granularity when the large query starts or ends. Therefore, the method of counting all the indicators of the large query once at each time granularity it experiences can be adopted, that is, adding the resource overhead of each time period in the entire life cycle to better describe the cluster pressure situation.

[0147] Optionally, the specific value of the volatility upper limit multiplier can be determined by a function, where the function is shown in the following formula.

[0148] y = e^-(Same as SQL_Pattern historical response time median / 200-2)+2

[0149] Among them, y is used to indicate the volatility upper limit ratio.

[0150] Figure 7 Schematic diagram of the change of the volatility upper limit multiplier with the median of the historical response time of the SQL pattern according to an embodiment of the present application. Figure 7 As shown in the figure, the horizontal axis indicates the median historical response time of SQL Pattern, and the vertical axis indicates the value of the volatility upper limit multiple y calculated by the above function. When the median historical response time is about 10ms, the value is about 9 times, and when the median historical response time is about 1s, the value is about 2.05 times, and it will eventually converge to 2. This function allows small queries to have a higher volatility range. At the same time, as the query time increases, the volatility range is more and more strictly limited, and finally converges to 2 times the median historical response time of the same SQL Pattern.

[0151] Figure 8 FIG. 2 is another schematic diagram of the change of the volatility upper limit multiple with the median of the historical response time of the SQL pattern according to an embodiment of the present application. Figure 8 As shown in the figure, the horizontal axis represents the median historical response time of SQL Pattern, and the vertical axis represents the upper limit of response time fluctuation calculated by the above function. It can be seen that when the median historical response time of SQL Pattern is between 0 and 1000, the value of the upper limit of fluctuation increases rapidly, which is in line with the expectation that short queries have a higher upper limit of fluctuation. When the median historical response time of SQL Pattern is above 1000, the upper limit of fluctuation increases at a linear speed with a slope close to 2.

[0152] Next, the algorithm for abnormal fluctuation of response time based on timing is further introduced.

[0153] In order to replace the manual troubleshooting process and simplify the troubleshooting process, the present application provides a root cause troubleshooting algorithm based on time series correlation to determine the abnormal query indicators that cause abnormal stability of database products. The abnormal query indicators include the response time of the query operation, the number of random reorderings of data in the data set (shuffle data volume), the scanned data volume, memory usage, etc., and no specific restrictions are made here.

[0154] In a database system, if there is a continuous fluctuation in query response time, it can be determined that there is an abnormality in the core indicators of the database product. Among them, the abnormal query mode is the first cause of the stability problem of the database product. In other words, the abnormal query mode is also the abnormal pattern. Fig. 9 FIG. 1 is a flow chart of a root cause troubleshooting method based on timing correlation according to an embodiment of the present application. Fig. 9 As shown, the method comprises the following steps:

[0155] Step S901, calculating the query response time volatility index of the database product.

[0156] In this embodiment, the volatility index of the query response time responded to by the database product within the historical detection period can be calculated to find the time when the abnormal fluctuation begins. The historical detection period can be the past minute and is not limited here.

[0157] Step S902: determining a time period to be tested based on the query response time volatility index.

[0158] In this embodiment, after determining the start time of the abnormal fluctuation in step S901, a period of time, for example, 30 minutes, can be extended forward based on the start time of the abnormal fluctuation, and the extended period is determined as the leading period. The leading period is combined with the time interval of the abnormal fluctuation to obtain the period to be tested.

[0159] Step S903, determining the query response time volatility index data within the test period.

[0160] In this embodiment, a data point may be taken as a time granularity of 1 minute, that is, a data point is recorded every 1 minute, and then the query response time volatility index data in the test period is calculated based on the collected data points. Wherein, taking a data point as a time granularity of 1 minute means that when counting and recording data, data is collected and recorded at a time interval of 1 minute, and each data point can be used to represent the data situation counted and recorded within 1 minute.

[0161] Step S904: collect all query indicators responded to by the database product during the test period.

[0162] In this embodiment, all query indicators responded to by the database product during the test period can be collected, and the query indicators corresponding to all query patterns (SQL patterns) can be aggregated using an aggregation method, wherein the query indicators can include core indicators of database products such as the amount of scanned data, memory usage, and the amount of transmitted data, and the aggregation method can be a sum aggregation method. Optionally, this embodiment uses the sum method to aggregate the query indicators corresponding to the query pattern, which can be to add up the query indicators of the same query pattern to obtain the overall indicator data of the query pattern. For example, the query indicators such as the amount of scanned data, memory usage, and the amount of transmitted data of the same SQL pattern are added together to obtain the overall data volume of the SQL pattern.

[0163] Step S905 , normalizing the query response time fluctuation rate index and the query index within the test period respectively.

[0164] In this embodiment, the response time fluctuation rate and query indicators (eg, scanned data volume, memory usage) within the test period may be normalized by using z-score normalization, and no specific limitation is made here.

[0165] Step S906: Perform feature amplification processing on the normalized query response time fluctuation rate and query index.

[0166] In this embodiment, a feature amplification algorithm may be used to perform feature amplification processing on the query response time volatility and the query index, so as to more clearly observe data points far from the mean.

[0167] Step S907, calculating the similarity between the query response time volatility and the query index.

[0168] In this embodiment, the similarity between the query response time volatility and the query index may be calculated. For example, the feature vectors corresponding to the query response time volatility and the query index may be determined, and then the similarity between the two may be determined by a cosine similarity algorithm.

[0169] Step S908: determining an abnormal query index that has a high correlation with the query response time fluctuation based on the similarity and the similarity threshold.

[0170] In this embodiment, after calculating the similarity, the similarity can be compared with the similarity threshold. If the similarity is greater than the similarity threshold, it means that the query index corresponding to the similarity is an abnormal query index. The similarity threshold can be preset, for example, the similarity threshold is 0.8, which is not specifically limited here.

[0171] In this embodiment, by calculating the abnormal query indicators with high correlation with the query response time volatility, the abnormal query indicators with correlation with the query response time volatility higher than the threshold can be automatically found, so as to achieve the purpose of automatically determining the root cause of the abnormal stability of the database product. It should be noted that other core indicators of the database product, such as JVM memory usage, TPS of written data, etc., can be aggregated into a feature vector, and then the similarity is calculated with the vector of the query response time volatility, so as to automatically determine the root cause of the current abnormality of the system, greatly saving troubleshooting time and improving customer experience.

[0172] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0173] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0174] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), including several instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0175] Example 2

[0176] According to an embodiment of the present application, a database product status detection device for implementing the above database product status detection method is also provided. Fig.10 is a schematic diagram of a state detection device for a database product according to an embodiment of the present application, such as Fig.10As shown, the database product status detection device 1000 may include: an acquisition unit 1001 , a first identification unit 1002 , a first determination unit 1003 and a second determination unit 1004 .

[0177] The acquisition unit 1001 is used to acquire at least one query operation responded by the database product within a historical detection period.

[0178] The first identification unit 1002 is used to identify at least one fluctuation query operation in at least one query operation, wherein the fluctuation query operation is a query operation in which a response time exceeds a time threshold in at least one query operation.

[0179] The first determining unit 1003 is used to determine a state detection index of the database product based on at least one fluctuation query operation and at least one query operation, wherein the state detection index is used to characterize the stability state of the database product.

[0180] The second determining unit 1004 is configured to determine that the database product is in an abnormal stability state within a historical detection period when the state detection indicator is greater than the state detection indicator threshold.

[0181] It should be noted that the acquisition unit 1001, the first identification unit 1002, the first determination unit 1003 and the second determination unit 1004 correspond to steps S401 to S404 in Example 1, and the four units and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules may also be part of the device and may be run in the computer terminal 10 provided in Example 1.

[0182] According to an embodiment of the present application, a database product status detection device for implementing the above database product status detection method is also provided. Fig.11 is a schematic diagram of a state detection device for a database product according to an embodiment of the present application, such as Fig.11 As shown, the database product status detection device 1100 may include: a first calling unit 1101 , a second identifying unit 1102 , a third determining unit 1103 , a fourth determining unit 1104 and a second calling unit 1105 .

[0183] The first calling unit 1101 is used to call a first interface to obtain at least one query operation responded by the database product within a historical detection period, wherein the first interface includes a first parameter, and a parameter value of the first parameter is at least one query operation.

[0184] The second identification unit 1102 is used to identify at least one fluctuation query operation in at least one query operation, wherein the fluctuation query operation is a query whose response time exceeds a time threshold in at least one query operation.

[0185] The third determining unit 1103 is used to determine a state detection index of the database product based on at least one fluctuation query operation and at least one query operation, wherein the state detection index is used to characterize the stability state of the database product.

[0186] The fourth determining unit 1104 is configured to determine that the database product is in an abnormal stability state within a historical detection period when the state detection index is greater than the state detection index threshold.

[0187] The second calling unit 1105 is used to call the second interface to output the prompt information of the abnormal stable state, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the prompt information of the abnormal stable state.

[0188] It should be noted here that the above-mentioned first calling unit 1101, second identification unit 1102, third determination unit 1103, fourth determination unit 1104 and second calling unit 1105 correspond to steps S501 to S505 in Example 1, and the five units and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules can also be part of the device and can be run in the computer terminal 10 provided in Example 1.

[0189] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0190] Example 3

[0191] The embodiment of the present application may provide an electronic device, the electronic device includes a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.

[0192] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.

[0193] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the status detection method of the database product: obtaining at least one query operation responded by the database product within a historical detection period; identifying at least one fluctuation query operation in the at least one query operation, wherein the fluctuation query operation is a query operation in which the response time exceeds a time threshold in the at least one query operation; determining a status detection index of the database product based on the at least one fluctuation query operation and the at least one query operation, wherein the status detection index is used to characterize the stability state of the database product; if the status detection index is greater than the status detection index threshold, determining that the database product is in an abnormal stability state within the historical detection period.

[0194] Optionally, Fig.12 is a structural block diagram of a computer terminal according to an embodiment of the present application. Fig.12 As shown, the computer terminal A may include: one or more (only one is shown in the figure) processors 1202, a memory 1204, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display.

[0195] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the state detection method and device of the database product in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the state detection method of the database product mentioned above. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computer terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0196] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain at least one query operation responded by the database product within a historical detection period; in at least one query operation, identify at least one fluctuation query operation, wherein the fluctuation query operation is a query operation in which the response time exceeds a time threshold in at least one query operation; based on at least one fluctuation query operation and at least one query operation, determine a state detection index of the database product, wherein the state detection index is used to characterize the stability state of the database product; if the state detection index is greater than the state detection index threshold, determine that the database product is in an abnormal stability state within the historical detection period.

[0197] Optionally, the processor may also execute program code for the following steps: counting the number of fluctuation queries that perform fluctuation query operations and the total number of queries that perform query operations; determining the proportion of the number of fluctuation queries to the total number of queries; and using the proportion as a status detection indicator for a database product.

[0198] Optionally, the processor may also execute the program code of the following steps: if the proportion is greater than a preset proportion threshold, determining that the state detection index is greater than the state detection index threshold, wherein the state detection index threshold includes the proportion threshold.

[0199] Optionally, the processor may also execute program code of the following steps: determining a query pattern matched by at least one query operation; and determining a time threshold based on the query pattern.

[0200] Optionally, the processor may also execute program code for the following steps: obtaining at least one historical query operation of the database product that matches the query pattern within a period before the historical detection period; determining a historical response time of the historical query operation; and determining a time threshold based on the historical response time.

[0201] Optionally, the processor may also execute program code of the following steps: determining a target response time based on multiple historical response times corresponding to multiple historical query operations, wherein the target response time is used to describe the overall statistical results of multiple historical response times; and determining a time threshold based on the target response time.

[0202] Optionally, the processor may also execute program code of the following steps: determining an adjustment parameter based on the target response time, wherein the adjustment parameter is used to indicate a multiple of the target response time to be adjusted; adjusting the target response time according to the adjustment parameter; and determining the adjusted target response time as a time threshold.

[0203] Optionally, the processor may also execute program code of the following steps: determining a target abnormality indicator of the database product based on a state detection indicator corresponding to the abnormal stability state, wherein the target abnormality indicator is used to put the database product in an abnormal stability state.

[0204] Optionally, the processor may also execute program codes of the following steps: based on the state detection index, determining the abnormal period in which the database product is in an abnormal stability state within the historical detection period; based on the abnormal period, determining the period to be tested of the target abnormal indicator; determining the period to be tested as the historical detection period, and returning to execute from the following steps to obtain the state detection index within the period to be tested: obtaining at least one query operation to which the database product responds within the historical detection period; determining the target abnormal indicator based on the state detection index within the period to be tested.

[0205] Optionally, the processor may also execute program codes of the following steps: obtaining candidate abnormality indicators of the database product within the time period to be tested, wherein the candidate abnormality indicators are indicators to be determined that put the database product in an abnormal stability state; obtaining a correlation between the state detection indicator within the time period to be tested and the candidate abnormality indicator, wherein the correlation is used to indicate the degree of correlation between the state detection indicator within the time period to be tested and the candidate abnormality indicator; in response to the correlation being greater than a correlation threshold, determining the candidate abnormality indicator as a target abnormality indicator, wherein the target abnormality indicator is used to put the database product in an abnormal stability state.

[0206] Optionally, the processor may also execute program codes of the following steps: obtaining a first feature vector of the state detection indicator; obtaining a second feature vector of the candidate abnormality indicator; and determining the similarity between the first feature vector and the second feature vector as the correlation.

[0207] Optionally, the processor may also execute program codes of the following steps: determining a preceding period before the start time of the abnormal period; and determining the abnormal period and the preceding period as the periods to be tested.

[0208] Optionally, the processor may also execute the program code of the following steps: inputting the state detection indicator into the machine learning model for prediction to obtain a target abnormality indicator, wherein the machine learning model is trained based on the state detection indicator samples and the abnormal indicator samples of the database product, the state detection indicator samples are used to characterize the abnormal stability state of the database product, and the abnormal indicator samples are used to make the database product be in the abnormal stability state corresponding to the state detection indicator samples.

[0209] According to an embodiment of the present application, a state detection method for a database product is provided, wherein the stability state of the database product is measured by a state detection index, wherein the state detection index is determined based on at least one fluctuation query operation and at least one query operation in a historical detection period. Therefore, the state detection index can accurately represent the proportion of fluctuation query operations in the historical detection period. Based on this, the state detection index of the database product is compared with a state detection index threshold. If the state detection index is greater than the state detection index threshold, it can be determined that the database product is in an abnormally stable state. That is, without manual troubleshooting, the state detection index threshold is used as a data reference. When the state detection index is greater than the state detection index threshold, it can be automatically determined that the database product is in an abnormally stable state, which greatly reduces the troubleshooting time when a problem occurs in the database product, and provides basic preparation for the automated operation and maintenance of the database product, thereby improving user experience and solving the technical problem of low state detection efficiency of the database product.

[0210] It can be understood by those skilled in the art that Fig.12 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID for short), a PAD, or other terminal devices. Fig.12 It does not limit the structure of the above electronic device. For example, the computer terminal A may also include Fig.12 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.12 Different configurations shown.

[0211] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0212] Example 4

[0213] The embodiment of the present application further provides a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the database product status detection method provided in the first embodiment.

[0214] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0215] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining at least one query operation to which the database product responds within a historical detection period; identifying at least one fluctuation query operation in the at least one query operation, wherein the fluctuation query operation is a query operation in which the response time exceeds a time threshold in the at least one query operation; determining a state detection index of the database product based on the at least one fluctuation query operation and at least one query operation, wherein the state detection index is used to characterize the stability state of the database product; if the state detection index is greater than the state detection index threshold, determining that the database product is in an abnormal stability state within the historical detection period.

[0216] An embodiment of the present application further provides a computer program product, including computer instructions, which, when executed by a processor, implement the database product status detection method provided in the embodiment of the present application.

[0217] In this embodiment, the above-mentioned computer instructions can be stored in a read-only memory (ROM), or can be computer instructions loaded from a storage unit into a random access memory (RAM), so that the processor can execute various appropriate actions and processes in the status detection method of the database product.

[0218] In some embodiments, part or all of the above computer instructions may be loaded and / or installed on the electronic device via a read-only memory and / or a communication unit. When the computer instructions are loaded into the random access memory and executed by the computing unit, one or more steps in the state detection method of the database product described above may be executed.

[0219] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0220] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0221] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0222] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0223] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0224] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), mobile hard disk, disk or optical disk and other media that can store program codes.

[0225] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for detecting the status of a database product, characterized in that: Applied to a cloud server, where a database product is deployed, the method includes: Obtaining at least one query operation responded by the database product within a historical detection period; Among the at least one query operation, identifying at least one fluctuation query operation, wherein the fluctuation query operation is a query operation whose response time exceeds a time threshold among the at least one query operation; Determining a state detection index of the database product based on the at least one fluctuation query operation and the at least one query operation, wherein the state detection index is used to characterize a stability state of the database product; If the state detection index is greater than the state detection index threshold, it is determined that the database product is in an abnormal stability state during the historical detection period.

2. The method according to claim 1, characterized in that Determining a status detection index of the database product based on the at least one fluctuation query operation and the at least one query operation includes: Counting the number of fluctuation queries executed for the fluctuation query operation and the total number of queries executed for the query operation; Determine the ratio of the number of fluctuation queries to the total number of queries; The proportion is used as the status detection indicator of the database product.

3. The method according to claim 2, characterized in that The method further comprises: If the proportion is greater than a preset proportion threshold, it is determined that the state detection index is greater than the state detection index threshold, wherein the state detection index threshold includes the proportion threshold.

4. The method according to claim 1, characterized in that: The method further comprises: Determining a query pattern matched by the at least one query operation; Based on the query pattern, the time threshold is determined.

5. The method according to claim 4, characterized in that Determining the time threshold based on the query mode includes: Acquire at least one historical query operation of the database product that matches the query pattern within a preset period before the historical detection period; Determining a historical response time of the historical query operation; The time threshold is determined based on the historical response time.

6. The method according to claim 5, characterized in that Determining the time threshold based on the historical response time includes: Determine a target response time based on the multiple historical response times corresponding to the multiple historical query operations, wherein the target response time is used to describe the overall statistical result of the multiple historical response times; The time threshold is determined based on the target response time.

7. The method according to claim 6, characterized in that Determining the time threshold based on the target response time includes: Based on the target response time, determining an adjustment parameter, wherein the adjustment parameter is used to represent a multiple of the adjustment to the target response time; Adjusting the target response time according to the adjustment parameter; The adjusted target response time is determined as the time threshold.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Based on the state detection indicator corresponding to the abnormal stability state, a target abnormality indicator of the database product is determined, wherein the target abnormality indicator is used to put the database product in the abnormal stability state.

9. The method according to claim 8, characterized in that Determining a target abnormality indicator of the database product based on the state detection indicator corresponding to the abnormal stability state includes: Based on the state detection indicator, determining an abnormal period during which the database product is in the abnormal stability state within the historical detection period; Based on the abnormal period, determining a time period to be tested for the target abnormal indicator; The time period to be tested is determined as the historical detection time period, and the following steps are returned to be executed to obtain the state detection index in the time period to be tested: obtaining the at least one query operation responded by the database product in the historical detection time period; The target abnormality indicator is determined based on the state detection indicator within the time period to be tested.

10. The method according to claim 9, characterized in that Determining the target abnormality indicator based on the state detection indicator in the time period to be tested includes: Acquire a candidate abnormality indicator of the database product in the test period, wherein the candidate abnormality indicator is an indicator to be determined that causes the database product to be in the abnormal stability state; Obtaining a correlation between the state detection indicator and the candidate abnormality indicator within the time period to be measured, wherein the correlation is used to indicate a correlation degree between the state detection indicator and the candidate abnormality indicator within the time period to be measured; In response to the correlation being greater than a correlation threshold, the candidate abnormality indicator is determined as the target abnormality indicator.

11. The method according to claim 10, characterized in that Obtaining the correlation between the state detection indicator and the candidate abnormality indicator within the test period includes: Obtaining a first eigenvector of the state detection indicator; Obtaining a second feature vector of the candidate abnormality indicator; The similarity between the first feature vector and the second feature vector is determined as the correlation.

12. The method according to claim 9, characterized in that Based on the abnormal period, determining the period to be tested of the target abnormal indicator includes: Determining a preceding time period before the start time of the abnormal time period; The abnormal time period and the preceding time period are determined as the time period to be tested.

13. The method according to claim 8, characterized in that Determining a target abnormality indicator of the database product based on the state detection indicator corresponding to the abnormal stability state includes: The state detection indicator is input into the machine learning model for prediction to obtain the target abnormality indicator, wherein the machine learning model is trained based on the state detection indicator sample and the abnormal indicator sample of the database product, the state detection indicator sample is used to characterize the abnormal stability state of the database product, and the abnormal indicator sample is used to make the database product be in the abnormal stability state corresponding to the state detection indicator sample.

14. A method for detecting the status of a database product, characterized in that: Applied to a cloud server, where a database product is deployed, the method includes: Acquire at least one query operation responded by the database product within a historical detection period by calling a first interface, wherein the first interface includes a first parameter, and a parameter value of the first parameter is the at least one query operation; In the at least one query operation, identifying at least one fluctuation query operation, wherein the fluctuation query operation is a query in the at least one query operation whose response time exceeds a time threshold; Determining a state detection index of the database product based on the at least one fluctuation query operation and the at least one query operation, wherein the state detection index is used to characterize a stability state of the database product; If the state detection index is greater than the state detection index threshold, determining that the database product is in an abnormal stability state during the historical detection period; The prompt information of the abnormal stable state is output by calling the second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the prompt information of the abnormal stable state.

15. A status detection system for a database product, characterized in that: include: The client is used to upload status detection instructions for database products; The cloud server is used to obtain at least one query operation responded by the database product within a historical detection period in response to the status detection instruction; Among the at least one query operation, at least one fluctuation query operation is identified, wherein the fluctuation query operation is a query whose response time exceeds a time threshold among the at least one query operation; based on the at least one fluctuation query operation and the at least one query operation, a state detection index of the database product is determined, wherein the state detection index is used to characterize the stability state of the database product; if the state detection index is greater than a state detection index threshold, it is determined that the database product is in an abnormal stability state within the historical detection period; and prompt information of the abnormal stability state is returned to the client.

16. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 14 when running.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 14.

18. A computer program product comprising computer instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Methods and systems for processing requests

    CN111488373A

  • Database fault recovery method and device and face image search system

    CN112363865A

  • Method and device for detecting query of time series data and time series database system

    CN113111098A

  • Hotspot detection method and device, monitoring server and storage medium

    CN113489776A

  • Database exception processing method and device, electronic equipment and storage medium

    CN117194161A