CN-119166699-B - State detection method and system for database product and electronic equipment
Abstract
The application discloses a state detection method, a state detection system and electronic equipment for database products. The method comprises the steps of obtaining at least one query operation of a database product responding in a historical detection period, identifying at least one fluctuation query operation in the at least one query operation, wherein 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 the at least one query operation, wherein the state detection index is used for representing the stability state of the database product, and determining that the database product is in an abnormal stability state in the historical detection period if the state detection index is larger than the state detection index threshold. The application solves the technical problem of low state detection efficiency of database products.
Inventors
- MIAO JIAWEI
- CHEN XIAO
- JIANG XIYANG
Assignees
- 杭州阿里云飞天信息技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20240119
Claims (17)
- 1. A method for detecting a state of a database product, the method being applied to a cloud server, the cloud server having the database product deployed thereon, the method comprising: acquiring at least one query operation of the database product in response in a history detection period; Identifying at least one fluctuating query operation in the at least one query operation, wherein the fluctuating query operation is one of the at least one query operation, and the response time of the one or more query operations 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 for representing the stability state of the database product; If the state detection index is greater than a state detection index threshold, determining that the database product is in an abnormal stability state within the historical detection period; the method further comprises the steps of determining target response time of the query operation based on a plurality of historical response times in a period before the historical detection period, wherein a plurality of historical response times correspond to historical query operations, and the historical query operations are identical to query modes of the query operations; The method further comprises the steps of determining the fluctuation upper limit multiplying power based on the target response time, wherein the fluctuation upper limit multiplying power and the target response time of the query operation are in an inverse proportion relation; Determining the time threshold corresponding to the query operation based on the target response time and the fluctuation upper limit multiplying power, wherein the determining the time threshold corresponding to the query operation based on the product between the fluctuation upper limit multiplying power and the target response time; The method further comprises the steps of determining a query mode matched with at least one query operation, and determining the time threshold based on the query mode.
- 2. The method of claim 1, wherein determining a state detection indicator for the database product based on the at least one fluctuating query operation and the at least one query operation comprises: counting the number of fluctuation queries for executing the fluctuation query operation and the total number of queries for executing the query operation; Determining a ratio of the number of fluctuating queries to the total number of queries; the duty ratio is used as the state detection index of the database product.
- 3. The method according to claim 2, wherein the method further comprises: and if the duty ratio is larger than a preset duty ratio threshold, determining that the state detection index is larger than the state detection index threshold, wherein the state detection index threshold comprises the duty ratio threshold.
- 4. The method of claim 1, wherein determining the time threshold based on the query pattern comprises: acquiring at least one historical query operation matched with the query mode in a preset period before the historical detection period of the database product; determining a historical response time of the historical query operation; the time threshold is determined based on the historical response time.
- 5. The method of claim 4, wherein determining the time threshold based on the historical response time comprises: Determining target response time based on a plurality of historical response times corresponding to a plurality of historical query operations, wherein the target response time is used for describing the overall statistical result of the plurality of historical response times; The time threshold is determined based on the target response time.
- 6. The method of claim 5, wherein determining the time threshold based on the target response time comprises: determining an adjustment parameter based on the target response time, wherein the adjustment parameter is used for representing a multiple of adjustment of the target response time; Adjusting the target response time according to the adjustment parameters; And determining the adjusted target response time as the time threshold.
- 7. The method according to any one of claims 1 to 6, further comprising: And determining a target abnormal index of the database product based on the state detection index corresponding to the abnormal stability state, wherein the target abnormal index is used for enabling the database product to be in the abnormal stability state.
- 8. The method of claim 7, wherein determining a target anomaly indicator for the database product based on the state detection indicator corresponding to the anomaly stability state comprises: Determining an abnormal period in which the database product is in the abnormal stability state within the historical detection period based on the state detection index; determining a period to be measured of the target abnormality index based on the abnormality period; determining the time period to be detected as the historical detection time period, and returning to be executed from the steps of obtaining the state detection index in the time period to be detected, namely obtaining the at least one query operation responded by the database product in the historical detection time period; And determining the target abnormal index based on the state detection index in the period to be detected.
- 9. The method of claim 8, wherein determining the target anomaly indicator based on the status detection indicator over the period of time to be measured comprises: Acquiring candidate abnormal indexes of the database product in the period to be detected, wherein the candidate abnormal indexes are indexes to be determined for enabling the database product to be in the abnormal stability state; acquiring a degree of correlation between the state detection index and the candidate abnormal index in the period to be detected, wherein the degree of correlation is used for representing the degree of correlation between the state detection index and the candidate abnormal index in the period to be detected; and determining the candidate abnormality index as the target abnormality index in response to the correlation being greater than a correlation threshold.
- 10. The method according to claim 9, wherein obtaining a correlation between the state detection index and the candidate abnormality index in the period to be measured includes: acquiring a first feature vector of the state detection index; Acquiring a second feature vector of the candidate abnormal index; And determining the similarity between the first feature vector and the second feature vector as the correlation.
- 11. The method of claim 8, wherein determining a time period to be measured for the target anomaly index based on the anomaly time period comprises: Determining a preamble period located before a start time of the abnormal period; and determining the abnormal time period and the prepositive time period as the time period to be measured.
- 12. The method of claim 7, wherein determining a target anomaly indicator for the database product based on the state detection indicator corresponding to the anomaly stability state comprises: The state detection index is input into a machine learning model for prediction to obtain the target abnormal index, wherein the machine learning model is obtained by training based on a state detection index sample and an abnormal index sample of the database product, the state detection index sample is used for representing the abnormal stability state of the database product, and the abnormal index sample is used for enabling the database product to be in the abnormal stability state corresponding to the state detection index sample.
- 13. A method for detecting a state of a database product, the method being applied to a cloud server, the cloud server having the database product deployed thereon, the method comprising: Acquiring at least one query operation responded by the database product in a history detection period by calling a first interface, wherein the first interface comprises a first parameter, and the parameter value of the first parameter is the at least one query operation; Identifying at least one fluctuating query operation in the at least one query operation, wherein the fluctuating query operation is a query with response time exceeding 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 for representing the stability state of the database product; If the state detection index is greater than a state detection index threshold, determining that the database product is in an abnormal stability state within the historical detection period; Outputting the prompt information of the abnormal stable state by calling a second interface, wherein the second interface comprises a second parameter, and the parameter value of the second parameter is the prompt information of the abnormal stable state; the method further comprises the steps of determining target response time of the query operation based on a plurality of historical response times in a period before the historical detection period, wherein a plurality of historical response times correspond to historical query operations, and the historical query operations are identical to query modes of the query operations; The method further comprises the steps of determining the fluctuation upper limit multiplying power based on the target response time, wherein the fluctuation upper limit multiplying power and the target response time of the query operation are in an inverse proportion relation; Determining the time threshold corresponding to the query operation based on the target response time and the fluctuation upper limit multiplying power, wherein the determining the time threshold corresponding to the query operation based on the product between the fluctuation upper limit multiplying power and the target response time; The method further comprises the steps of determining a query mode matched with at least one query operation, and determining the time threshold based on the query mode.
- 14. A system for detecting the status of a database product, comprising: The client is used for uploading a state detection instruction of the database product; The cloud server is used for responding to the state detection instruction, acquiring at least one query operation of the database product responded in a history detection period, identifying at least one fluctuation query operation in the at least one query operation, wherein 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 the at least one query operation, wherein the state detection index is used for representing the stability state of the database product, determining that the database product is in an abnormal stability state in the history detection period if the state detection index is larger than the state detection index threshold, and returning prompt information of the abnormal stability state to the client; The cloud server is further used for determining target response time of the query operation based on a plurality of historical response times in a period before the historical detection period, wherein the historical response times correspond to historical query operation which is the same as a query mode of the query operation; The cloud server is further used for determining the fluctuation upper limit multiplying power based on the target response time, wherein the fluctuation upper limit multiplying power and the target response time of the query operation are in an inverse proportion relation; the cloud server is further used for determining the time threshold corresponding to the query operation based on the target response time and the fluctuation upper limit multiplying power by determining the time threshold corresponding to the query operation based on the product between the fluctuation upper limit multiplying power and the target response time; The cloud server is further used for determining a query mode matched with the at least one query operation and determining the time threshold based on the query mode.
- 15. An electronic device, comprising: A memory storing an executable program; a processor for executing the program, wherein the program when run performs the method of any one of claims 1 to 13.
- 16. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program, when run, controls a device in which the storage medium is located to perform the method of any one of claims 1 to 13.
- 17. A computer program product comprising computer instructions which, when executed by a processor, implement the method of any one of claims 1 to 13.
Description
State detection method and system for database product and electronic equipment Technical Field The application relates to the technical field of data management, in particular to a state detection method, a state detection system and electronic equipment for database products. Background Currently, the problem of state stability is very complex for database products with a large number of clients. When an emergency state stability problem occurs, from the problem discovery to the report of the work order, the front line research personnel check the problem, finally process the problem, the whole process consumes longer time and influences the use. Therefore, there is a technical problem that the state detection efficiency of the database product is low. In view of the above problems, no effective solution has been proposed at present. Disclosure of Invention The embodiment of the application provides a state detection method, a state detection system and electronic equipment for a database product, which are used for at least solving the technical problem of low state detection efficiency of the database product. According to one aspect of the embodiment of the application, a state detection method of a database product is provided, and is applied to a cloud server, wherein the database product is deployed on the cloud server. The method comprises the steps of obtaining at least one query operation of a database product responding in a historical detection period, identifying at least one fluctuation query operation in the at least one query operation, wherein 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 the at least one query operation, wherein the state detection index is used for representing the stability state of the database product, and determining that the database product is in an abnormal stability state in the historical detection period if the state detection index is larger than the state detection index threshold. According to another aspect of the embodiment of the application, a state detection method of a database product is further provided, and the state detection method is applied to a cloud server, wherein the database product is deployed on the cloud server. The method comprises the steps of obtaining at least one query operation of a database product responded in a historical detection period by calling a first interface, wherein the first interface comprises a first parameter, the parameter value of the first parameter is at least one query operation, identifying at least one fluctuation query operation in the at least one query operation, wherein the fluctuation query operation is a query with response time exceeding 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 for representing the stability state of the database product, determining that the database product is in an abnormal stability state in the historical detection period if the state detection index is larger than the state detection index threshold, and outputting prompt information of the abnormal stability state by calling a second interface, wherein the second interface comprises a second parameter, and the parameter value of the second parameter is prompt information of the abnormal stability state. According to another aspect of the embodiment of the application, a state detection device of a database product is also provided. The device comprises an acquisition unit, a first identification unit and a second identification unit, wherein the acquisition unit is used for acquiring at least one query operation of a database product responded in a historical detection period, the first identification unit is used for identifying at least one fluctuation query operation in the at least one query operation, the response time of the fluctuation query operation exceeds a time threshold value in the at least one query operation, the first identification unit is used for 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, the state detection index is used for representing the stability state of the database product, and the second identification unit is used for determining that the database product is in an abnormal stability state in the historical detection period when the state detection index is larger than the state detection index threshold value. According to another aspect of the embodiment of the application, a state detection device of a database product is also provided. The device comprises a first calling unit, a second identifying unit, a third determining unit and a