A method and device for detecting the operating status of a database server
By obtaining and processing the response time of the database server and client, and calculating the average response time and threshold, the problem of the existing technology that cannot detect database server anomalies in a timely manner is solved, and timely and simple anomaly judgment and maintenance are achieved, ensuring normal data interaction and user experience.
Patent Information
- Application Number
- CN202010867739.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-26
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2040-08-26
AI Technical Summary
The existing technology lacks a timely and effective detection mechanism to determine abnormal operating status between the database server and the client, resulting in the inability of operation and maintenance personnel to promptly and accurately determine the cause of the abnormality, affecting normal interaction and user experience.
By continuously obtaining the response time of the database server and the client, calculating the average response time and threshold, it is determined whether the operation status of the database server is abnormal, including data processing and comparison of the first average response time, the second average response time and the threshold.
It enables timely, simple and intelligent judgment of abnormal operation status of the database server, timely identification of the cause of the abnormality, and ensures normal data interaction and user experience between the database server and the client.
Smart Images

Figure CN114116660B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of databases, and in particular relates to a method and a device for detecting the operating status of a database server. Background Art
[0002] With the continuous development of the information society, more and more users are accessing the data they need through the Internet. Generally, different data is stored in corresponding database servers, and users access the database servers through clients to obtain data. Storing data in the database server not only facilitates data management, but also allows users to obtain the data they need in a targeted manner, improving the speed and accuracy of data acquisition and providing users with a better data acquisition experience.
[0003] It is understandable that any abnormality in the operating status of either the database server or the client will affect the user's access to data.
[0004] In existing technologies, after detecting an operational anomaly between a database server or client, operations and maintenance personnel are typically required to further determine the specific cause of the anomaly. Alternatively, operations and maintenance personnel are not notified to perform maintenance on the database server or client until a user reports the anomaly to the backend. These methods are unable to promptly and effectively determine the operational anomaly and its cause on the database server or client. This prevents operations and maintenance personnel from receiving timely and effective feedback on the anomaly, and even more so, from promptly and accurately determining the cause of the anomaly to perform maintenance. This not only impacts the normal interaction between the database server and client, but also results in a poor user experience. Summary of the Invention
[0005] The embodiments of the present invention provide a method and a device for detecting the operating status of a database server, aiming to solve the problem that, in data interaction between a database server and a client, there is a lack of an effective detection mechanism to detect abnormal operating status of the database server, and it is impossible to determine in a timely and effective manner whether the operating status of the database server has abnormalities.
[0006] The present invention is implemented as follows: a method for detecting the operating status of a database server, wherein the database server is in communication with a client, and the detection method comprises:
[0007] Continuously obtaining at least one first response time of the database server relative to the client within at least one preset time interval;
[0008] Performing data processing on at least one of the first response times to obtain a first average response time of the database server within each of the preset time intervals and a second average response time of a preset time period consisting of at least one of the preset time intervals;
[0009] Performing data processing on the second average response time and at least one of the first average response times to obtain a first average response time judgment value and a second average response time threshold;
[0010] Determining whether the first average response time judgment value is greater than the second average response time threshold;
[0011] If so, it is determined that the operating status of the database server is abnormal.
[0012] The present invention also provides a device for detecting the operating status of a database server, wherein the database server is communicatively connected to a client, and the device comprises:
[0013] A first acquisition module, configured to continuously acquire at least one first response time of the database server relative to the client within at least one preset time interval;
[0014] a first processing module, configured to perform data processing on at least one of the first response times to obtain a first average response time of the database server within each of the preset time intervals and a second average response time of a preset time period consisting of at least one of the preset time intervals;
[0015] a second processing module, configured to perform data processing on the second average response time and at least one of the first average response times to obtain a first average response time judgment value and a second average response time threshold;
[0016] A first judgment module is configured to judge whether the first average response time judgment value is greater than the second average response time threshold;
[0017] The first determination module is configured to determine that if yes, the operation status of the database server is abnormal.
[0018] The beneficial effect of the embodiments of the present invention is that it can timely, simply, intelligently and effectively determine whether the operating status of the database server is abnormal based on the data generated by the interaction between the database server and the client. If an abnormality occurs, the cause of the abnormality can be further determined based on the abnormal situation, so that operation and maintenance personnel can obtain feedback on the abnormal operating status in a timely manner and determine the cause of the abnormality, so as to timely and effectively resolve the current abnormal operating status of the database server based on the cause of the abnormality, ensure normal data interaction between the database server and the client, and ensure user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a schematic diagram of the structure between the database server and the client in an embodiment of the present invention;
[0020] Figure 21 is a flow chart of a detection method according to an embodiment of the present invention;
[0021] Figure 3 This is a schematic diagram of changes in response data when the database server is in an abnormal operating state according to an embodiment of the present invention;
[0022] Figures 4 to 7 1 is a flow chart of a detection method according to an embodiment of the present invention;
[0023] Figures 8 to 12 Schematic diagram of the structure of a detection device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0025] The existing technology lacks a mechanism to promptly and effectively determine abnormal operating statuses and causes of database servers and clients. This results in operations and maintenance personnel being unable to obtain timely and effective feedback on abnormalities, and even more so, unable to promptly and accurately determine the causes of abnormalities for maintenance. This not only affects the normal interaction between the database server and client, but also affects the user experience.
[0026] The present invention obtains at least one first response time generated by the interaction between the database server and the client within a preset time period as a basis, and then obtains a first average response time, a second average response time, a second average response time judgment value and a second average response time threshold. By processing and comparing the above data, the purpose of determining whether the operating status of the database server is abnormal is achieved.
[0027] Example 1
[0028] See also Figure 1 and Figure 2 In the embodiment of the present invention, a method for detecting the running status of a database server and a client is provided. The database server and the client are in communication connection. The detection method includes the following steps:
[0029] S1: Continuously obtaining at least one first response time of the database server relative to the client within at least one preset time interval;
[0030] S2: Processing the at least one first response time to obtain a first average response time of the database server within each preset time interval and a second average response time of a preset time period consisting of the at least one preset time interval;
[0031] S3: Processing the second average response time and at least one first average response time to obtain a first average response time judgment value and a second average response time threshold;
[0032] S4: Determine whether the first average response time judgment value is greater than the second average response time threshold;
[0033] S5: If yes, it is determined that the operation status of the database server is abnormal.
[0034] See also Figure 1 , Figure 1 This diagram illustrates the architecture between a database server (Data Base, DB) and a client (Application, APP). A database server communicates with at least one client and exchanges data. Interactions between the two are established through network requests and responses, and data is transmitted via the Transmission Control Protocol (TCP). By capturing and parsing network dump packets in real time, the real-time operating status of the database server and client can be detected and monitored.
[0035] A typical data exchange between a database server and a client consists of one network request and one network response. The completion of one request and one response constitutes one data exchange. For example, if a client sends a network request to a database server and the server sends a network response to the client, then one data exchange is complete between the two.
[0036] If the total number of network requests and responses within a certain period is not equal, or if the network response time is getting longer and longer, or the network response rate is getting lower and lower, this indicates that there is an abnormal data interaction between the database server and the client. In this case, the abnormal response time or response rate within a certain period can be used to determine whether the operation status between the database server and the client is abnormal.
[0037] It should be noted that the response time, response rate, and data volume of the interaction between the database server and the client can be directly obtained through relevant devices or programs. In this embodiment of the present invention, the interaction data between the database server and the client is obtained through the cnstat module. In other embodiments, other methods and devices can also be used to obtain it, which will not be repeated here.
[0038] In an embodiment of the present invention, the above-mentioned detection method is used when there is a connection between the database server and the client, but the number of requests received by the database server frequently fluctuates above and below the normal value, and the response time of the database server also fluctuates above and below the normal value, forming a "bumpy" abnormal operating state. In the embodiment of the present invention, the above-mentioned operating state is identified as a "bumpy" operating state. At the same time, the cause of the abnormality determined by the embodiment of the present invention is the fluctuation of the response time of the database server (or the fluctuation of the number of requests, response rate, etc.). The operation and maintenance personnel can then maintain the database server based on the determined "bumpy" operating state and the abnormal cause of the fluctuation of the response time of the database server.
[0039] Specifically, in an embodiment of the invention, in the process of determining the operating status of the database server, it is necessary to obtain all interaction data of the database server within a certain period of time for analysis. Depending on different actual needs, it is necessary to obtain one or more data corresponding to one or more periods of time to analyze different situations. Therefore, in the above-mentioned step S1, there is at least one preset time interval, which can be understood as a period of time, and each first response time is the response time corresponding to each preset time interval, so there is also at least one. The first response time within the preset time interval is continuously obtained to detect the operating status of the database server at the current stage, while avoiding the omission of the first response time and the misjudgment of the operating status of the database server.
[0040] It is worth noting that the first response time here is unprocessed raw data, which can be obtained through relevant devices or software. After selecting a time point, the first response time within the preset time interval before and after the time point is obtained. In one embodiment, if there are multiple preset time intervals and first response times, the multiple first response times can be added in the order of occurrence to form a first response time set. This makes it easy to record the first response time and also to batch process the first response time. Of course, even if there is only one first response time, it can be added to form a first response time set after it is obtained, so that it can be used as a clear data source in subsequent processing.
[0041] It is understood that if the preset time interval is one, then the first response time is also one, and the first response time set contains one first response time; if the preset time interval is multiple, then the first response time is also multiple, and the first response time set contains multiple first response times. The preset time interval can be a time value such as 10s, 30s, 1min, 2min, 10min, 30min, or 1h. For example, when the preset time interval is 1min, the first response time is the response time within 1min, and the first response time set is a set of response times within 1min.
[0042] In an embodiment of the present invention, the preset time interval is 1 minute, and there are multiple preset time intervals. By obtaining the response time of the database server every 1 minute within a period of time consisting of multiple preset time intervals, the operating status of the database server can be judged more accurately. In other embodiments, the preset time interval can be other lengths, and the number can also be 1, which can be specifically set in actual embodiments.
[0043] In step S2, after obtaining the first response time, data processing is performed on the obtained first response time. The data processing includes, but is not limited to, calculating the average of at least one first response time and adding the at least one first response time. During the processing of at least one first response time, the first response time may be first formed into the aforementioned first response time set to facilitate batch processing when there are multiple first response times.
[0044] Furthermore, in the process of processing the above-mentioned first response time set, it includes calculating the average value of the first response time in the first response time set to obtain the first average response time of the database server corresponding to each preset time interval. Calculating the average value of the first response time can avoid the impact on the final value and judgment result when only some response time values within the preset time interval are obtained and are relatively extreme (too large or too small).
[0045] The processing of the first response time set formed by the first response times further includes summing preset time intervals to obtain a preset time period, and summing subsequent first average response times to obtain a second average response time. The preset time period is composed of at least one preset time interval, wherein the preset time intervals are time points selected at intervals of a certain length within the preset time period. This method is relatively simple, the preset time intervals are more evenly distributed, and the randomness of the first response times obtained within the preset time interval is reduced. It is understood that if there is one preset time interval, the duration of the preset time period is equal to the preset time interval. The second average response time within each preset time interval is summed to obtain the second average response time within the preset time period. The second average response time is the total average response time of the database server within the preset time period and can be used to determine the changing trend of the database server's response time within the entire preset time period. It is understood that if there is one first average response time, the duration of the second average response time is equal to the first average response time. For example, if the first average response time is 10 seconds, the second average response time is also 10 seconds.
[0046] In an embodiment of the present invention, the preset time interval is set to 1 minute, the number is 10, and the preset time period is 10 minutes. The first response time obtained is the response time of 10 groups within 0th minute-1st minute, 1st minute-2nd minute, 2nd minute-3rd minute, 3rd minute-4th minute, 4th minute-5th minute, 5th minute-6th minute, 6th minute-7th minute, 7th minute-8th minute, 8th minute-9th minute, and 9th minute-10th minute. If the first average response time of each minute is 0.1ms, 0.2ms, 0.3ms, 0.4ms, 0.5ms, 0.1ms, 0.2ms, 0.3ms, 0.4ms, and 0.5ms respectively, the second average response time is the sum of the above values, which is equal to 3ms, that is, the average response time of the database server within 10 minutes is 3ms.
[0047] Please combine Figure 3 In an embodiment of the present invention, a coordinate axis may be established in which the horizontal axis X represents actual time and the vertical axis Y represents response time. For example, a preset time period of 10 minutes and a preset time interval of 1 minute are used as an example. On the horizontal axis X, there are a starting point a and an end point b of the preset time period. The starting point a is the current time point, and the end point b is the point on the horizontal axis X that is the length of time that has passed the preset time period from the current time point (point b is the point 10 minutes ago). The first response time obtained at each preset time interval (every 1 minute) within the preset time period (10 minutes) is arranged in chronological order (such as counting from the end point b of the horizontal axis X to the starting point a). At this time, there are 10 first response times, such as Figure 3 For each point shown, 10 first response times constitute a first response time set, and then the 10 first response times in the first response time set are averaged to obtain 10 first average response times within 10 preset time intervals, and the 10 first average response times are added together to obtain the second average response time.
[0048] It is worth noting that in the continuous interaction process between the database server and the client, the preset time period is always a fixed value, and the judgment of the operating status of the database server is also carried out continuously. In order to ensure that the operating status of the database server is judged accordingly and effectively as time changes, when the time exceeds the preset time period, within the first response time set, the first response time within a new preset time interval obtained will replace the first response time within the first preset time interval originally obtained. For example, within the preset time period of 10 minutes, each 1 minute is the preset time interval. The first response time obtained at the 11th minute will replace the first response time of the 1st minute within 10 minutes. The first response time obtained at the 12th minute will replace the first response time of the 2nd minute within 10 minutes, and so on. This ensures the immediacy and effectiveness of the judgment of the operating status of the database server.
[0049] In step S3, data processing of the second average response time includes, but is not limited to, adding, subtracting, multiplying, or dividing a set value from the second average response time to obtain a second average response time threshold value. Data processing of the at least one first average response time includes, but is not limited to, performing a linear fit thereon. In an embodiment of the present invention, the second average response time is multiplied by the set value to obtain the second average response time threshold value, and a linear fit is performed on the at least one first average response time to obtain a first average response time judgment value.
[0050] By comparing the first average response time judgment value with the second average response time threshold, the difference between the response time corresponding to each time interval within a preset time period and the second average response time threshold is determined, thereby determining fluctuations in response data occurring continuously across multiple time intervals and time periods. When the first average response time judgment value is greater than the second average response time threshold, it indicates that the interaction data between the database server and the client is fluctuating significantly, thus enabling a timely, simple, intelligent, and effective determination of an abnormal operating state of the database server, which is characterized as an "abnormal" operating state.
[0051] The cause of the anomaly can be further confirmed to be fluctuations in the database server's response time. Based on the identified "unusual" operating status and the cause of the fluctuations, operations and maintenance personnel can promptly perform maintenance on the database server, effectively resolving the abnormal operating status and ensuring normal data exchange between the database server and the client, ensuring a positive user experience.
[0052] Example 2
[0053] For further information, see Figure 4 , before step S1, the steps include:
[0054] S6: Select a preset time point;
[0055] Step S2 includes the steps of:
[0056] S11: Continuously obtaining at least one first response time of the database server relative to the client within at least one preset time interval before a preset time point.
[0057] Specifically, the detection and judgment of the operating status of the database server are carried out in real time. In order to accurately understand the operating status of a certain period of time, it is necessary to first select a preset time point on the time axis, and then use the preset time point as the base point to move forward or backward along the time axis for a certain length of time (preset time interval) to the next point. If there are multiple preset time intervals, then at the above-mentioned "next point", continue to move forward or backward for a certain length of time (preset time interval) to the next point, so as to continuously move forward or backward.
[0058] For example, if the preset time point is 10:00 and the preset time interval is 1 minute, then the time point 1 minute before is selected, that is, the time point 9:59 is selected, and the response time 1 minute after 9:59 is obtained, that is, the response time within 1 minute from 9:59 to 10:00, is used to determine the operating status of the preset time point.
[0059] In an embodiment of the present invention, by obtaining the first response time of the database server within a preset time interval before a preset time point, it is used as a judgment on whether the data interaction and operating status between the database server and the client that has occurred are abnormal, thereby avoiding the problem that if an abnormality still occurs between the database server and the client within a period of time after the preset time point, it will still affect the subsequent data interaction between the database server and the client.
[0060] Example 3
[0061] For further information, see Figure 5 , step S2 comprises the steps of:
[0062] S21: Calculate an average value of at least one first response time to obtain a first average response time of the database server in each preset time interval;
[0063] S22: Add at least one preset time interval to obtain a preset time period, and add at least one first average response time to obtain a second average response time.
[0064] Specifically, after obtaining the first response time, data processing is performed on it. The data processing includes, but is not limited to, calculating the average of at least one first response time and adding the at least one first response time. During the processing of at least one first response time, the first response time can be first formed into a first response time set to enable batch processing when there are multiple first response times, thereby improving data processing efficiency.
[0065] The processing of the first response time set also includes adding the preset time intervals to obtain a preset time period, and adding the subsequent first average response times to obtain a second average response time. The preset time period is composed of at least one preset time interval, wherein the preset time intervals are time points selected at intervals of a certain length within the preset time period. The distribution of the preset time intervals is relatively uniform, and the randomness of the first response times obtained within the preset time intervals is reduced. It is understood that if there is one preset time interval, the length of the preset time period is equal to the preset time interval.
[0066] The second average response time for the preset time period is obtained by adding up each first average response time within each preset time interval. The second average response time is the total average response time of the database server within the preset time period and can be used to determine the changing trend of the database server's response time within the entire preset time period. It is understood that if the first average response time is 1, then the second average response time is equal to the first average response time. For example, if the first average response time is 10 seconds, then the second average response time is also 10 seconds.
[0067] In an embodiment of the present invention, the preset time interval is set to 1 minute, the number is 10, and the preset time period is 10 minutes; if the first average response time per minute is 0.1ms, 0.2ms, 0.3ms, 0.4ms, 0.5ms, 0.1ms, 0.2ms, 0.3ms, 0.4ms, and 0.5ms respectively, then the second average response time is the sum of the above values, which is equal to 3ms, that is, the average response time of the database server within 10 minutes is 3ms.
[0068] Furthermore, please combine Figure 3 In an embodiment of the present invention, a coordinate axis may be established in which the horizontal axis X represents the actual time and the vertical axis Y represents the response time of the database server. For example, a preset time period of 10 minutes and a preset time interval of 1 minute are provided. On the horizontal axis X, there are a starting point a and an end point b of the preset time period. The starting point a is the current time point, and the end point b is the point on the horizontal axis X that is the length of the preset time period past the current time point (point b is the point 10 minutes ago). The first response time obtained at each preset time interval (every 1 minute) within the preset time period (10 minutes) is as follows: Figure 3 Each point shown is arranged in chronological order (such as counting from the end point b to the starting point a on the horizontal axis X). At this time, there are 10 first response times, and the 10 first response times constitute a first response time set. Then, the average of the 10 first response times in the first response time set is calculated.
[0069] It is worth noting that during the continuous interaction between the database server and the client, the preset time period is always a fixed value, and the judgment of the operating status of the database server is also carried out continuously. In order to ensure that the operating status of the database server is judged accordingly and effectively as time changes, when the time exceeds the preset time period, within the first response time set, the first response time obtained within a new preset time interval will replace the first response time originally obtained within the first preset time interval. For example, within a preset time period of 10 minutes, each 1 minute is a preset time interval, and the first response time obtained at the 11th minute will replace the first response time of the 1st minute within 10 minutes, and the first response time obtained at the 12th minute will replace the first response time of the 2nd minute within 10 minutes, and so on, to ensure the immediacy and effectiveness of the judgment of the operating status of the database server.
[0070] Example 4
[0071] For further information, see Figure 6 , step S3 comprises the steps of:
[0072] S31: adding at least one first average response time in chronological order to form a first average response time sequence;
[0073] S32: performing linear fitting on the first average response time series to obtain a root mean square error (RMS) of the first average response time at each preset time interval, and using the RMS error as a first average response time judgment value;
[0074] S33: Multiplying the second average response time by a set multiple to obtain a second average response time threshold.
[0075] Specifically, data processing of the second average response time includes but is not limited to adding, subtracting, multiplying, and dividing a set value based on the second average response time to obtain a second average response time threshold, and data processing of at least one first average response time includes but is not limited to performing linear fitting on it.
[0076] Furthermore, in the process of processing the first average response time, at least one first average response time can be added in chronological order to form a first average response time sequence. In this way, after a first average response time is calculated, it can be added to the set sequence. When it is necessary to calculate the first average response time judgment value, the entire first average response time sequence can also be batch processed to improve data processing efficiency. For example, if the preset time period is 10 minutes and the preset time interval is 1 minute, 10 first average response times within 10 preset time intervals are calculated. If the first average response time of each minute is 0.1ms, 0.2ms, 0.3ms, 0.4ms, 0.5ms, 0.1ms, 0.2ms, 0.3ms, 0.4ms, and 0.5ms respectively, the 10 first average response times are added in chronological order according to the acquisition time. The sequence constitutes a first average response time sequence, and the first average response time sequence can be in the form of (0.1, 0.2, 0.3, 0.4, 0.5, 0.1, 0.2, 0.3, 0.4, 0.5), [0.1, 0.2, 0.3, 0.4, 0.5, 0.1, 0.2, 0.3, 0.4, 0.5] or <0.1, 0.2, 0.3, 0.4, 0.5, 0.1, 0.2, 0.3, 0.4, 0.5>.
[0077] Perform linear fitting on at least one first average response time to obtain a first average response time judgment value, that is, perform linear fitting on the first average response time series as a whole, and form the following: Figure 3 The fitting curve is shown. At the same time, the mean square error (MSE) of each preset time interval is calculated. The MSE refers to the expected value of the square of the difference between the parameter estimate and the true value of the parameter. The MSE can evaluate the degree of data variation. The smaller the MSE value, the better the accuracy of the prediction model in describing the experimental data. The calculation formula for the MSE is:
[0078]
[0079] Then the root mean square error (RMSE) is obtained from the mean square error MSE. The calculation formula of the root mean square error RMSE is:
[0080]
[0081] The root mean square error (RMSE) is the square root of the mean square error (MSE) and is used to measure the deviation between the parameter estimate and the true parameter value. Using the RMSE as the first average response time judgment value can determine the difference between the calculated first average response time (parameter estimate) and the actual original response time (parameter true value) for each preset time interval within the preset time period, thereby determining the degree of response time change within the preset time period.
[0082] Please combine Figure 3 In an embodiment of the present invention, the second average response time threshold is obtained by multiplying the second average response time by a set value. The set value is: (1±0.2, i.e., 0.8 and 1.2). Taking AVG1 as the reference of the second average response time, the second average response time threshold is: (0.8*AVG1 to 1.2*AVG1), which is a threshold error range.
[0083] The first average response time judgment value and the second average response time threshold are compared to determine whether the variation in response time within each preset time interval is within the allowable range of the total average response time within the preset time period. Fluctuations in the database server's response time within the second average response time threshold are relatively normal, while those exceeding this range indicate significant fluctuations and an abnormality. Comparing the first average response time judgment value with the second average response time threshold is used to determine the actual minimum distance between the response time corresponding to each time interval and the second average response time threshold within the preset time period, thereby determining any continuous fluctuations in response data across multiple time intervals and time periods.
[0084] Example 5
[0085] For further information, see Figure 7 , after step S5, the following steps are included:
[0086] S7: Outputs the cause of the abnormal operation status of the database server.
[0087] When the first average response time judgment value is greater than the second average response time threshold, it proves that the interaction data between the database server and the client fluctuates violently, and the operation state of the database server can be determined to be abnormal, and the abnormal operation state is a "bumpy" operation state; and the abnormal reason is that the response time of the database server to the client fluctuates. After determining the abnormal reason, the device for detecting the operation state of the database server can output the abnormal reason to the terminal operated by the operation and maintenance personnel (such as a desktop computer, laptop computer, tablet computer, or even a smart phone). The operation and maintenance personnel can maintain the database server in a timely and effective manner according to the determined "bumpy" operation state and the abnormal reason for the fluctuation of the response time of the database server relative to the client, so as to ensure normal data interaction between the database server and the client and user experience.
[0088] Exemplarily, the above-mentioned detection device may output the cause of the abnormality in the form of a pop-up prompt box on the terminal of the operation and maintenance personnel, sending a prompt message, etc. There is no specific limitation on the form of outputting the cause of the abnormality. It can be selected in the actual embodiment as long as the cause of the abnormality is effectively output.
[0089] Furthermore, while the database server outputs the cause of the abnormality, it can also output a prompt signal indicating that the current operating status of the database server is abnormal, so that the operation and maintenance personnel can receive timely feedback on the abnormal operating status and deal with the abnormality in a timely and effective manner. The prompt signal can be sent by relevant equipment with prompt functions, such as terminals operated by operation and maintenance personnel, sound and light alarms located near operation and maintenance personnel, etc. For example, when an abnormality occurs, an immediate text pop-up message can be sent through the terminal, or an sound and light alarm can be sent through the sound and light alarm, so that the operation and maintenance personnel can be informed of the abnormal operating status of the database server and client in an intuitive and effective manner, thereby improving the maintenance efficiency of the database server and client.
[0090] Example 6
[0091] See also Figure 8 In the embodiment of the present invention, a device 10 for detecting the operating status of a database server and a client is provided. The database server is in communication with the client. The detection device 10 includes:
[0092] A first acquisition module 11 is configured to continuously acquire at least one first response time of the database server relative to the client within at least one preset time interval;
[0093] A first processing module 12 is configured to process at least one first response time to obtain a first average response time of the database server within each preset time interval and a second average response time of a preset time period consisting of at least one preset time interval;
[0094] A second processing module 13 is configured to process the second average response time and at least one first average response time to obtain a first average response time judgment value and a second average response time threshold;
[0095] A first judgment module 14 is configured to judge whether the first average response time judgment value is greater than a second average response time threshold;
[0096] The first determination module 15 is configured to determine that if yes, the operation status of the database server is abnormal.
[0097] The detection device 10 provided in the sixth embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned detection method in the first embodiment. For the sake of brief description, for matters not mentioned in the sixth embodiment of the detection device 10, reference may be made to the corresponding contents in the aforementioned method in the first embodiment.
[0098] Example 7
[0099] For further information, see Figure 9 , the detection device 10 further includes:
[0100] A selection module 16 is used to select a preset time point;
[0101] The second acquisition module 17 is configured to continuously acquire at least one first response time of the database server relative to the client within at least one preset time interval before a preset time point.
[0102] The detection device 10 provided in the seventh embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned detection method in the second embodiment. For the sake of brief description, for matters not mentioned in the seventh embodiment of the detection device 10, reference may be made to the corresponding contents in the aforementioned method in the second embodiment.
[0103] Example 8
[0104] For further information, see Figure 10 , the detection device 10 further includes:
[0105] A first calculation module 18 is configured to calculate an average value of at least one first response time to obtain a first average response time of the database server within each preset time interval;
[0106] The second calculation module 19 is configured to add at least one preset time interval to obtain a preset time period, and to add at least one first average response time to obtain a second average response time.
[0107] The detection device 10 provided in the eighth embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned detection method in the third embodiment. For the sake of brief description, for matters not mentioned in the eighth embodiment of the detection device 10, reference may be made to the corresponding contents in the aforementioned method in the third embodiment.
[0108] Example 9
[0109] For further information, see Figure 11 , the detection device 10 further includes:
[0110] A third processing module 20 is configured to add at least one first average response time in chronological order to form a first average response time sequence;
[0111] The third calculation module 21 is used to perform linear fitting on the first average response time series to obtain a root mean square error (RMS) of the first average response time at each preset time interval, and use the RMS as a first average response time judgment value;
[0112] The fourth processing module 22 is configured to multiply the second average response time by a set multiple to obtain a second average response time threshold.
[0113] The detection device 10 provided in the ninth embodiment of the present invention has the same implementation principle and technical effects as those of the fourth embodiment of the aforementioned detection method. For the sake of brief description, for matters not mentioned in the ninth embodiment of the detection device 10, reference may be made to the corresponding contents in the fourth embodiment of the aforementioned method.
[0114] Example 10
[0115] For further information, see Figure 12 , the detection device 10 further includes:
[0116] The output module 23 is used to output the abnormal reason of the abnormal operation status of the database server.
[0117] The detection device 10 provided in the tenth embodiment of the present invention has the same implementation principle and technical effects as those of the fifth embodiment of the aforementioned detection method. For the sake of brief description, for matters not mentioned in the tenth embodiment of the detection device 10, reference may be made to the corresponding contents in the fifth embodiment of the aforementioned method.
[0118] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for detecting the operating status of a database server, wherein the database server is in communication with a client, characterized in that: The detection method comprises: Continuously obtaining at least one first response time of the database server relative to the client within at least one preset time interval; Performing data processing on at least one of the first response times to obtain a first average response time of the database server within each of the preset time intervals and a second average response time of a preset time period consisting of at least one of the preset time intervals; Performing data processing on the second average response time and at least one of the first average response times to obtain a first average response time judgment value and a second average response time threshold; Determining whether the first average response time judgment value is greater than the second average response time threshold; If so, it is determined that the operation status of the database server is abnormal; There are multiple first response times and multiple preset time intervals, and processing data of at least one of the first response times to obtain a first average response time of the database server within each preset time interval and a second average response time of a preset time period consisting of at least one preset time interval includes: Calculating an average value of at least one of the first response times to obtain a first average response time of the database server within each of the preset time intervals; Adding at least one of the preset time intervals to obtain a preset time period, and adding at least one of the first average response times to obtain a second average response time; The performing data processing on the second average response time and at least one of the first average response times to obtain a first average response time judgment value and a second average response time threshold includes: Adding at least one of the first average response times in chronological order to form a first average response time sequence; Performing a linear fit on the first average response time series to obtain a root mean square error (RMSE) of the first average response time at each of the preset time intervals, and using the RMS error as a first average response time judgment value; The second average response time is multiplied by a set multiple to obtain a second average response time threshold.
2. The detection method according to claim 1, wherein Before continuously obtaining at least one first response time of the database server relative to the client within at least one preset time interval, the method includes: Select a preset time point; The continuously obtaining at least one first response time of the database server relative to the client within at least one preset time interval includes: Continuously obtaining at least one first response time of the database server relative to the client within at least one preset time interval before the preset time point.
3. The detection method according to claim 1, wherein After determining that the running state of the database server is abnormal, the method includes: Output the abnormal reason for the abnormal operation status of the database server.
4. A device for detecting the operating status of a database server, wherein the database server is in communication with a client, characterized in that: The detection device comprises: A first acquisition module, configured to continuously acquire at least one first response time of the database server relative to the client within at least one preset time interval; a first processing module, configured to perform data processing on at least one of the first response times to obtain a first average response time of the database server within each of the preset time intervals and a second average response time of a preset time period consisting of at least one of the preset time intervals; a second processing module, configured to perform data processing on the second average response time and at least one of the first average response times to obtain a first average response time judgment value and a second average response time threshold; A first judgment module is configured to judge whether the first average response time judgment value is greater than the second average response time threshold; A first determination module is configured to determine that if yes, the operation state of the database server is abnormal; a first calculation module, configured to calculate an average value of at least one of the first response times to obtain a first average response time of the database server within each of the preset time intervals; a second calculation module, configured to add at least one of the preset time intervals to obtain a preset time period, and to add at least one of the first average response times to obtain a second average response time; a third processing module, configured to add at least one of the first average response times in chronological order to form a first average response time sequence; a third calculation module, configured to perform a linear fit on the first average response time series to obtain a root mean square error (RMSE) of the first average response time at each of the preset time intervals, and use the RMS error as a first average response time judgment value; The fourth processing module is configured to multiply the second average response time by a set multiple to obtain a second average response time threshold.
5. The detection device according to claim 4, characterized in that Also includes: A selection module is used to select a preset time point; The second acquisition module is configured to continuously acquire at least one first response time of the database server relative to the client within at least one preset time interval before the preset time point.
6. The detection device according to claim 4, characterized in that Also includes: The output module is used to output the abnormal reason of the abnormal operation status of the database server.
Citation Information
Patent Citations
Abnormal service request identification method and terminal equipment
CN109492394A
Alarm method and device
CN109614291A
Interface response performance monitoring method and device, server and storage medium
CN111367765A