CN108964947B - Background service quality detection method and device and computer equipment - Google Patents

Background service quality detection method and device and computer equipment Download PDF

Info

Publication number
CN108964947B
CN108964947B CN201710354062.6A CN201710354062A CN108964947B CN 108964947 B CN108964947 B CN 108964947B CN 201710354062 A CN201710354062 A CN 201710354062A CN 108964947 B CN108964947 B CN 108964947B
Authority
CN
China
Prior art keywords
service
response
response success
background server
weight
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710354062.6A
Other languages
Chinese (zh)
Other versions
CN108964947A (en
Inventor
汤见乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710354062.6A priority Critical patent/CN108964947B/en
Publication of CN108964947A publication Critical patent/CN108964947A/en
Application granted granted Critical
Publication of CN108964947B publication Critical patent/CN108964947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • H04L43/55Testing of service level quality, e.g. simulating service usage
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/142Network analysis or design using statistical or mathematical methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Algebra (AREA)
  • Environmental & Geological Engineering (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a background service quality detection method, which comprises the following steps: the method comprises the steps of periodically sending service requests to a background server, receiving service responses returned by the background server according to the service requests, obtaining service response success rate corresponding to the service responses in the last period, obtaining an acceleration factor and response success weight of the last period, calculating response success weight of the current period according to the acceleration factor, the service response success rate of the last period and the response success weight of the last period, and detecting service quality of the background server according to the response success weight of the current period. The response success weight is calculated by utilizing the acceleration factor and the service response success rate, the service quality of the background server is detected by the response success weight, the detection on the background service quality is rapidly and accurately carried out on the premise of ensuring normal service, and the service quality of the background server is ensured. A background service quality detection device and a computer device are also provided.

Description

Background service quality detection method and device and computer equipment
Technical Field
The invention relates to the technical field of computers, in particular to a background service quality detection method and device and computer equipment.
Background
The background server may be abnormal due to a process code error, a machine failure, or a network abnormality, and therefore the service quality of the background server needs to be detected.
In the conventional technology, a machine is monitored by heartbeat of the machine, but the detection cannot be carried out on a specific service, and in addition, the detection result is influenced by the detection sensitivity, so that the detection result is inaccurate, and the service quality is greatly reduced.
Disclosure of Invention
Therefore, it is necessary to provide a background quality of service detection method and apparatus, and a computer device, for solving the above problems, and by calculating a response success weight through an acceleration factor and a service response success rate, the background quality of service can be quickly and accurately detected, thereby ensuring the background quality of service.
A background quality of service detection method comprises the following steps:
periodically sending a service request to a background server, and receiving a service response returned by the background server according to the service request;
acquiring a service response success rate corresponding to the service response in the last period;
acquiring an acceleration factor and a response success weight of a previous period;
calculating to obtain a response success weight of the current period according to the acceleration factor, the service response success rate of the previous period and the response success weight of the previous period, wherein the response success weight of the first period is a preset value;
and detecting the service quality of the background server according to the response success weight of the current period.
A background quality of service detection apparatus, comprising:
the receiving module is used for periodically sending a service request to a background server and receiving a service response returned by the background server according to the service request;
the first acquisition module is used for acquiring the service response success rate corresponding to the service response in the previous period, and acquiring an acceleration factor and the response success weight of the previous period;
the response success weight calculation module is used for calculating the response success weight of the current period according to the acceleration factor, the service response success rate of the previous period and the response success weight of the previous period, wherein the response success weight of the first period is a preset value;
and the detection module is used for detecting the service quality of the background server according to the response success weight of the current period.
A computer device comprising a memory having computer readable instructions stored therein and a processor that, when executed, performs the steps of the method of any one of claims 1 to 5
According to the background service quality detection method and device and the computer equipment, the service request is periodically sent to the background server, the service response returned by the background server according to the service request is received, the response success weight of the current period is obtained by obtaining the service response success rate of the previous period and the response success weight and the acceleration factor of the previous period, and therefore the service quality of the background server is detected according to the response success weight of the current period. The service quality of the background server is further detected according to the response success weight by counting the service response success rate of each period and combining with the periodic acquisition of the response success weight of the current period of the acceleration factor, a periodic counting method is adopted for detection, and the acceleration factor is used for accelerating the attenuation of the response success weight, so that the background service quality is rapidly and accurately detected, and the service quality of the background server can be ensured under the condition of ensuring normal service.
Drawings
FIG. 1 is a diagram of an exemplary implementation of a background QoS detection method;
fig. 2 is an internal structural view of the terminal of fig. 1;
FIG. 3 is a flow diagram of a background quality of service detection method in one embodiment;
FIG. 4 is a flow diagram of a background quality of service detection method in another embodiment;
FIG. 5 is a flow diagram of calculating a success weight for a response of a current cycle in one embodiment;
FIG. 5A is a graph of weight change in response to success in one embodiment;
FIG. 6 is a flow diagram of a background quality of service detection method in one embodiment;
FIG. 7 is a flow diagram of a method for detecting whether background services are back-to-normal in one embodiment;
FIG. 7A is a diagram illustrating an embodiment of detecting whether a backend server is back up;
FIG. 8 is a flow diagram of a background quality of service detection method in an embodiment;
FIG. 9 is a block diagram of an exemplary embodiment of a background QoS detection mechanism;
fig. 10 is a block diagram of a background qos detection apparatus according to another embodiment;
FIG. 11 is a block diagram of the structure of a detection module in one embodiment;
fig. 12 is a block diagram of a background qos detection apparatus according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 is a diagram of an application environment of the background qos detection method in an embodiment. As shown in fig. 1, the application environment includes a terminal 110 and a background server 120, wherein the terminal 110 and the background server 120 can communicate through a network. The terminal 110 periodically sends a service request to the backend server 120, and receives a service response corresponding to the service request returned from the backend server 120, further, the terminal 110 obtains a service response success rate corresponding to the backend server 120 in each period, calculates a response success weight in the current period according to the acceleration factor and the response success weight in the previous period, and then the terminal 110 detects the service quality of the backend server 120 according to the response success weight in the current period.
Fig. 2 is a schematic diagram of an internal structure of the terminal in one embodiment. As shown in fig. 2, the terminal includes a processor, a nonvolatile storage medium, an internal memory, and a network interface, a display screen, and an input device, which are connected through a system bus. The nonvolatile storage medium of the terminal stores an operating system, and the terminal further comprises a background service quality detection device, wherein the background service quality detection device is used for realizing a background service quality detection method. The processor is used for providing calculation and control capability and supporting the operation of the whole terminal. An internal memory in the terminal provides an environment for the operation of the background quality of service detection apparatus in the non-volatile storage medium, and the internal memory may store computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor may be caused to execute a background quality of service detection method. The network interface is used for performing network communication with the background server, for example, sending a service request to the background server, receiving a service response corresponding to the service request returned by the server, and the like. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen, and the input device can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the terminal, or an external keyboard, a touch pad or a mouse. The terminal can be a mobile phone, a tablet computer, a personal digital assistant or a wearable device. Those skilled in the art will appreciate that the configuration shown in fig. 2 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the terminal to which the present application is applied, and that a particular terminal may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
As shown in fig. 3, in one embodiment, a background quality of service detection method is provided, which includes the following steps:
step S310, periodically sending a service request to the background server, and receiving a service response returned by the background server according to the service request.
The service request refers to a request sent for acquiring a certain service, the service corresponding to the background server responds to the corresponding service request, and when a fault of the background server is detected according to the service response returned by the service request, the service request can be sent to other normal background servers, so that the current service can be normally provided while the background server is detected.
Specifically, the service quality of the background server is detected by detecting a service response corresponding to the service request. In order to avoid that when the detection sensitivity is too high, the detection is wrong due to the network jitter or the detection service quality is not timely due to the too low detection sensitivity, a plurality of service requests are periodically sent to the background server by using a statistical method, and the background server carries out service response on the service requests after receiving the service requests. Further, the service response includes two cases of a service response success and a service response failure, and the service response failure includes a service response error and an unresponsive case.
Step S320, obtaining a service response success rate corresponding to the service response in the previous period.
Specifically, after a service request sending period is finished, counting the total times of sending service requests to the background server and the times of successful service response of the background server in the period, and obtaining the service response success rate corresponding to the period according to the total times of the service requests and the times of successful service response in the period.
Further, in a period, the ratio of the number of successful background server service responses in the period to the total number of service request sending times is used as the service response success rate corresponding to the period. Namely, the service response success rate is the service response success times/total client access times. When calculating the response success weight of the current period, the service response success rate corresponding to the service response of the previous period needs to be used.
In step S330, the acceleration factor and the response success weight of the previous cycle are obtained.
The acceleration factor refers to a factor for attenuating the weight of successful acceleration response, and the weight of successful acceleration response can be reduced through certain operation, so that whether the service quality of the background server has faults or not can be detected in a few periods. The response success weight reflects the probability that a service request is sent to the background server, the background server can successfully respond to the service request, and the response success weight is a constant less than or equal to 1. And presetting an initial value of the response period weight, wherein the response success weight of each period is obtained by calculation according to the response success weight of the previous period, the acceleration factor and the service response success rate of the previous period.
Step S340, calculating a response success weight of the current period according to the acceleration factor, the service response success rate of the previous period, and the response success weight of the previous period, wherein the response success weight of the first period is a preset value.
Specifically, a calculation rule of the response success weight is preset, and the calculation rule can be customized, and the obtained acceleration factor, the service response success rate of the previous period and the response success weight of the previous period are calculated according to the preset calculation rule. The response success weight of the first period is preset, and assuming that the background server is normal, in one embodiment, the response success weight of the first period is set to be 1.
Further, the preset calculation rule of the response success weight may be that the service response success rate of the previous period is multiplied by an acceleration factor, and then the multiplied result is multiplied by the response success weight of the previous period, where the acceleration factor is a constant less than 1, and the attenuation of the response success weight can be accelerated. Specifically, the response success weight of the previous period is multiplied by the service response success rate of the previous period to obtain the response success weight of the current period, in order to improve the accuracy and speed of detection, an acceleration factor smaller than 1 is set, and the response success weight of the current period is multiplied by a preset acceleration factor each time the response success weight of the current period is calculated, so that the speed of reducing the response success weight is increased.
In other embodiments, the preset calculation rule of the response success weight is based on the service response success rate in the previous period, the preset acceleration factor is an index for calculation, and then the preset acceleration factor is multiplied by the response success weight in the previous period to obtain the response success weight in the current period, wherein the acceleration factor is an integer greater than 1. Because the success rate of the service response is a constant less than or equal to the success rate of the service response, the corresponding numerical value becomes smaller after the power operation is performed on the success rate of the service response, and the reduction of the success weight of the response is accelerated after the numerical value is multiplied by the success weight of the response in the previous period.
Specifically, the initial response success weight is preset to be 1, and after a first period for sending a service request is finished, the number of times of successful service response in the first period is counted, and the service response success rate is calculated. And obtaining the response success weight corresponding to the second period according to the service response success rate and the initial response success weight of the first period and the acceleration factor, and calculating the response success weight of each period by analogy.
And step S350, detecting the service quality of the background server according to the response success weight of the current period.
Specifically, a response success weight corresponding to a normal service quality is preset, and each time a response success weight of one cycle is obtained from the first cycle, the response success weight of the current cycle is compared with a preset response success weight corresponding to a normal service quality, so as to detect the service quality of a background server currently sending a service request.
Further, when the background server is detected to be normal according to the response success weight of the current period, the detection of the next period is continued to detect the service quality of the background server in real time, and if the background server is detected to be abnormal according to the response success weight of the current period, the service request is stopped from being sent to the background server, so that the response failure of the service request is avoided, and the service quality is improved.
In this embodiment, the service request is periodically sent to the background server, and the service response returned by the background server according to the service request is received, so as to obtain the service response success rate corresponding to each period, thereby obtaining the response success weight of the current period by using the preset acceleration factor, the service response success rate of the previous period, and the response success weight of the previous period according to the preset calculation rule, and detecting the service quality of the background server in real time according to the response success weight of the current period. The response success weight is calculated by utilizing the service response success rate obtained by statistics, the statistical characteristic is realized, the wrong judgment cannot be made due to the change of a certain time point or a certain moment, the service request is continuously and periodically sent to count the service response success rate, the fault of the background server can be timely found, and meanwhile, the acceleration factor is used, the detection speed of the service quality of the background server is further improved, so that the detection of the background service quality can be quickly and accurately carried out, and the service quality of the background server can be detected under the condition of ensuring normal service.
As shown in fig. 4, in an embodiment, before step S320, the method further includes:
step S310A, obtaining the number of consecutive failures corresponding to the service response within the preset time.
Specifically, after it is detected that a service request is sent to a certain background server within a preset time, a service response returned by the background server fails continuously, and then the number of times of continuous failure of the service response is obtained.
Step S310B, if the number of consecutive failures is greater than the preset threshold, determining that the background server has a failure, and stopping sending the service request to the background server, otherwise, performing the step of obtaining the service response success rate corresponding to the service response in the previous period.
Specifically, a threshold value of the number of continuous failures within the preset time is preset, and when the number of continuous failures of the service response of the background server within the preset time is greater than the threshold value, it is determined that the background server fails. For example, the preset number of consecutive failures in the preset time is set to 20, and assuming that the success rate of the service response of the backend server is 0.5, the probability P of the consecutive 20 failures is (0.5) ^20 is 0.000095%, and it can be seen that the probability of the consecutive 20 service response failures of the backend server is very low. Therefore, when the number of times of continuous failure is detected to be more than 20 times within the preset time, it can be determined that the background server fails to provide the service currently, and the service request is stopped from being sent to the service background server.
Further, if the number of continuous failures is less than a preset threshold, which may be a failure of service response due to network jitter of the background server, a statistical method is adopted to periodically send a service request to the service quality of the background server for detection.
In the embodiment, the service quality of the background server is judged according to the relation between the continuous failure times and the preset threshold value by detecting the continuous failure times of the service response within the preset time, and when the continuous failure times within the preset time are greater than the preset threshold value, the background server is directly judged to have a fault without subsequent detection, so that the detection time is saved, the faulty background server can be quickly eliminated, and the service quality of the background server is improved.
As shown in fig. 5, in one embodiment, step S340 includes:
in step S340A, a first operation result is obtained by taking the acceleration factor as an index calculation with the success rate of the service response in the above one period as a base.
Specifically, the ratio of the number of successful service response times in the previous period to the total number of service request times in the previous period is used as the service response success rate, and the acceleration factor is preset to be a constant greater than 1. The service quality of the background server is detected by detecting the response success weight of the current period, and in order to shorten the detection period of the fault detection of the background server, the attenuation of the response success weight needs to be accelerated. Since the service response success rate is a constant less than 1, multiplying the service response success rate itself can reduce the operation result. Further, the service response success rate of the above one period is used as a base number, and the acceleration factor is used as an index to calculate to obtain a first operation result.
Step S340B, the first operation result is multiplied by the response success weight of the previous cycle to obtain the response success weight of the current cycle.
Specifically, the first operation result is multiplied by the response success weight of the previous cycle to obtain the response success weight of the current cycle. For example, if the acceleration factor is set to 4, the initial response success weight is W0, and the service response success rate in the first period is the service response success number/the total access number of the clients, the response success weight W1 in the second period is W0 (ratio) according to the preset calculation rule. And by analogy, the response success weight of the current period is the response success weight of the previous period (the previous period service response success rate) 4. Further, as shown in fig. 5A, taking the service response success rate of each period as 0.98 and the initial response success weight W0 as 1, by using the response weight calculation rule of the current period, the response success weight W1 of the second period obtained according to the initial response success weight and the service response success rate of the first period is 0.92, and so on, the response success weights of the first five periods obtained by calculation are sequentially 1, 0.92, 0.84, 0.77, and 0.70, respectively. If the alarm is set to be sent when the weight of the response success is lower than 0.7, the corresponding background server with the response success rate of 0.98 can detect the fault only by four cycles.
In this embodiment, the service response success rate is used as a base number, the acceleration factor is used as an index to obtain a first calculation result, and the first calculation result is multiplied by the response success weight of the previous period to obtain the response success weight of the current period. The reduction of successful weight of response is accelerated through exponential operation, so that the detection period of the background server is shortened, and the service quality of the background server can be rapidly and accurately detected.
As shown in fig. 6, in one embodiment, step S350 includes:
in step S350A, a response success weight threshold is obtained.
Specifically, a response success weight threshold is preset, and the response success weight threshold may be set according to a service scenario of the background server, and if a service responded by the background server is a key service, a higher response success weight threshold is set. And taking the response success weight threshold as an index for judging whether the background server fails or not.
Step S350B, determining whether the response success weight of the current cycle is less than the response success weight threshold, if yes, executing step S350C, otherwise, executing step S350D.
Specifically, after the response success weight of the current period is calculated according to the acceleration factor, the service response success rate of the previous period, and the response success weight of the previous period according to the preset calculation rule, the response success weight of the current period is compared with the preset response success weight threshold, if the response success weight of the current period is smaller than the response success weight threshold, the step S350C is executed, otherwise, the step S350D is executed.
Further, a response success weight of the second period is calculated according to a preset initial weight value, a service response success rate of the first period and an acceleration factor, the response success weight of the second period is compared with a preset response success weight threshold, if the response success weight of the second period is greater than the preset response success weight threshold, the step S350C is executed, otherwise, the step S350D is executed.
In step S350C, it is determined that the backend server has a failure.
Specifically, when it is detected that the response success weight of the current period is smaller than the response success weight threshold, it is indicated that the probability that the background server can successfully respond to the service request in the current period is lower than a preset value, and the requirement of the current service cannot be met, and it is determined that the background server has a fault.
And step S350D, calculating the response success weight of the next period, and detecting the service quality of the background server according to the response success weight of the next period.
Specifically, when it is detected that the response success weight of the current period is greater than the response success weight threshold, but if the response success weight of the current period is in a descending trend compared with the response success weight of the previous period, that is, the background server cannot successfully respond to all service requests, in order to avoid service response failure caused by jitter of the background server, the service response success rate of the current period is obtained, the response success weight of the next period is calculated, and the service quality of the background server is detected according to the response success weight of the next period.
Further, if the response success weight of the next period is still larger than the response success weight threshold value, the response success weight of the next period is continuously detected. And if the weight of the response success in the current period is detected to be smaller than the preset threshold, indicating that the background server fails. Particularly, if the background server has no fault, the service response success rate of each period is 1, and the response success weight is always 1. And the response success weight threshold value is set, so that the response success weight can be ensured not to show a decay trend in a plurality of periods even if the response success rate is not 1 due to server jitter in a certain period, and the service quality of the background server can be accurately detected.
In this embodiment, the response success weight threshold is preset, the response success weight of the current period is compared with the preset response success weight threshold, and the service quality of the background server is determined. The periodic detection method is adopted, false detection caused by shaking of a certain period of background servers is avoided, service requests can be sent periodically and continuously, the service quality of the background servers can be detected quickly and accurately, and corresponding operation is executed to guarantee the background service quality.
As shown in fig. 7, in an embodiment, the background quality of service detection method further includes:
step S410, counting the number of the received successful data packets of the service response, if the number reaches a preset threshold value, sending a detection packet to the abnormal server, initializing the number of the successful data packets of the service response, and entering the step of counting the number of the received successful data packets of the service response.
The abnormal server is a background server which is judged to have a fault, and the detection packet is a data packet corresponding to a service request for detecting whether the abnormal server recovers to be normal or not.
Specifically, when the fault detection is performed on the background server, in order to reasonably use the normal server, the background server which is determined to have the fault is detected, and whether the normal server is recovered is determined. Further, a threshold value of the number of the data packets successfully responded by the service is preset, a service request is sent to the normal background server, the number of the data packets successfully responded by the received service is counted, and when the number of the data packets successfully responded by the service received from the normal background server reaches the preset threshold value, a detection packet is sent to the abnormal server to detect the service quality of the abnormal server.
After a detection packet is sent, the number of the data packets with successful service response is initialized, then the data packets with successful service response of the normal background server are counted again, when the number of the data packets with successful service response reaches a preset threshold value, the detection packet is sent to the abnormal server again, and the detection packet is sent periodically.
Particularly, the threshold of the number of the data packets successfully responded by the normal background server service is set to ensure that even if the response of the detection packet sent to the abnormal background server fails, the success rate of the normal background server is not greatly affected, and the false detection of the normal background server is caused.
Step S420, if the probe response data packet corresponding to the probe packet sent by the consecutive preset number of probes is a successful response data packet, it is determined that the background server is recovered to normal.
Specifically, after each initialization, when the number of the service response success data packets returned by the normal background server reaches a preset threshold value, a detection packet is sent to the abnormal server, response data corresponding to the detection packet of the abnormal server is obtained, whether the response data is successful or not is detected, and if the detection packets of the continuous preset times are successfully responded, the background server is judged to be normal. Furthermore, because the service response success data packets sent by the normal background servers with the preset number are spaced between every two detection packets, when the detection packets with the preset number of times are successfully responded, the background servers are restored to be normal, and the service requests can be responded normally.
For example, as shown in fig. 7A, it is configured that each time the client 710 receives 10000 service response successful data packets, a probe packet is sent to the background server 720, after 10 times of the upgrade process, that is, after the client 710 passes (10 × 10000) normal service packets, 10 probe packets of the abnormal background server 720 are already sent, and if 10 times of consecutive detections show that a response corresponding to a probe packet is successfully responded data, it is determined that the background server 720 is recovered to be normal and can be put into use. Specifically, 10000 service response success data packets are set, even if detection of the probe packets fails, the calculated total service response success rate is 10000/10001-99.99%, the service response success rate still reaches 4 and 9, and no great influence is caused on other service detection.
In other embodiments, if it is not detected that the probe response data packet corresponding to the probe packet sent by the consecutive preset number of probes is a successful response data packet, it is determined whether the time when the background server fails exceeds a preset time threshold, and if so, the use of the background server is resumed, thereby avoiding that a certain service of the background server is in an unusable state for a long time due to response failure or network or other reasons caused by jitter of the certain service of the background server.
In this embodiment, the received service response success data packets are counted, when the service response success data packets reach a preset threshold, a probe packet is sent, and when response data packets corresponding to probe packets of consecutive times are detected as response success data packets, it is determined that the background server is recovered to be normal. By presetting the number of successful service response data packets and the continuous successful response times of the detection packets, the time span for detecting the background server is increased, the detection accuracy is improved, and the background server which is recovered to be normal is ensured to be detected timely and accurately for reuse.
As shown in fig. 8, in an embodiment, a background quality of service detection method is provided, which includes:
step S510, periodically sending a service request to the background server, and receiving a service response returned by the background server according to the service request.
Step S520, obtaining the continuous failure times corresponding to the service response within the preset time, and determining whether the continuous failure times are greater than a preset time threshold, if yes, performing step S530, and if not, performing step S540.
Step S530, judging that the background server has a fault, and stopping sending the service request to the background server.
And step S540, acquiring the service response success rate corresponding to the service response in the previous period, and acquiring the acceleration factor and the response success weight of the previous period.
And step S550, calculating a response success weight of the current period according to the acceleration factor, the service response success rate of the previous period and the response success weight of the previous period, wherein the response success weight of the first period is a preset value.
Step S560, obtaining a response success weight threshold, and determining whether the response success weight of the current period is smaller than the response success weight threshold, if so, performing step S530, and if not, performing step S570.
Step S570, calculating the response success weight of the next cycle, and executing step S540 with the next cycle as the current cycle.
Step S580, counting the number of the received successful service response data packets, if the number reaches a preset threshold, sending a probe packet to the abnormal server, initializing the number of the successful service response data packets, and entering the step of counting the number of the received successful service response data packets.
In step S590, if the probe response data packet corresponding to the probe packet sent by the consecutive preset number of probes is a successful response data packet, it is determined that the background server is recovered to normal.
In this embodiment, the service request is periodically sent to the background server, the service response returned by the background server is received, and the response success weight of the next period is calculated according to the service response success rate and the response success weight of each period, so as to detect whether the server fails. The service state of the background server is detected by periodically sending the service request by adopting a statistical method, the whole service quality is not influenced by the oscillation of a certain service, and the abnormal service IP cannot be detected for a long time.
As shown in fig. 9, in one embodiment, a background quality of service detection apparatus is provided, including:
the receiving module 610 is configured to periodically send a service request to the background server, and receive a service response returned by the background server according to the service request.
The first obtaining module 620 is configured to obtain a service response success rate corresponding to a service response in a previous period, and obtain an acceleration factor and a response success weight of the previous period.
The response success weight calculating module 630 is configured to calculate a response success weight of the current period according to the acceleration factor, the service response success rate of the previous period, and the response success weight of the previous period, where the response success weight of the first period is a preset value.
And the detecting module 640 is configured to detect the service quality of the background server according to the response success weight of the current period.
In this embodiment, the service request is periodically sent to the background server, and the service response returned by the background server according to the service request is received, so as to obtain the service response success rate corresponding to each period, thereby obtaining the response success weight of the current period by using the preset acceleration factor, the service response success rate of the previous period, and the response success weight of the previous period according to the preset calculation rule, and detecting the service quality of the background server in real time according to the response success weight of the current period. The response success weight is calculated by utilizing the service response success rate obtained by statistics, the statistical characteristic is realized, the wrong judgment cannot be made due to the change of a certain time point or a certain moment, the service request is continuously and periodically sent to count the service response success rate, the fault of the background server can be timely found, and meanwhile, the acceleration factor is used, the detection speed of the service quality of the background server is further improved, so that the detection of the background service quality can be quickly and accurately carried out, and the service quality of the background server is detected on the premise of ensuring normal service.
As shown in fig. 10, in an embodiment, the background quality of service detecting apparatus further includes:
the second obtaining module 650 is configured to obtain the number of consecutive failures corresponding to the service response within the preset time.
And the failure detection module 660 is configured to determine that the background server fails if the number of consecutive failures is greater than a preset threshold, stop sending the service request to the background server, and otherwise enter the first obtaining module.
In an embodiment, the response success weight calculating module 630 is further configured to calculate a first operation result by using an acceleration factor as an index based on the service response success rate in the previous period, and multiply the first operation result by the response success weight in the previous period to obtain the response success weight in the current period.
As shown in fig. 11, in one embodiment, the detection module 640 includes:
a threshold obtaining module 640A, configured to obtain a response success weight threshold.
The determining module 640B is configured to determine whether the response success weight of the current period is smaller than the response success weight threshold, if so, determine that the background server has a fault, otherwise, calculate a response success weight of the next period, and detect the service quality of the background server according to the response success weight of the next period.
As shown in fig. 12, in an embodiment, the background quality of service detecting apparatus further includes:
the detecting module 670 is configured to count the number of the received successful service response data packets, send a detection packet to the abnormal server if the number reaches a preset threshold, initialize the number of the successful service response data packets, and perform a step of counting the number of the received successful service response data packets.
The recovery detecting module 680 is configured to determine that the background server recovers to a normal state if the probe response data packet corresponding to the probe packet sent by the consecutive preset number of probes is a successful response data packet.
In one embodiment, a computer device is provided, the computer device comprising a memory and a processor, the memory having computer-readable instructions stored therein, the processor, when executing the computer-readable instructions, causing the processor to perform the steps of: periodically sending a service request to a background server, and receiving a service response returned by the background server according to the service request; acquiring a service response success rate corresponding to the service response in the last period; acquiring an acceleration factor and a response success weight of a previous period; calculating to obtain a response success weight of the current period according to the acceleration factor, the service response success rate of the previous period and the response success weight of the previous period, wherein the response success weight of the first period is a preset value; and detecting the service quality of the background server according to the response success weight of the current period.
According to the computer equipment, the service request is periodically sent to the background server, the service response success rate of each period is counted, the fault of the background server can be found in time, the detection speed of the service quality of the background server is further improved by using the acceleration factor, and therefore the detection of the background server can be rapidly and accurately carried out on the premise of guaranteeing normal service, and the service quality of the detected background server is guaranteed.
In one embodiment, the computer readable instructions further cause the processor to perform the steps of: acquiring the continuous failure times corresponding to the service response within the preset time; and if the continuous failure times are larger than a preset threshold value, judging that the background server fails, stopping sending the service request to the background server, and otherwise, entering the step of obtaining the service response success rate corresponding to the service response in the previous period.
In one embodiment, the calculating, performed by the processor, the response success weight of the current cycle according to the acceleration factor, the service response success rate of the previous cycle, and the response success weight of the previous cycle includes: calculating by taking an acceleration factor as an index to obtain a first operation result by taking the service response success rate of the above one period as a base number; and multiplying the first operation result by the response success weight of the previous period to obtain the response success weight of the current period.
In one embodiment, the detecting the quality of service of the background server according to the response success weight of the current period executed by the processor comprises: acquiring a response success weight threshold; judging whether the response success weight of the current period is smaller than a response success weight threshold value or not, and if so, judging that the background server has a fault; otherwise, calculating the response success weight of the next period, and detecting the service quality of the background server according to the response success weight of the next period.
In one embodiment, the computer readable instructions further cause the processor to perform the steps of: counting the number of the received successful data packets of the service response, if the number reaches a preset threshold value, sending a detection packet to an abnormal server, initializing the number of the successful data packets of the service response, and entering the step of counting the number of the received successful data packets of the service response; and if the detection response data packet corresponding to the detection packet sent by the continuous preset detection times is a successful response data packet, judging that the background server is recovered to be normal.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A background quality of service detection method, the method comprising:
periodically sending a service request to a background server, and receiving a service response returned by the background server according to the service request;
acquiring a service response success rate corresponding to the service response in the last period;
acquiring an acceleration factor and a response success weight of a previous period;
calculating to obtain a response success weight of the current period according to the acceleration factor, the service response success rate of the previous period and the response success weight of the previous period, wherein the response success weight of the first period is a preset value, and the acceleration factor refers to a factor for attenuating the response success weight;
and detecting the service quality of the background server according to the response success weight of the current period.
2. The method according to claim 1, wherein before the step of obtaining the service response success rate corresponding to the service response in the previous period, the method further comprises:
acquiring the continuous failure times corresponding to the service response within the preset time;
and if the continuous failure times are larger than a preset threshold value, judging that the background server fails, stopping sending the service request to the background server, and otherwise, entering the step of acquiring the service response success rate corresponding to the service response in the previous period.
3. The method of claim 1, wherein the step of calculating the response success weight of the current cycle according to the acceleration factor, the service response success rate of the previous cycle, and the response success weight of the previous cycle comprises:
calculating by taking the service response success rate of the previous period as a base number and the acceleration factor as an index to obtain a first operation result;
and multiplying the first operation result by the response success weight of the last period to obtain the response success weight of the current period.
4. The method of claim 1, wherein the step of detecting the quality of service of the background server according to the response success weight of the current period comprises:
acquiring a response success weight threshold;
judging whether the response success weight of the current period is smaller than the response success weight threshold value or not, and if so, judging that the background server has a fault;
otherwise, calculating the response success weight of the next period, and detecting the service quality of the background server according to the response success weight of the next period.
5. The method of claim 1, further comprising:
counting the number of the received successful data packets of the service response, if the number reaches a preset threshold value, sending a detection packet to an abnormal server, initializing the number of the successful data packets of the service response, and entering the step of counting the number of the received successful data packets of the service response;
and if the detection response data packet corresponding to the detection packet sent by the continuous preset detection times is a successful response data packet, judging that the background server is recovered to be normal.
6. A background quality of service detection apparatus, the apparatus comprising:
the receiving module is used for periodically sending a service request to a background server and receiving a service response returned by the background server according to the service request;
the first acquisition module is used for acquiring the service response success rate corresponding to the service response in the previous period, and acquiring an acceleration factor and the response success weight of the previous period;
the response success weight calculation module is used for calculating the response success weight of the current period according to the acceleration factor, the service response success rate of the previous period and the response success weight of the previous period, wherein the response success weight of the first period is a preset value, and the acceleration factor refers to a factor for attenuating the response success weight;
and the detection module is used for detecting the service quality of the background server according to the response success weight of the current period.
7. The apparatus of claim 6, further comprising:
the second acquisition module is used for acquiring the continuous failure times corresponding to the service response within the preset time;
and the fault detection module is used for judging that the background server has a fault if the continuous failure times are larger than a preset threshold value, stopping sending a service request to the background server, and otherwise, entering the first acquisition module.
8. The apparatus according to claim 6, wherein the response success weight calculating module is further configured to calculate a first operation result by using the acceleration factor as an index and taking the service response success rate of the previous period as a base number, and multiply the first operation result by the response success weight of the previous period to obtain the response success weight of the current period.
9. The apparatus of claim 6, wherein the detection module comprises:
a threshold value obtaining module, configured to obtain a response success weight threshold value;
and the judging module is used for judging whether the response success weight of the current period is smaller than the response success weight threshold value, if so, judging that the background server has a fault, otherwise, calculating the response success weight of the next period, and detecting the service quality of the background server according to the response success weight of the next period.
10. The apparatus of claim 6, further comprising:
the detection module is used for counting the number of the received successful data packets of the service response, if the number reaches a preset threshold value, sending the detection packets to an abnormal server, initializing the number of the successful data packets of the service response, and entering the step of counting the number of the received successful data packets of the service response;
and the recovery detection module is used for judging that the background server is recovered to be normal if the detection response data packet corresponding to the detection packet sent by the continuous preset detection times is a successful response data packet.
11. A computer device comprising a memory having computer-readable instructions stored therein and a processor that, when executed, performs the steps of the method of any one of claims 1-5.
12. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 5.
CN201710354062.6A 2017-05-18 2017-05-18 Background service quality detection method and device and computer equipment Active CN108964947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710354062.6A CN108964947B (en) 2017-05-18 2017-05-18 Background service quality detection method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710354062.6A CN108964947B (en) 2017-05-18 2017-05-18 Background service quality detection method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN108964947A CN108964947A (en) 2018-12-07
CN108964947B true CN108964947B (en) 2020-11-17

Family

ID=64462000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710354062.6A Active CN108964947B (en) 2017-05-18 2017-05-18 Background service quality detection method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN108964947B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109698774A (en) * 2019-02-20 2019-04-30 北京百度网讯科技有限公司 Method and device for monitoring device working condition
CN110636109B (en) * 2019-08-19 2022-05-13 咪咕视讯科技有限公司 Node scheduling optimization method, server and computer readable storage medium
CN113518020A (en) * 2021-09-13 2021-10-19 苏州浪潮智能科技有限公司 Method, device and equipment for detecting disconnection return and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7760722B1 (en) * 2005-10-21 2010-07-20 Oracle America, Inc. Router based defense against denial of service attacks using dynamic feedback from attacked host
CN102340437A (en) * 2010-07-15 2012-02-01 腾讯数码(天津)有限公司 Network fault tolerance method and device
CN103188755A (en) * 2013-01-06 2013-07-03 西安交通大学 Mobile perception service node selection method facing to internet of things
CN105282259A (en) * 2015-11-13 2016-01-27 深圳联友科技有限公司 Load balancing allocation method, agent and system used for background cluster service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7760722B1 (en) * 2005-10-21 2010-07-20 Oracle America, Inc. Router based defense against denial of service attacks using dynamic feedback from attacked host
CN102340437A (en) * 2010-07-15 2012-02-01 腾讯数码(天津)有限公司 Network fault tolerance method and device
CN103188755A (en) * 2013-01-06 2013-07-03 西安交通大学 Mobile perception service node selection method facing to internet of things
CN105282259A (en) * 2015-11-13 2016-01-27 深圳联友科技有限公司 Load balancing allocation method, agent and system used for background cluster service

Also Published As

Publication number Publication date
CN108964947A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
US10949535B2 (en) Security model training and threshold selection
US10158541B2 (en) Group server performance correction via actions to server subset
CN108377201B (en) Network anomaly sensing method, device, equipment and computer readable storage medium
Cotroneo et al. A fault correlation approach to detect performance anomalies in virtual network function chains
US10452469B2 (en) Server performance correction using remote server actions
CN108964947B (en) Background service quality detection method and device and computer equipment
CN104506392B (en) A kind of delay machine detection method and equipment
CN105335271A (en) State monitoring apparatus and comprehensive monitoring system and method
CN111404759A (en) Service detection method, rule configuration method, related device and medium
CN106330588B (en) BFD detection method and device
US9417949B1 (en) Generic alarm correlation by means of normalized alarm codes
CN113326181A (en) Fuzzy test method, device and storage medium for stateful network protocol
US11044329B2 (en) Client application user experience tracking
CN106911494A (en) A kind of failure solution and device
CN109101371B (en) Disaster recovery switching method and device
CN111865720B (en) Method, apparatus, device and storage medium for processing request
CN115315922A (en) Detecting metrics indicative of network operating characteristics and identifying and controlling based on detected anomalies
CN114978945B (en) Network dial testing method based on edge node, server cluster and related equipment
CN108039956A (en) Using monitoring method, system and computer-readable recording medium
CN107018039B (en) Method and device for testing performance bottleneck of server cluster
CN103731315A (en) Server failure detecting method
CN114116128B (en) Container instance fault diagnosis method, device, equipment and storage medium
CN114610560B (en) System abnormality monitoring method, device and storage medium
CN116016266A (en) Health check implementation method and device based on API gateway
CN111901174B (en) Service state notification method, related device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant