WO2015090248A1 - Server overload protection method and device - Google Patents

Server overload protection method and device Download PDF

Info

Publication number
WO2015090248A1
WO2015090248A1 PCT/CN2015/073012 CN2015073012W WO2015090248A1 WO 2015090248 A1 WO2015090248 A1 WO 2015090248A1 CN 2015073012 W CN2015073012 W CN 2015073012W WO 2015090248 A1 WO2015090248 A1 WO 2015090248A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
system load
load information
request
preset
Prior art date
Application number
PCT/CN2015/073012
Other languages
French (fr)
Chinese (zh)
Inventor
苏士杰
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2015090248A1 publication Critical patent/WO2015090248A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5022Workload threshold

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a server overload protection method and apparatus.
  • the embodiment of the invention provides a method and device for overload protection of a server.
  • the technical solution is as follows:
  • a method for overload protection of a server comprising:
  • an overload protection device for a web server including a processor And a processor readable storage medium having a plurality of modules stored on the processor readable storage medium, including:
  • a first receiving module configured to receive a pending request
  • a first acquiring module configured to acquire current system load information of the server
  • a first determining module configured to compare the current system load information of the server with a preset system load threshold, and determine whether the server is overloaded according to the comparison result
  • a processing module configured to refuse to process the to-be-processed request when determining that the server is overloaded.
  • the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, by comparing the current system load information of the server with a preset system load threshold, the comparison result can be Accurately determine whether the server is overloaded, so as to ensure better overload protection of the server by refusing to process the request when determining that the server is overloaded.
  • FIG. 1 is a flowchart of a method for overload protection of a server according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of a method for overload protection of a server according to Embodiment 2 of the present invention
  • FIG. 3 is a flowchart of a method for overload protection of a server according to Embodiment 3 of the present invention.
  • FIG. 4 is a schematic structural diagram of an overload protection device for a server according to Embodiment 4 of the present invention.
  • FIG. 5 is a schematic structural diagram of an overload protection device for a server according to Embodiment 5 of the present invention.
  • the embodiment of the present invention provides a method for overload protection of a server.
  • the method provided in this embodiment is described by using the system load information of the server as a basis for determining whether the server is overloaded. Referring to FIG. 1, the method process provided by this embodiment includes:
  • the current system load information of the server is obtained, including but not limited to:
  • the system load information of the pre-stored server expires, the system load information of the server is re-acquired, and the obtained system load information is used as the current system load information of the server.
  • obtaining current system load information of the server including but not limited to:
  • the system load information of the pre-stored server When the system load information of the pre-stored server has not expired, the system load information of the pre-stored server is read, and the read system load information is used as the current system load information of the server.
  • the method further includes:
  • the method further includes:
  • the step of setting and storing the system load threshold according to the system load threshold setting command is performed.
  • the step of rejecting the processing of the processing request is performed.
  • the step of rejecting the processing of the processing request is performed.
  • the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, the current system load information of the server is compared with a preset system load threshold. After that, according to the comparison result, it is possible to accurately determine whether the server is overloaded, thereby achieving better overload protection of the server by rejecting the processing of the processing request when determining that the server is overloaded.
  • An embodiment of the present invention provides a method for protecting an overload of a server.
  • the method provided in this embodiment is described by taking the example of the server as an example. Referring to FIG. 2, the method process provided by this embodiment includes:
  • the embodiment does not specifically limit the type of the to-be-processed request, including but not limited to a connection request, a service request, and the like.
  • This embodiment does not specifically limit the content of the current system load information of the server, including but not limited to the current local resource usage rate of the server.
  • the local resource usage rate includes at least one of a CPU (Central Processing Unit) usage rate, a memory usage rate, and a network bandwidth usage rate.
  • the manner of obtaining the current system load information of the server is also not limited in this embodiment, including but not limited to the following two methods:
  • the first way directly obtain the current system load information of the server
  • the system load information of the server is used as the local resource usage rate of the server.
  • This embodiment does not specifically limit the manner in which the current system load information of the server is directly obtained, including but not limited to the server local according to the measurement.
  • the specific usage of the resource calculate the usage rate of each resource, and use the calculated usage rate of each resource as the current system load information of the obtained server.
  • the memory on the server is 8 GB.
  • the network application on the server occupies 4 GB of memory, and the memory usage on the current server is 50. %, the calculated memory usage is 50% as a system load information obtained.
  • the system load information of the server obtains the current system load information of the server.
  • the method for pre-acquiring the system load information of the server may be performed according to the foregoing first manner. After acquiring the system load information of the server, the system load information may be stored in a storage medium on the server. Then, according to whether the system load information of the pre-stored server expires to determine how to obtain the current system load information of the server, the following can be divided into the following two cases:
  • the system load information of the pre-stored server expires, the system load information of the server is re-acquired, and the obtained system load information is used as the current system load information of the server;
  • determining whether the system load information of the pre-stored server is expired may be as follows:
  • the system load information of the server When the system load information of the server is pre-stored, the specific time for storing the system load information can be recorded at the same time. When a new pending request arrives, obtain the specific time at this time, and subtract the specific time of the storage system load information from the specific time obtained. If the obtained difference is smaller than the previously set time period, determine The system load information of the pre-stored server has not expired. Otherwise, it is determined that the system load information of the pre-stored server has expired. Certainly, the system load information of the pre-stored server may be determined to be expired, which is not specifically limited in this embodiment. In addition, the value of the time period can be set as needed, and this embodiment is also not specifically limited. In order to make the stored system load information reflect the real situation of the current system load information of the server, the set time period is as small as possible.
  • the memory usage rate obtained by the server is 60% at 10:30, and the preset time period is 5 minutes. If a new one arrives at 10:34, For the pending request, the difference between 10:34 and 10:30 is 4 minutes, which is less than the preset time period of 5 minutes. Therefore, it can be judged that the system load information of the pre-stored server has not expired. If a new pending request comes at 10:36, 10:36 and 10 The difference of 30 points is 6 minutes, which is greater than the preset time period of 5 minutes. Therefore, it can be judged that the system load information of the pre-stored server has expired.
  • the system load information of the pre-stored server may be re-acquired according to the first manner, and the obtained system load information is used as the current system load information of the server. Further, after the system load information is obtained, the acquired system load information may be updated to the storage medium of the server, and the specific time for storing the system load information is updated at the same time, which is not specifically limited in this embodiment.
  • the system load information of the pre-stored server is not expired, the system load information of the pre-stored server is read, and the read system load information is used as the current system load information of the server.
  • the CPU usage of a system load information measured to the server is 60% at 10:35:30, after this time. Within 3 seconds, the CPU usage of the server measured at 10:35:31 may be 60.1%, that is, the CPU usage varies little and has stability within 3 seconds.
  • the system load information acquired before is still referenced within a certain period of time. Therefore, it can be determined whether the system load information of the pre-stored server is expired, when the pre-stored server is When the system load information expires, it can be stated that the previously obtained system load information is not referenced.
  • the pre-stored system load information is read, and the read system load information is used as the current system load information of the server.
  • the stability of the system load information of the server is utilized in a certain period of time, according to the second method described above, the current system of the server. Load information is obtained, which can shorten the acquisition The time taken by the server for current system load information, while saving server resources, thereby improving the efficiency of obtaining the current system load information of the server.
  • the system load threshold is a local resource usage threshold.
  • the specific value of the system load threshold may be set according to the specific performance of the system or the specific requirements. This embodiment does not specifically limit this, including but not limited to the following:
  • the system load threshold setting command may adopt a URL (Uniform Resource Locator) format.
  • the server parses the received URL format command, obtains the system load threshold carried in the URL format command, and obtains the system load threshold.
  • the system load threshold is stored.
  • the system load threshold setting command may also adopt other formats, such as a text message format, which is not specifically limited in this embodiment.
  • the system load information includes multiple types of information
  • the system load threshold is a usage threshold of multiple local resources
  • the local resource usage rate needs to be set for each local resource when setting the local resource usage threshold. Threshold.
  • the method provided in this embodiment further supports receiving the system load threshold setting command again in subsequent operations, according to the re-received system load threshold.
  • the setup command again sets the system load threshold to update the system load threshold.
  • the number of times the system load threshold setting command is received is not specifically limited in this embodiment.
  • the system load threshold setting command may be determined to be legal after receiving the system load threshold setting command.
  • the system is determined according to the system.
  • the load threshold setting command sets and stores the system load threshold.
  • the system load threshold setting command may be determined according to the IP (Internet Protocol) address of the device that sends the system load threshold setting command, or the system load threshold may be determined according to whether the format of the system load threshold setting command is correct. Set whether the command is legal.
  • the blacklist of the malicious IP address can be stored in the server in advance, and the system load threshold setting sent by a device is obtained.
  • the command can determine whether the IP address of the device is in the blacklist of the malicious IP address. If the IP address of the device is in the blacklist, the system load threshold setting command sent by the device is invalid.
  • the whitelist of the legal IP address may be stored on the server in advance. If the IP address of the device is not in the whitelist, the system load threshold setting command sent by the device may be determined to be invalid.
  • the server obtains a legal or malicious IP address, which can be obtained according to the historical record. This embodiment does not specifically limit the manner in which the server obtains a legal or malicious IP address, and does not determine the IP address of the device according to the system load threshold setting command. The manner in which the system load threshold setting command is legal is specifically limited.
  • the comparison result may include but is not limited to the following two types:
  • the first type the current system load information of the server is greater than a preset system load threshold
  • the current system load information of the server is less than or equal to the preset system load threshold.
  • the server overload may be determined. If the comparison result is the second type, it may be determined that the server is not overloaded.
  • the pre-set system load threshold is 90% CPU usage and 80% memory usage.
  • the current system load information of the server is 92% of the CPU usage and 87% of the memory usage rate, after comparing the current system load information of the server with the preset system load threshold, the comparison result is the current server. If the system load information is greater than the preset system load threshold, then it can be determined that the server is overloaded.
  • the current system load information of the server includes multiple information, and a corresponding multiple system load threshold is preset, when the current system load information of the server is compared with a preset system load threshold, if If there is a case where the comparison result is greater than greater, the server is overloaded. That is to say, if the current system load information of the server is less than or equal to the corresponding system load threshold, it is determined that the server is not overloaded.
  • the system load information of the server is the local resource usage rate of the server, the system load threshold is the local resource usage threshold, and the local resource includes multiple local resources as an example, and the local resource usage rate is set for each local resource in advance.
  • Threshold after comparing the current usage rate of each local resource of the server with the corresponding local resource usage threshold, if any current local resource usage rate is greater than the corresponding local resource usage threshold, then determining The server is overloaded; if the current usage rate of each local resource is less than or equal to the corresponding local resource usage threshold, it is determined that the server is not overloaded.
  • the processing may be directly processed for rejection.
  • the number of times that the request should be rejected within a preset time period may be obtained after determining that the server is overloaded.
  • the step further determines the manner in which the request to be processed is processed.
  • the processing request that is rejected within a time period equal to the preset time period before the pending request is received may be determined. Whether the number of times has reached the number of times the request should be rejected within the preset time period, and if it has been reached, accepts the pending request and then processes it later. Otherwise, you can choose to reject or accept the pending request at random. Of course, the number of times that the processing request should be accepted within the preset time period can also be obtained. When a new pending request is received, the processing request accepted within a time period equal to the preset time period before the pending request arrives can be determined.
  • the method for determining whether to reject the pending request is determined according to the number of times the processing request should be rejected within the preset preset time period. Of course, other methods may be used to determine whether to reject the pending request. The same is not specifically limited.
  • the processing request is rejected, and the rejection response is sent to the device that sends the pending request, so that the peer device can learn the processing result of the current request.
  • this embodiment does not specifically limit this.
  • the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, the current system load information of the server is compared with a preset system load threshold. After that, according to the comparison result, it is possible to accurately determine whether the server is overloaded, thereby achieving better overload protection of the server by rejecting the processing of the processing request when determining that the server is overloaded.
  • An embodiment of the present invention provides a method for protecting an overload of a server.
  • the method provided in this embodiment is described by taking the example of the server as an example. Referring to FIG. 3, the method process provided by this embodiment includes:
  • the implementation principle of the step is the same as the implementation principle of the step 201 in the second embodiment.
  • the implementation principle of the step 201 in the second embodiment refers to the content of the step 201 in the second embodiment, and details are not described herein again.
  • the system load information of the server may include a local resource usage rate of the server, and the local resource usage rate of the server may include at least one of a CPU usage rate, a memory usage rate, and a network bandwidth usage rate; correspondingly, preset
  • the system load threshold may include a pre-set local resource usage threshold.
  • the implementation principle of the step is the same as the implementation principle of the step 202 in the second embodiment.
  • the implementation principle of the step 202 in the second embodiment refers to the content of the step 202 in the second embodiment, and details are not described herein again.
  • the implementation principle of the step is the same as the implementation principle of the step 203 in the second embodiment.
  • the implementation principle of the step 203 in the second embodiment refers to the content of the step 203 in the second embodiment, and details are not described herein again.
  • the processing request may be directly rejected.
  • the method provided in this embodiment further includes the step of setting a probability of rejecting the pending request, that is, a return rejection rate, to preset at least one value according to the return rejection rate, and after determining that the server is overloaded, the server may Generate a random number to determine whether the generated random number and the preset value are The same, so that the subsequent step can further determine whether to process the pending request according to the current judgment result.
  • the probability that the server rejects the pending request is 10%, that is, the rejection rate is 10%
  • the value 9 can be preset according to the rejection rate. After determining that the server has been overloaded, the server generates a random number in 0-9. And obtaining the random number, wherein the probability that the obtained random number is 9 is 10%.
  • the value may be preset to 0 to 9 according to the rejection rate. After determining that the server has been overloaded, the server generates a random number in 0 to 99 and obtains the random number, wherein the obtained random number is 0-9.
  • the probability is 10%, which is not specifically limited in this embodiment.
  • the result of the determination is that the obtained random number is the same as the preset value, it may be determined that the pending request is rejected.
  • the server obtains a random number of 1 from 0 to 9, and the preset value is 9, then the pending request is accepted.
  • the obtained random number 9 and the preset value are also 9, and the pending request is rejected at this time.
  • the probability of obtaining the number 9 from 0 to 9 is 10%, which is exactly the above-mentioned rejection rate.
  • the probability of accepting the pending request may also be preset to set at least one value according to the preset probability of accepting the pending request.
  • the server may generate a random number to determine the generation. Whether the random number is the same as the preset value, and when the judgment result is that the obtained random number is different from the preset value, it is determined to refuse to process the pending request.
  • the preset probability of accepting the pending request is 10%
  • the value 9 may be preset; after determining that the server has been overloaded, the server generates a random number in 0-9 and acquires the random number, wherein the obtained random number
  • the probability of 9 is 10%; if the generated random number is not 9, it is determined to refuse to process the pending request.
  • the value is set to 0 to 9 in advance.
  • the server After determining that the server is overloaded, the server generates a random number in 0 to 99 and obtains the random number, wherein the obtained random number is 0 to 9.
  • the rate is 10%; if the generated random number is not 0-9, it is determined to refuse to process the pending request.
  • the implementation principle of the step is the same as the implementation principle of the step 206 in the second embodiment.
  • the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, the current system load information of the server is compared with a preset system load threshold. After that, according to the comparison result, it is possible to accurately determine whether the server is overloaded, thereby achieving better overload protection of the server by rejecting the processing of the processing request when determining that the server is overloaded.
  • the embodiment of the invention provides an overload protection device for a server, which is used for performing the overload protection method of the server provided in the first embodiment to the third embodiment.
  • the apparatus includes one or more processors and a processor readable storage medium.
  • the processor readable storage medium has a plurality of modules stored thereon, including:
  • the first receiving module 401 is configured to receive a pending request.
  • the first obtaining module 402 is configured to obtain current system load information of the server.
  • the first determining module 403 is configured to compare the current system load information of the server with a preset system load threshold, and determine whether the server is overloaded according to the comparison result;
  • the processing module 404 is configured to refuse to process the processing request when determining that the server is overloaded.
  • the system load information of the server may include a local resource usage rate of the server, and the local resource usage rate of the server may include at least one of a CPU usage rate, a memory usage rate, and a network bandwidth usage rate; correspondingly, preset
  • the system load threshold can include a preset Land resource usage threshold.
  • the first obtaining module 402 is configured to reacquire the system load information of the server when the system load information of the pre-stored server expires, and use the acquired system load information as the current system load information of the server. .
  • the first obtaining module 402 is configured to: when the system load information of the pre-stored server is not expired, read the system load information of the pre-stored server, and use the read system load information as the current server. System load information.
  • the multiple modules further include:
  • the first storage module is configured to pre-fetch and store system load information of the server.
  • the multiple modules further include:
  • a second receiving module configured to receive a system load threshold setting command
  • the second storage module is configured to set and store a system load threshold according to a system load threshold setting command.
  • the second storage module is further configured to determine whether the system load threshold setting command is legal. When determining that the system load threshold setting command is legal, the step of setting and storing the system load threshold according to the system load threshold setting command is performed.
  • the multiple modules further include:
  • a second obtaining module configured to acquire a number of times that the request should be rejected within a preset time period
  • a second determining module configured to determine whether to reject the pending request according to the number of times the processing request should be rejected within the preset preset time period
  • a processing module configured to perform a step of rejecting the processing of the processing request when determining to refuse to process the pending request.
  • the multiple modules further include:
  • a third obtaining module configured to acquire a random number
  • a determining module configured to determine whether the random number is the same as the preset value
  • a third determining module configured to determine, according to the determination result, whether to reject the pending request
  • a processing module configured to perform a step of rejecting the processing of the processing request when determining to refuse to process the pending request.
  • the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, by comparing the current system load information of the server with a preset system load threshold. After that, according to the comparison result, it is possible to accurately determine whether the server is overloaded, thereby achieving better overload protection of the server by rejecting the processing of the processing request when determining that the server is overloaded.
  • the embodiment provides an overload protection device for a server, which can be used to perform the overload protection method of the server provided in the foregoing embodiment.
  • the overload protection device 500 of the server includes:
  • the server's overload protection device 500 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more computer readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, and WiFi ( Wireless Fidelity module 170, a processor 180 including one or more processing cores, and a power supply 190 and the like.
  • RF Radio Frequency
  • the structure of the overload protection device 500 of the server shown in FIG. 5 does not constitute a limitation of the overload protection device 500 of the server, and may include more or less components than those illustrated, or may combine some Parts, or different parts. among them:
  • the RF circuit 110 can be used for transmitting and receiving information or during a call, and receiving and transmitting signals. Specifically, after receiving downlink information of the base station, the downlink information is processed by one or more processors 180. In addition, the data related to the uplink is sent to the base station. .
  • the RF circuit 110 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier). , duplexer, etc.
  • RF circuitry 110 can also communicate with the network and other devices via wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access). , Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • e-mail Short Messaging Service
  • the memory 120 can be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by running software programs and modules stored in the memory 120.
  • the memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to The data of the server's overload protection device 500 is created (such as audio data, phone book, etc.).
  • memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 120 may also include a memory controller to provide access to memory 120 by processor 180 and input unit 130.
  • the input unit 130 can be configured to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • the input unit 130 can include a touch-sensitive surface 131 as well as other input devices 132.
  • Touch-sensitive surface 131 also referred to as a touch display or trackpad, can collect touch operations on or near the user (such as a user using a finger, stylus, etc., on any suitable object or accessory on touch-sensitive surface 131 or The operation near the touch-sensitive surface 131) and driving the corresponding connecting device according to a preset program.
  • the touch-sensitive surface 131 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 180 is provided and can receive commands from the processor 180 and execute them.
  • the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 130 can also include other input devices 132.
  • other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the overload protection device 500 of the server, which can be composed of graphics, text, icons, videos, and any combination thereof.
  • the display unit 140 may include a display panel 141.
  • the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • touch-sensitive surface 131 may cover the display panel 141, and when the touch-sensitive surface 131 detects a touch operation thereon or nearby, it is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 according to the touch event The type provides a corresponding visual output on display panel 141.
  • touch-sensitive surface 131 and display panel 141 are implemented as two separate components to implement input and input functions, in some embodiments, touch-sensitive surface 131 can be integrated with display panel 141 for input. And output function.
  • the server's overload protection device 500 may also include at least one type of sensor 150, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may be turned off when the overload protection device 500 of the server moves to the ear.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the server's overload protection device 500 can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.
  • other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. can be configured. , will not repeat them here.
  • the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the server's overload protection device 500.
  • the audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal by the audio circuit 160. After receiving, it is converted into audio data, and then processed by the audio data output processor 180, transmitted to the overload protection device 500 such as another server via the RF circuit 110, or outputted to the memory 120 for further processing.
  • the audio circuit 160 may also include an earbud jack to provide communication of the peripheral earphones with the server's overload protection device 500.
  • WiFi is a short-range wireless transmission technology
  • the server's overload protection device 500 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 170, which provides wireless broadband Internet access for users.
  • FIG. 5 shows the WiFi module 170, it can be understood that it does not belong to the necessary configuration of the overload protection device 500 of the server, and can be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 180 is the control center of the server's overload protection device 500, which connects various portions of the entire handset using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and by calling stored in the memory 120.
  • the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
  • the server's overload protection device 500 also includes a power supply 190 (such as a battery) that supplies power to various components.
  • a power supply 190 (such as a battery) that supplies power to various components.
  • the power supply can be logically coupled to the processor 180 through a power management system to manage charging, discharging, and power consumption through the power management system. Management and other functions.
  • Power supply 190 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the overload protection device 500 of the server may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the display unit of the overload protection device 500 of the server is a touch screen display
  • the overload protection device 500 of the server further includes a memory, and one or more programs, wherein one or more programs are stored in the memory, And configured to be executed by one or more processors.
  • the one or more programs include instructions for performing the following operations:
  • the system load information of the server may include a local resource usage rate of the server, and the local resource usage rate of the server may include at least one of a CPU usage rate, a memory usage rate, and a network bandwidth usage rate; correspondingly, preset
  • the system load threshold may include a pre-set local resource usage threshold.
  • the system load information of the pre-stored server expires, the system load information of the server is re-acquired, and the obtained system load information is used as the current system load information of the server.
  • the memory of the overload protection device 500 of the server further includes instructions for performing the following operations:
  • the system load information of the pre-stored server When the system load information of the pre-stored server has not expired, the system load information of the pre-stored server is read, and the read system load information is used as the current system load information of the server.
  • the memory of the overload protection device 500 of the server further includes the following operations. instruction:
  • the memory of the overload protection device 500 of the server further includes an instruction for performing the following operations:
  • the memory of the overload protection device 500 of the server further includes an instruction for performing the following operations:
  • the step of setting and storing the system load threshold according to the system load threshold setting command is performed.
  • the memory of the overload protection device 500 of the server further includes an instruction for performing the following operations:
  • the step of rejecting the processing of the processing request is performed.
  • the memory of the overload protection device 500 of the server further includes an instruction for performing the following operations:
  • the step of rejecting the processing of the processing request is performed.
  • the overload protection device 500 of the server provided by the present invention, because the system load information of the server is deterministic, the system load threshold can reflect the real situation of whether the server is overloaded, and therefore, the current system load information of the server and the preset system load are After the thresholds are compared, it is possible to accurately determine whether the server is overloaded according to the comparison result, thereby performing better overload protection on the server by rejecting the processing of the processing request when determining that the server is overloaded.
  • the embodiment of the present invention further provides a computer readable storage medium, which may be a computer readable storage medium included in the memory in the above embodiment; or may exist separately and not assembled into the terminal.
  • Computer readable storage medium Computer readable storage medium.
  • One or more programs are stored, and the one or more programs are used by one or more processors to execute a permission query method for implementing multidimensional data, the method comprising:
  • the system load information of the server may include a local resource usage rate of the server, and the local resource usage rate of the server may include at least one of a CPU usage rate, a memory usage rate, and a network bandwidth usage rate; correspondingly, preset
  • the system load threshold may include a pre-set local resource usage threshold.
  • the acquiring the current system load information of the server includes:
  • the system load information of the pre-stored server expires, the system load information of the server is re-acquired, and the obtained system load information is used as the current system load information of the server.
  • the acquiring current system load information of the server includes:
  • the system load information of the pre-stored server When the system load information of the pre-stored server has not expired, the system load information of the pre-stored server is read, and the read system load information is used as the current system load information of the server.
  • the method before the acquiring the current system load information of the server, the method further includes:
  • the method Before comparing the current system load information of the server with a preset system load threshold, the method further includes:
  • the method further includes:
  • the step of setting and storing the system load threshold according to the system load threshold setting command is performed.
  • the method before the refusing to process the to-be-processed request, the method further includes:
  • the step of rejecting the processing of the processing request is performed.
  • the method before the refusing to process the to-be-processed request, the method further includes:
  • the step of rejecting the processing of the processing request is performed.
  • the system load threshold can reflect the real situation of whether the server is overloaded, and therefore, the current system load information of the server and the preset system are After the load thresholds are compared, it is possible to accurately determine whether the server is overloaded according to the comparison result, thereby determining the server overload. Better handling of the server is achieved by refusing to process the request.
  • Embodiments of the present invention provide a graphical user interface for use on a terminal, the terminal including a touch screen display, a memory, and one or more processors for executing one or more programs;
  • the graphical user interface includes:
  • the system load information of the server may include a local resource usage rate of the server, and the local resource usage rate of the server may include at least one of a CPU usage rate, a memory usage rate, and a network bandwidth usage rate; correspondingly, preset
  • the system load threshold may include a pre-set local resource usage threshold.
  • the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, by setting the current system load information of the server and the preset system load threshold. After the comparison, the server can accurately determine whether the server is overloaded according to the comparison result, so that when the server is overloaded, the server can be processed by rejecting the processing request, thereby achieving better overload protection for the server.
  • overload protection device of the server provided by the foregoing embodiment is only illustrated by the division of each functional module in the overload protection of the server. In actual applications, the foregoing functions may be assigned differently according to requirements.
  • the functional module is completed, that is, the internal structure of the device Divided into different functional modules to complete all or part of the functions described above.
  • the overload protection device of the server provided by the foregoing embodiment is the same as the embodiment of the overload protection method of the server. For the specific implementation process, refer to the method embodiment, and details are not described herein again.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Disclosed are a server overload protection method and device. The method comprises: a request to be processed is received, and current system load information of a server is obtained (101); the current system load information of the server is compared with a preset system load threshold, and according to a comparison result, it is determined whether the server is overloaded (102); if it is determined that the server is overloaded, processing of the request to be processed is refused (103). The device comprises: a first receiving module (401), a first obtaining module (402), a first determining module (403) and a processing module (404). Since the system load information of the server is certain, the true situation of whether the server is overloaded can be reflected. Therefore, by comparing the obtained current system load information of the server with the preset system load threshold, and refusing to process the request to be processed when it is determined according to the comparison result that the server is overloaded, the present invention can accurately determine whether the server is overloaded, thereby performing better overload protection on the server.

Description

服务器的过载保护方法及装置Server overload protection method and device 技术领域Technical field
本发明涉及互联网技术领域,特别涉及一种服务器的过载保护方法及装置。The present invention relates to the field of Internet technologies, and in particular, to a server overload protection method and apparatus.
背景技术Background technique
随着现在互联网技术的快速发展,服务器需要处理的用户访问请求也越来越多。然而,由于受到服务器自身处理能力的限制,任何一台服务器在一定时间内能处理的用户访问请求的个数是有限的。当服务器连接的用户数超过一定数量时,如果服务器没有足够能力处理随之带来的用户访问请求,将导致服务器过载并进而可能产生宕机等不良后果,从而造成巨额的经济损失。因此,为了预防上述情况,通常需要采用一定的方法对可能产生过载的服务器进行保护。With the rapid development of Internet technology, more and more user access requests need to be processed by servers. However, due to the limitations of the server's own processing capabilities, the number of user access requests that any one server can process in a given period of time is limited. When the number of users connected to the server exceeds a certain number, if the server does not have enough capacity to handle the user access request that comes with it, the server will be overloaded and may cause adverse consequences such as downtime, resulting in huge economic losses. Therefore, in order to prevent the above situation, it is usually necessary to adopt a certain method to protect the server that may generate an overload.
发明内容Summary of the invention
本发明实施例提供了一种服务器的过载保护方法及装置。所述技术方案如下:The embodiment of the invention provides a method and device for overload protection of a server. The technical solution is as follows:
一方面,提供了一种服务器的过载保护方法,所述方法包括:In one aspect, a method for overload protection of a server is provided, the method comprising:
接收待处理请求,并获取服务器当前的系统负载信息;Receiving a pending request and obtaining current system load information of the server;
将所述服务器当前的系统负载信息与预先设置的系统负载阈值进行比对,并根据比对结果确定所述服务器是否过载;Comparing the current system load information of the server with a preset system load threshold, and determining whether the server is overloaded according to the comparison result;
若确定所述服务器过载,则拒绝对所述待处理请求进行处理。If it is determined that the server is overloaded, the processing of the pending request is refused.
另一方面,提供了一种网服务器的过载保护装置,所述装置包括处理器 和处理器可读存储介质,该处理器可读存储介质上存储多个模块,包括:In another aspect, an overload protection device for a web server is provided, the device including a processor And a processor readable storage medium having a plurality of modules stored on the processor readable storage medium, including:
第一接收模块,用于接收待处理请求;a first receiving module, configured to receive a pending request;
第一获取模块,用于获取服务器当前的系统负载信息;a first acquiring module, configured to acquire current system load information of the server;
第一确定模块,用于将所述服务器当前的系统负载信息与预先设置的系统负载阈值进行比对,并根据比对结果确定所述服务器是否过载;a first determining module, configured to compare the current system load information of the server with a preset system load threshold, and determine whether the server is overloaded according to the comparison result;
处理模块,用于当确定所述服务器过载时,拒绝对所述待处理请求进行处理。And a processing module, configured to refuse to process the to-be-processed request when determining that the server is overloaded.
本发明实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
由于服务器的系统负载信息具有确定性,因而系统负载阈值能够反映服务器是否过载的真实情况,因此,通过将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对后,根据比对结果能够精准地确定服务器是否过载,从而在确定服务器过载时,通过拒绝对待处理请求进行处理,实现对服务器进行更佳的过载保护。Since the system load information of the server is deterministic, the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, by comparing the current system load information of the server with a preset system load threshold, the comparison result can be Accurately determine whether the server is overloaded, so as to ensure better overload protection of the server by refusing to process the request when determining that the server is overloaded.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1是本发明实施例一提供的一种服务器的过载保护方法流程图;1 is a flowchart of a method for overload protection of a server according to Embodiment 1 of the present invention;
图2是本发明实施例二提供的一种服务器的过载保护方法流程图;2 is a flowchart of a method for overload protection of a server according to Embodiment 2 of the present invention;
图3是本发明实施例三提供的一种服务器的过载保护方法流程图;3 is a flowchart of a method for overload protection of a server according to Embodiment 3 of the present invention;
图4是本发明实施例四提供的一种服务器的过载保护装置结构示意图; 4 is a schematic structural diagram of an overload protection device for a server according to Embodiment 4 of the present invention;
图5是本发明实施例五提供的一种服务器的过载保护设备的结构示意图。FIG. 5 is a schematic structural diagram of an overload protection device for a server according to Embodiment 5 of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
实施例一Embodiment 1
由于受到服务器自身处理能力的限制,任何一台服务器在一定时间内能处理的请求的数量是有限的,当服务器接收到的待处理请求超过一定数量时,将导致服务器过载并进而可能产生宕机等不良后果,从而造成巨额的经济损失。因此,为了预防上述情况,本发明实施例提供了一种服务器的过载保护方法。为了更好地对服务器进行过载保护,本实施例以服务器的系统负载信息作为判断服务器是否过载的依据,对本实施例提供的方法进行举例说明。参见图1,本实施例提供的方法流程包括:Due to the limitation of the processing power of the server itself, the number of requests that any one server can process in a certain period of time is limited. When the server receives more than a certain number of pending requests, the server will be overloaded and may cause downtime. Such adverse consequences, resulting in huge economic losses. Therefore, in order to prevent the above situation, the embodiment of the present invention provides a method for overload protection of a server. In this embodiment, the method provided in this embodiment is described by using the system load information of the server as a basis for determining whether the server is overloaded. Referring to FIG. 1, the method process provided by this embodiment includes:
101:接收待处理请求,并获取服务器当前的系统负载信息;101: Receive a pending request, and obtain current system load information of the server;
其中,获取服务器当前的系统负载信息,包括但不限于:The current system load information of the server is obtained, including but not limited to:
当预先存储的服务器的系统负载信息过期时,重新获取服务器的系统负载信息,并将获取到的系统负载信息作为服务器当前的系统负载信息。When the system load information of the pre-stored server expires, the system load information of the server is re-acquired, and the obtained system load information is used as the current system load information of the server.
可选地,获取服务器当前的系统负载信息,包括但不限于:Optionally, obtaining current system load information of the server, including but not limited to:
当预先存储的服务器的系统负载信息未过期时,读取预先存储的服务器的系统负载信息,并将读取的系统负载信息作为服务器当前的系统负载信息。When the system load information of the pre-stored server has not expired, the system load information of the pre-stored server is read, and the read system load information is used as the current system load information of the server.
进一步地,获取服务器当前的系统负载信息之前,还包括:Further, before acquiring the current system load information of the server, the method further includes:
预先获取并存储服务器的系统负载信息。Pre-fetch and store the system load information of the server.
102:将服务器当前的系统负载信息与预先设置的系统负载阈值进行比 对,并根据比对结果确定服务器是否过载;102: Compare the current system load information of the server with a preset system load threshold. Right, and based on the comparison results to determine whether the server is overloaded;
将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对之前,还包括:Before comparing the current system load information of the server with the preset system load threshold, it also includes:
接收系统负载阈值设置命令,并根据系统负载阈值设置命令设置并存储系统负载阈值。Receive system load threshold setting commands and set and store system load thresholds based on system load threshold setting commands.
可选地,接收系统负载阈值设置命令之后,还包括:Optionally, after receiving the system load threshold setting command, the method further includes:
判断系统负载阈值设置命令是否合法;Determine whether the system load threshold setting command is legal;
若判断系统负载阈值设置命令合法,则执行根据系统负载阈值设置命令设置并存储系统负载阈值的步骤。If it is determined that the system load threshold setting command is legal, the step of setting and storing the system load threshold according to the system load threshold setting command is performed.
103:若确定服务器过载,则拒绝对待处理请求进行处理。103: If it is determined that the server is overloaded, the processing request is rejected.
可选的,拒绝对待处理请求进行处理之前,还包括:Optionally, before refusing to process the processing request, it also includes:
获取预设时间段内拒绝处理请求的次数,并根据获取到的拒绝处理请求的次数确定是否拒绝处理待处理请求;Obtaining the number of times the request is rejected during the preset time period, and determining whether to reject the pending request according to the obtained number of times of rejecting the processing request;
若确定拒绝处理待处理请求,则执行拒绝对待处理请求进行处理的步骤。If it is determined that the pending request is refused to be processed, the step of rejecting the processing of the processing request is performed.
可选地,拒绝对待处理请求进行处理之前,还包括:Optionally, before refusing to process the processing request, it also includes:
获取一个随机数,并判断随机数与预设数值是否相同;Obtain a random number and determine whether the random number is the same as the preset value;
根据判断结果确定是否拒绝处理待处理请求;Determining whether to refuse to process the pending request according to the judgment result;
若确定拒绝处理待处理请求,则执行拒绝对待处理请求进行处理的步骤。If it is determined that the pending request is refused to be processed, the step of rejecting the processing of the processing request is performed.
本实施例提供的方法,由于服务器的系统负载信息具有确定性,因而系统负载阈值能够反映服务器是否过载的真实情况,因此,通过将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对后,根据比对结果能够精准地确定服务器是否过载,从而在确定服务器过载时,通过拒绝对待处理请求进行处理,实现对服务器进行更佳的过载保护。 In the method provided in this embodiment, since the system load information of the server is deterministic, the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, the current system load information of the server is compared with a preset system load threshold. After that, according to the comparison result, it is possible to accurately determine whether the server is overloaded, thereby achieving better overload protection of the server by rejecting the processing of the processing request when determining that the server is overloaded.
实施例二Embodiment 2
本发明实施例提供了一种服务器的过载保护方法,结合上述实施例一的内容,本实施例以执行主体为服务器为例,对本实施例提供的方法进行举例说明。参见图2,本实施例提供的方法流程包括:An embodiment of the present invention provides a method for protecting an overload of a server. The method provided in this embodiment is described by taking the example of the server as an example. Referring to FIG. 2, the method process provided by this embodiment includes:
201:接收待处理请求,并获取服务器当前的系统负载信息;201: Receive a pending request, and obtain current system load information of the server.
具体地,本实施例不对接收到的待处理请求的类型作具体限定,包括但不限于连接请求,获取服务请求等等。本实施例也不对服务器当前的系统负载信息的内容作具体限定,包括但不限于服务器当前的本地资源使用率。本地资源使用率包括CPU(Central Processing Unit,中央处理器)使用率,内存使用率,网络带宽使用率等中的至少一种。关于获取服务器当前的系统负载信息的方式,本实施例同样不作具体限定,包括但不限于如下两种方式:Specifically, the embodiment does not specifically limit the type of the to-be-processed request, including but not limited to a connection request, a service request, and the like. This embodiment does not specifically limit the content of the current system load information of the server, including but not limited to the current local resource usage rate of the server. The local resource usage rate includes at least one of a CPU (Central Processing Unit) usage rate, a memory usage rate, and a network bandwidth usage rate. The manner of obtaining the current system load information of the server is also not limited in this embodiment, including but not limited to the following two methods:
第一种方式:直接获取服务器当前的系统负载信息;The first way: directly obtain the current system load information of the server;
针对第一种方式,以服务器的系统负载信息为服务器的本地资源使用率为例,本实施例不对直接获取服务器当前的系统负载信息的方式作具体限定,包括但不限于根据测定得到的服务器本地资源的具体使用情况,计算每项资源的使用率,将计算得到的每项资源的使用率作为获取到的服务器当前的系统负载信息。For the first mode, the system load information of the server is used as the local resource usage rate of the server. This embodiment does not specifically limit the manner in which the current system load information of the server is directly obtained, including but not limited to the server local according to the measurement. The specific usage of the resource, calculate the usage rate of each resource, and use the calculated usage rate of each resource as the current system load information of the obtained server.
例如,若待测定使用率的本地资源为内存,服务器上的内存一共有8GB,在当前某一个时间点,服务器上的网络应用共占用了4GB内存,则可知当前服务器上的内存使用率为50%,将计算得出的内存使用率50%作为获取到的一项系统负载信息。For example, if the local resource to be used is memory, the memory on the server is 8 GB. At a certain point in time, the network application on the server occupies 4 GB of memory, and the memory usage on the current server is 50. %, the calculated memory usage is 50% as a system load information obtained.
第二种方式:预先获取并存储服务器的系统负载信息,根据预先存储的 服务器的系统负载信息获取服务器当前的系统负载信息。其中,预先获取服务器的系统负载信息采用的方式可按照上述第一种方式执行,获取到服务器的系统负载信息后可将系统负载信息存储到服务器上的存储介质中。之后,根据预先存储的服务器的系统负载信息是否过期来确定如何获取服务器当前的系统负载信息,具体可分为如下两种情况:The second way: pre-acquisition and storage of the server's system load information, according to pre-stored The system load information of the server obtains the current system load information of the server. The method for pre-acquiring the system load information of the server may be performed according to the foregoing first manner. After acquiring the system load information of the server, the system load information may be stored in a storage medium on the server. Then, according to whether the system load information of the pre-stored server expires to determine how to obtain the current system load information of the server, the following can be divided into the following two cases:
第一种情况,当预先存储的服务器的系统负载信息过期时,重新获取服务器的系统负载信息,并将获取到的系统负载信息作为服务器当前的系统负载信息;In the first case, when the system load information of the pre-stored server expires, the system load information of the server is re-acquired, and the obtained system load information is used as the current system load information of the server;
其中,判断预先存储的服务器的系统负载信息是否过期可采取如下方式:Wherein, determining whether the system load information of the pre-stored server is expired may be as follows:
设置一个时间周期,在预先存储服务器的系统负载信息时,可同时记录下存储该系统负载信息的具体时间。当有新的待处理请求到来时,获取此时的具体时间,将获取到的具体时间减去记录下的存储系统负载信息的具体时间,若得到的差值小于之前设置的时间周期,则确定预先存储的服务器的系统负载信息未过期。反之,则确定预先存储的服务器的系统负载信息已过期。当然,还可以采取其它方式判断预先存储的服务器的系统负载信息是否过期,本实施例对此不作具体限定。另外,时间周期的数值可以根据需要进行设置,本实施例对此同样不作具体限定。为了使存储的系统负载信息能够反映服务器当前的系统负载信息的真实情况,设置的时间周期越小越好。Set a time period. When the system load information of the server is pre-stored, the specific time for storing the system load information can be recorded at the same time. When a new pending request arrives, obtain the specific time at this time, and subtract the specific time of the storage system load information from the specific time obtained. If the obtained difference is smaller than the previously set time period, determine The system load information of the pre-stored server has not expired. Otherwise, it is determined that the system load information of the pre-stored server has expired. Certainly, the system load information of the pre-stored server may be determined to be expired, which is not specifically limited in this embodiment. In addition, the value of the time period can be set as needed, and this embodiment is also not specifically limited. In order to make the stored system load information reflect the real situation of the current system load information of the server, the set time period is as small as possible.
例如,以内存的使用率作为系统负载信息为例,在10点30分服务器获取到的内存的使用率为60%,预先设置的时间周期为5分钟,若在10点34分来了一个新的待处理请求,10点34分与10点30分的差值为4分钟,小于预先设置的时间周期5分钟,因此此时可判断预先存储的服务器的系统负载信息并未过期。若在10点36分来了一个新的待处理请求,10点36分与10 点30分的差值为6分钟,大于预先设置的时间周期5分钟,因此,此时可判断预先存储的服务器的系统负载信息已过期。For example, taking the memory usage rate as the system load information as an example, the memory usage rate obtained by the server is 60% at 10:30, and the preset time period is 5 minutes. If a new one arrives at 10:34, For the pending request, the difference between 10:34 and 10:30 is 4 minutes, which is less than the preset time period of 5 minutes. Therefore, it can be judged that the system load information of the pre-stored server has not expired. If a new pending request comes at 10:36, 10:36 and 10 The difference of 30 points is 6 minutes, which is greater than the preset time period of 5 minutes. Therefore, it can be judged that the system load information of the pre-stored server has expired.
当预先存储的服务器的系统负载信息过期时,可按照上述第一种方式重新获取服务器的系统负载信息,并将获取到的系统负载信息作为服务器当前的系统负载信息。进一步地,当获取到系统负载信息后,还可以将获取到的系统负载信息更新至服务器的存储介质中,并同时更新存储该系统负载信息的具体时间,本实施例对此不作具体限定。When the system load information of the pre-stored server expires, the system load information of the server may be re-acquired according to the first manner, and the obtained system load information is used as the current system load information of the server. Further, after the system load information is obtained, the acquired system load information may be updated to the storage medium of the server, and the specific time for storing the system load information is updated at the same time, which is not specifically limited in this embodiment.
第二种情况,当预先存储的服务器的系统负载信息未过期时,读取预先存储的服务器的系统负载信息,并将读取的系统负载信息作为服务器当前的系统负载信息。In the second case, when the system load information of the pre-stored server is not expired, the system load information of the pre-stored server is read, and the read system load information is used as the current system load information of the server.
针对第二种情况,由于服务器的系统负载信息在一定的时间内具有稳定性,例如,测定到服务器的一项系统负载信息CPU使用率在10点35分30秒为60%,在这个时间后的3秒内,如在10点35分31秒测定到的服务器的CPU使用率可能为60.1%,即CPU使用率变化较小,在3秒内具有稳定性。服务器在获取到当前的系统负载信息后,在一定的时间内,之前获取到的系统负载信息依然具有参考性,因此,可以判断预先存储的服务器的系统负载信息是否过期,当预先存储的服务器的系统负载信息过期时,则可以说明之前获取到的系统负载信息已经不具有参考性。当预先存储的服务器的系统负载信息未过期时,则读取预先存储的系统负载信息,并将读取的系统负载信息作为服务器当前的系统负载信息。For the second case, since the system load information of the server has stability within a certain period of time, for example, the CPU usage of a system load information measured to the server is 60% at 10:35:30, after this time. Within 3 seconds, the CPU usage of the server measured at 10:35:31 may be 60.1%, that is, the CPU usage varies little and has stability within 3 seconds. After the server obtains the current system load information, the system load information acquired before is still referenced within a certain period of time. Therefore, it can be determined whether the system load information of the pre-stored server is expired, when the pre-stored server is When the system load information expires, it can be stated that the previously obtained system load information is not referenced. When the system load information of the pre-stored server has not expired, the pre-stored system load information is read, and the read system load information is used as the current system load information of the server.
需要说明的是,由于每次获取服务器当前的系统负载信息需要占用一定的时间与资源,因此利用服务器的系统负载信息在一定时间内的稳定性,按照上述的第二种方式对服务器当前的系统负载信息进行获取,能够缩短获取 服务器当前的系统负载信息花费的时间,并同时能节省服务器的资源,从而提高获取服务器当前的系统负载信息的效率。It should be noted that, since it takes a certain time and resources to acquire the current system load information of the server each time, the stability of the system load information of the server is utilized in a certain period of time, according to the second method described above, the current system of the server. Load information is obtained, which can shorten the acquisition The time taken by the server for current system load information, while saving server resources, thereby improving the efficiency of obtaining the current system load information of the server.
202:将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对;202: Compare the current system load information of the server with a preset system load threshold;
具体的,如果服务器的系统负载信息为服务器的本地资源使用率,则系统负载阈值为本地资源使用率阈值。Specifically, if the system load information of the server is the local resource usage rate of the server, the system load threshold is a local resource usage threshold.
具体地,系统负载阈值的具体数值可以根据系统具体性能或具体需求进行设定,本实施例对此不作具体限定,包括但不限于采用如下方式实现:Specifically, the specific value of the system load threshold may be set according to the specific performance of the system or the specific requirements. This embodiment does not specifically limit this, including but not limited to the following:
接收系统负载阈值设置命令,根据系统负载阈值设置命令设置并存储系统负载阈值。系统负载阈值设置命令可采用URL(Uniform Resource Locator,统一资源定位符)格式,服务器接收到URL格式命令后,解析接收到的URL格式命令,获取URL格式命令中携带的系统负载阈值,并将获取到的系统负载阈值进行存储。其中,系统负载阈值设置命令还可以采用其它格式,如文本消息格式等,本实施例对此不作具体限定。Receive system load threshold setting command, set and store system load threshold according to system load threshold setting command. The system load threshold setting command may adopt a URL (Uniform Resource Locator) format. After receiving the URL format command, the server parses the received URL format command, obtains the system load threshold carried in the URL format command, and obtains the system load threshold. The system load threshold is stored. The system load threshold setting command may also adopt other formats, such as a text message format, which is not specifically limited in this embodiment.
需要说明的是,如果系统负载信息包括多种信息,则在设置对应的系统负载阈值时,需要为每种系统负载信息设置对应的系统负载阈值。以系统负载信息包含多项本地资源的使用率、系统负载阈值为多项本地资源各自的使用率阈值为例,在设置本地资源使用率阈值时需要为每项本地资源设置对应的本地资源使用率阈值。此外,根据系统负载阈值设置命令在第一次进行系统负载阈值的设定后,本实施例提供的方法还支持在后续操作中再次接收系统负载阈值设置命令,以根据再次接收到的系统负载阈值设置命令再次对系统负载阈值进行设定,达到对系统负载阈值进行更新的目的。关于接收系统负载阈值设置命令的次数,本实施例不做具体限定。 It should be noted that, if the system load information includes multiple types of information, when setting the corresponding system load threshold, it is necessary to set a corresponding system load threshold for each system load information. For example, if the system load information includes the usage rate of multiple local resources and the system load threshold is a usage threshold of multiple local resources, the local resource usage rate needs to be set for each local resource when setting the local resource usage threshold. Threshold. In addition, after the setting of the system load threshold is performed for the first time according to the system load threshold setting command, the method provided in this embodiment further supports receiving the system load threshold setting command again in subsequent operations, according to the re-received system load threshold. The setup command again sets the system load threshold to update the system load threshold. The number of times the system load threshold setting command is received is not specifically limited in this embodiment.
进一步地,无论接收到几次系统负载阈值设置命令,在每次接收到系统负载阈值设置命令之后,还可以判断系统负载阈值设置命令是否合法,当判断系统负载阈值设置命令合法时,则根据系统负载阈值设置命令设置并存储系统负载阈值。其中,可以根据发送系统负载阈值设置命令的设备的IP(Internet Protocol,网际协议)地址来判断系统负载阈值设置命令是否合法,或者还可以根据系统负载阈值设置命令的格式是否正确来判断系统负载阈值设置命令是否合法。Further, no matter whether the system load threshold setting command is received, the system load threshold setting command may be determined to be legal after receiving the system load threshold setting command. When the system load threshold setting command is determined to be legal, the system is determined according to the system. The load threshold setting command sets and stores the system load threshold. The system load threshold setting command may be determined according to the IP (Internet Protocol) address of the device that sends the system load threshold setting command, or the system load threshold may be determined according to whether the format of the system load threshold setting command is correct. Set whether the command is legal.
其中,根据发送系统负载阈值设置命令的设备的IP地址来判断系统负载阈值设置命令是否合法时,可预先在服务器上存储恶意IP地址的黑名单,当获取到某台设备发送的系统负载阈值设置命令,可判断该设备的IP地址是否在恶意IP地址的黑名单中,若该设备的IP地址在黑名单中,则可确定该设备发送的系统负载阈值设置命令不合法。或者,还可以在预先在服务器上存储合法IP地址的白名单,若该设备的IP地址不在白名单中,则可确定该设备发送的系统负载阈值设置命令不合法。进一步地,服务器获取合法或者恶意的IP地址可以根据历史记录统计得到,本实施例不对服务器获取合法或者恶意IP地址的方式作具体限定,也不对根据发送系统负载阈值设置命令的设备的IP地址判断系统负载阈值设置命令是否合法的方式作具体限定。If the system load threshold setting command is used to determine whether the system load threshold setting command is legal, the blacklist of the malicious IP address can be stored in the server in advance, and the system load threshold setting sent by a device is obtained. The command can determine whether the IP address of the device is in the blacklist of the malicious IP address. If the IP address of the device is in the blacklist, the system load threshold setting command sent by the device is invalid. Alternatively, the whitelist of the legal IP address may be stored on the server in advance. If the IP address of the device is not in the whitelist, the system load threshold setting command sent by the device may be determined to be invalid. Further, the server obtains a legal or malicious IP address, which can be obtained according to the historical record. This embodiment does not specifically limit the manner in which the server obtains a legal or malicious IP address, and does not determine the IP address of the device according to the system load threshold setting command. The manner in which the system load threshold setting command is legal is specifically limited.
203:根据比对结果确定服务器是否过载;203: Determine, according to the comparison result, whether the server is overloaded;
具体地,比对结果可以包括但不限于如下两种:Specifically, the comparison result may include but is not limited to the following two types:
第一种:服务器当前的系统负载信息大于预先设置的系统负载阈值;The first type: the current system load information of the server is greater than a preset system load threshold;
第二种:服务器当前的系统负载信息小于等于预先设置的系统负载阈值。Second: The current system load information of the server is less than or equal to the preset system load threshold.
根据比对结果确定服务器是否过载时,若比对结果为上述第一种,则可以确定服务器过载,若比对结果为上述第二种,则可以确定服务器未过载。 If it is determined whether the server is overloaded according to the comparison result, if the comparison result is the first type, the server overload may be determined. If the comparison result is the second type, it may be determined that the server is not overloaded.
例如,预先设置的系统负载阈值为CPU使用率90%,内存使用率80%。当获取到服务器当前的系统负载信息为CPU使用率92%,内存使用率87%时,通过将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对之后,比对结果为服务器当前的系统负载信息大于预先设置的系统负载阈值,则此时可确定服务器已经过载。For example, the pre-set system load threshold is 90% CPU usage and 80% memory usage. When the current system load information of the server is 92% of the CPU usage and 87% of the memory usage rate, after comparing the current system load information of the server with the preset system load threshold, the comparison result is the current server. If the system load information is greater than the preset system load threshold, then it can be determined that the server is overloaded.
需要说明的是,如果服务器当前的系统负载信息包括多种信息,预先设置了相应的多种系统负载阈值,则在将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对时,如果有一项比对结果为大于的情况,则确定服务器过载。也就是说,在服务器当前的每项系统负载信息均小于或等于对应的系统负载阈值的情况下,才确定服务器未过载。以服务器的系统负载信息为服务器的本地资源使用率,系统负载阈值为本地资源使用率阈值,并且本地资源包含多项本地资源为例,预先为各项本地资源设定了各自的本地资源使用率阈值;在将服务器的各项本地资源的当前使用率与预先设置的对应的本地资源使用率阈值进行比对后,如果任意一项本地资源当前使用率大于对应的本地资源使用率阈值,则确定服务器过载;如果各项本地资源当前使用率均小于或等于对应的本地资源使用率阈值,则确定服务器未过载。It should be noted that, if the current system load information of the server includes multiple information, and a corresponding multiple system load threshold is preset, when the current system load information of the server is compared with a preset system load threshold, if If there is a case where the comparison result is greater than greater, the server is overloaded. That is to say, if the current system load information of the server is less than or equal to the corresponding system load threshold, it is determined that the server is not overloaded. The system load information of the server is the local resource usage rate of the server, the system load threshold is the local resource usage threshold, and the local resource includes multiple local resources as an example, and the local resource usage rate is set for each local resource in advance. Threshold; after comparing the current usage rate of each local resource of the server with the corresponding local resource usage threshold, if any current local resource usage rate is greater than the corresponding local resource usage threshold, then determining The server is overloaded; if the current usage rate of each local resource is less than or equal to the corresponding local resource usage threshold, it is determined that the server is not overloaded.
204:若确定服务器过载,获取预设时间段内应拒绝处理请求的次数;204: If it is determined that the server is overloaded, the number of times the request should be rejected within the preset time period is obtained;
具体地,确定服务器过载后,可以对待处理请求直接进行拒绝处理。作为一种优选方式,为了避免短时间内所有请求都被拒绝,同时为了保证服务器的资源得到更大的利用,可以在确定服务器过载后获取预设时间段内应拒绝处理请求的次数,以通过后续步骤进一步判断对待处理请求的处理方式。Specifically, after determining that the server is overloaded, the processing may be directly processed for rejection. As a preferred method, in order to avoid all requests being rejected in a short period of time, and in order to ensure that the resources of the server are utilized more, the number of times that the request should be rejected within a preset time period may be obtained after determining that the server is overloaded. The step further determines the manner in which the request to be processed is processed.
205:根据获取到的应拒绝处理请求的次数确定是否拒绝处理待处理请求; 205: Determine, according to the obtained number of times that the request is rejected, whether to refuse to process the pending request;
具体地,获取到预设时间段内应拒绝处理请求的次数后,每当接收到的待处理请求时,可以判断在该待处理请求到来之前等于预设时间段的一时间段内拒绝的处理请求的次数是否达到预设时间段内应拒绝请求的次数,若已经达到,则接受此次待处理请求,进而后续对其进行处理。反之,则可以随机选择拒绝或接受此次待处理请求。当然,还可以获取到预设时间段内应接受处理请求的次数,每当到来新的待处理请求时,可以判断在该待处理请求到来之前等于预设时间段的一时间段内接受的处理请求的次数是否达到预设时间段内应接受请求的次数,若已经达到,则拒绝此次待处理请求,进而后续对其进行处理。反之,则可以随机选择拒绝或接受此次待处理请求。本实施例不对根据获取到的预设时间段内应拒绝处理请求的次数确定是否拒绝处理待处理请求的方式进行限定,当然,还可以采用其他方式确定是否拒绝处理待处理请求,本实施例对此同样不作具体限定。Specifically, after obtaining the number of times that the request should be rejected within the preset time period, each time the pending request is received, the processing request that is rejected within a time period equal to the preset time period before the pending request is received may be determined. Whether the number of times has reached the number of times the request should be rejected within the preset time period, and if it has been reached, accepts the pending request and then processes it later. Otherwise, you can choose to reject or accept the pending request at random. Of course, the number of times that the processing request should be accepted within the preset time period can also be obtained. When a new pending request is received, the processing request accepted within a time period equal to the preset time period before the pending request arrives can be determined. Whether the number of times has reached the number of times the request should be accepted within the preset time period, and if it has been reached, rejects the pending request and then processes it later. Otherwise, you can choose to reject or accept the pending request at random. In this embodiment, the method for determining whether to reject the pending request is determined according to the number of times the processing request should be rejected within the preset preset time period. Of course, other methods may be used to determine whether to reject the pending request. The same is not specifically limited.
206:若确定拒绝处理待处理请求,则拒绝对待处理请求进行处理。206: If it is determined to refuse to process the pending request, the processing request is rejected.
具体地,若确定拒绝待处理请求后,则拒绝对待处理请求进行处理,同时还可以向发送待处理请求的设备发送拒绝响应,以使对端设备获知本次请求的处理结果。关于发送拒绝响应的方式,本实施例对此不作具体限定。Specifically, if it is determined that the pending request is rejected, the processing request is rejected, and the rejection response is sent to the device that sends the pending request, so that the peer device can learn the processing result of the current request. Regarding the manner of sending the reject response, this embodiment does not specifically limit this.
本实施例提供的方法,由于服务器的系统负载信息具有确定性,因而系统负载阈值能够反映服务器是否过载的真实情况,因此,通过将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对后,根据比对结果能够精准地确定服务器是否过载,从而在确定服务器过载时,通过拒绝对待处理请求进行处理,实现对服务器进行更佳的过载保护。In the method provided in this embodiment, since the system load information of the server is deterministic, the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, the current system load information of the server is compared with a preset system load threshold. After that, according to the comparison result, it is possible to accurately determine whether the server is overloaded, thereby achieving better overload protection of the server by rejecting the processing of the processing request when determining that the server is overloaded.
实施例三 Embodiment 3
本发明实施例提供了一种服务器的过载保护方法,结合上述实施例一的内容,本实施例以执行主体为服务器为例,对本实施例提供的方法进行举例说明。参见图3,本实施例提供的方法流程包括:An embodiment of the present invention provides a method for protecting an overload of a server. The method provided in this embodiment is described by taking the example of the server as an example. Referring to FIG. 3, the method process provided by this embodiment includes:
301:接收待处理请求,并获取服务器当前的系统负载信息;301: Receive a pending request, and obtain current system load information of the server.
具体地,该步骤的实现原理与上述实施例二中步骤201的实现原理相同,具体详见上述实施例二中步骤201的内容,此处不再赘述。Specifically, the implementation principle of the step is the same as the implementation principle of the step 201 in the second embodiment. For details, refer to the content of the step 201 in the second embodiment, and details are not described herein again.
302:将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对;302: Compare the current system load information of the server with a preset system load threshold;
具体的,服务器的系统负载信息可以包括服务器的本地资源使用率,服务器的本地资源使用率可以包括CPU使用率,内存使用率,网络带宽使用率等中的至少一种;对应的,预先设置的系统负载阈值可以包括预先设置的本地资源使用率阈值。Specifically, the system load information of the server may include a local resource usage rate of the server, and the local resource usage rate of the server may include at least one of a CPU usage rate, a memory usage rate, and a network bandwidth usage rate; correspondingly, preset The system load threshold may include a pre-set local resource usage threshold.
具体地,该步骤的实现原理与上述实施例二中步骤202的实现原理相同,具体详见上述实施例二中步骤202的内容,此处不再赘述。Specifically, the implementation principle of the step is the same as the implementation principle of the step 202 in the second embodiment. For details, refer to the content of the step 202 in the second embodiment, and details are not described herein again.
303:根据比对结果确定服务器是否过载;303: Determine, according to the comparison result, whether the server is overloaded;
具体地,该步骤的实现原理与上述实施例二中步骤203的实现原理相同,具体详见上述实施例二中步骤203的内容,此处不再赘述。Specifically, the implementation principle of the step is the same as the implementation principle of the step 203 in the second embodiment. For details, refer to the content of the step 203 in the second embodiment, and details are not described herein again.
304:若确定服务器过载,获取一个随机数,并判断随机数与预设数值是否相同;304: If it is determined that the server is overloaded, obtain a random number, and determine whether the random number is the same as the preset value;
具体地,在确定服务器过载后,可直接拒绝对待处理请求进行处理。作为一种优选方式,本实施例提供的方法还包括预先设置拒绝待处理请求的概率,即回拒率的步骤,以根据回拒率预先设置至少一个数值,在确定服务器已经过载后,服务器可产生一个随机数,判断产生的随机数与预设数值是否 相同,从而通过后续步骤能够根据本次判断结果对是否处理待处理请求进行进一步的判断。Specifically, after determining that the server is overloaded, the processing request may be directly rejected. As a preferred manner, the method provided in this embodiment further includes the step of setting a probability of rejecting the pending request, that is, a return rejection rate, to preset at least one value according to the return rejection rate, and after determining that the server is overloaded, the server may Generate a random number to determine whether the generated random number and the preset value are The same, so that the subsequent step can further determine whether to process the pending request according to the current judgment result.
例如,预先设置服务器拒绝待处理请求的概率为10%,即回拒率为10%,根据回拒率可预先设置数值9,在确定服务器已经过载之后,服务器在0~9中产生一个随机数并获取该随机数,其中,获取到的随机数为9的概率为10%。当然,还可以根据回拒率预先设置数值为0~9,在确定服务器已经过载之后,服务器在0~99中产生一个随机数并获取该随机数,其中,获取到的随机数为0~9的概率为10%,本实施例对此不作具体限定。For example, the probability that the server rejects the pending request is 10%, that is, the rejection rate is 10%, and the value 9 can be preset according to the rejection rate. After determining that the server has been overloaded, the server generates a random number in 0-9. And obtaining the random number, wherein the probability that the obtained random number is 9 is 10%. Certainly, the value may be preset to 0 to 9 according to the rejection rate. After determining that the server has been overloaded, the server generates a random number in 0 to 99 and obtains the random number, wherein the obtained random number is 0-9. The probability is 10%, which is not specifically limited in this embodiment.
305:根据判断结果确定是否拒绝处理待处理请求;305: Determine, according to the judgment result, whether to reject the pending request;
具体地,判断结果为获取到的随机数与预设数值相同时,则可以确定拒绝处理待处理请求。Specifically, when the result of the determination is that the obtained random number is the same as the preset value, it may be determined that the pending request is rejected.
例如,服务器在0~9种获取到的随机数1,预设数值为9,则此时接受待处理请求。获取到的随机数9,预设数值也为9,则此时拒绝待处理请求。需要说明的是,从0~9中获取到数字9的概率为10%,正好为上述回拒率。For example, if the server obtains a random number of 1 from 0 to 9, and the preset value is 9, then the pending request is accepted. The obtained random number 9 and the preset value are also 9, and the pending request is rejected at this time. It should be noted that the probability of obtaining the number 9 from 0 to 9 is 10%, which is exactly the above-mentioned rejection rate.
当然,在其他实施例中还可以预先设置接受待处理请求的概率,以根据预设的接受待处理请求的概率设置至少一个数值,在确定服务器已经过载后,服务器可产生一个随机数,判断产生的随机数与预设数值是否相同,在判断结果为获取到的随机数与预设数值不同时,确定拒绝处理待处理请求。例如预设的接受待处理请求的概率为10%,可预先设置数值9;在确定服务器已经过载之后,服务器在0~9中产生一个随机数并获取该随机数,其中,获取到的随机数为9的概率为10%;若产生的随机数不为9,则确定拒绝处理待处理请求。或者,预先设置数值为0~9,在确定服务器已经过载之后,服务器在0~99中产生一个随机数并获取该随机数,其中,获取到的随机数为0~9的概 率为10%;若产生的随机数不为0~9,则确定拒绝处理待处理请求。Of course, in other embodiments, the probability of accepting the pending request may also be preset to set at least one value according to the preset probability of accepting the pending request. After determining that the server has been overloaded, the server may generate a random number to determine the generation. Whether the random number is the same as the preset value, and when the judgment result is that the obtained random number is different from the preset value, it is determined to refuse to process the pending request. For example, the preset probability of accepting the pending request is 10%, and the value 9 may be preset; after determining that the server has been overloaded, the server generates a random number in 0-9 and acquires the random number, wherein the obtained random number The probability of 9 is 10%; if the generated random number is not 9, it is determined to refuse to process the pending request. Or, the value is set to 0 to 9 in advance. After determining that the server is overloaded, the server generates a random number in 0 to 99 and obtains the random number, wherein the obtained random number is 0 to 9. The rate is 10%; if the generated random number is not 0-9, it is determined to refuse to process the pending request.
306:若确定拒绝处理待处理请求,则拒绝对待处理请求进行处理。306: If it is determined that the pending request is refused to be processed, the processing request is rejected.
具体地,该步骤的实现原理与上述实施例二中步骤206的实现原理相同,具体详见上述实施例二中步骤206的内容,此处不再赘述。本实施例提供的方法,由于服务器的系统负载信息具有确定性,因而系统负载阈值能够反映服务器是否过载的真实情况,因此,通过将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对后,根据比对结果能够精准地确定服务器是否过载,从而在确定服务器过载时,通过拒绝对待处理请求进行处理,实现对服务器进行更佳的过载保护。Specifically, the implementation principle of the step is the same as the implementation principle of the step 206 in the second embodiment. For details, refer to the content of the step 206 in the second embodiment, and details are not described herein again. In the method provided in this embodiment, since the system load information of the server is deterministic, the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, the current system load information of the server is compared with a preset system load threshold. After that, according to the comparison result, it is possible to accurately determine whether the server is overloaded, thereby achieving better overload protection of the server by rejecting the processing of the processing request when determining that the server is overloaded.
实施例四Embodiment 4
本发明实施例提供了一种服务器的过载保护装置,该装置用于执行上述实施例一至实施例三提供的服务器的过载保护方法。参见图4,该装置包括一个或多个处理器以及处理器可读存储介质。该处理器可读存储介质上存储有多个模块,包括:The embodiment of the invention provides an overload protection device for a server, which is used for performing the overload protection method of the server provided in the first embodiment to the third embodiment. Referring to Figure 4, the apparatus includes one or more processors and a processor readable storage medium. The processor readable storage medium has a plurality of modules stored thereon, including:
第一接收模块401,用于接收待处理请求;The first receiving module 401 is configured to receive a pending request.
第一获取模块402,用于获取服务器当前的系统负载信息;The first obtaining module 402 is configured to obtain current system load information of the server.
第一确定模块403,用于将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对,并根据比对结果确定服务器是否过载;The first determining module 403 is configured to compare the current system load information of the server with a preset system load threshold, and determine whether the server is overloaded according to the comparison result;
处理模块404,用于当确定服务器过载时,拒绝对待处理请求进行处理。The processing module 404 is configured to refuse to process the processing request when determining that the server is overloaded.
具体的,服务器的系统负载信息可以包括服务器的本地资源使用率,服务器的本地资源使用率可以包括CPU使用率,内存使用率,网络带宽使用率等中的至少一种;对应的,预先设置的系统负载阈值可以包括预先设置的本 地资源使用率阈值。Specifically, the system load information of the server may include a local resource usage rate of the server, and the local resource usage rate of the server may include at least one of a CPU usage rate, a memory usage rate, and a network bandwidth usage rate; correspondingly, preset The system load threshold can include a preset Land resource usage threshold.
作为一种优选实施例,第一获取模块402,用于当预先存储的服务器的系统负载信息过期时,重新获取服务器的系统负载信息,并将获取到的系统负载信息作为服务器当前的系统负载信息。As a preferred embodiment, the first obtaining module 402 is configured to reacquire the system load information of the server when the system load information of the pre-stored server expires, and use the acquired system load information as the current system load information of the server. .
作为一种优选实施例,第一获取模块402,用于当预先存储的服务器的系统负载信息未过期时,读取预先存储的服务器的系统负载信息,并将读取的系统负载信息作为服务器当前的系统负载信息。As a preferred embodiment, the first obtaining module 402 is configured to: when the system load information of the pre-stored server is not expired, read the system load information of the pre-stored server, and use the read system load information as the current server. System load information.
作为一种优选实施例,多个模块,还包括:As a preferred embodiment, the multiple modules further include:
第一存储模块,用于预先获取并存储服务器的系统负载信息。The first storage module is configured to pre-fetch and store system load information of the server.
作为一种优选实施例,多个模块,还包括:As a preferred embodiment, the multiple modules further include:
第二接收模块,用于接收系统负载阈值设置命令;a second receiving module, configured to receive a system load threshold setting command;
第二存储模块,用于根据系统负载阈值设置命令设置并存储系统负载阈值。The second storage module is configured to set and store a system load threshold according to a system load threshold setting command.
作为一种优选实施例,第二存储模块,还用于判断系统负载阈值设置命令是否合法;当判断系统负载阈值设置命令合法时,执行根据系统负载阈值设置命令设置并存储系统负载阈值的步骤。As a preferred embodiment, the second storage module is further configured to determine whether the system load threshold setting command is legal. When determining that the system load threshold setting command is legal, the step of setting and storing the system load threshold according to the system load threshold setting command is performed.
作为一种优选实施例,多个模块,还包括:As a preferred embodiment, the multiple modules further include:
第二获取模块,用于获取预设时间段内应拒绝处理请求的次数;a second obtaining module, configured to acquire a number of times that the request should be rejected within a preset time period;
第二确定模块,用于根据获取到的预设时间段内应拒绝处理请求的次数确定是否拒绝处理待处理请求;a second determining module, configured to determine whether to reject the pending request according to the number of times the processing request should be rejected within the preset preset time period;
处理模块,用于当确定拒绝处理待处理请求时,执行拒绝对待处理请求进行处理的步骤。And a processing module, configured to perform a step of rejecting the processing of the processing request when determining to refuse to process the pending request.
作为一种优选实施例,多个模块,还包括: As a preferred embodiment, the multiple modules further include:
第三获取模块,用于获取一个随机数;a third obtaining module, configured to acquire a random number;
判断模块,用于判断随机数与预设数值是否相同;a determining module, configured to determine whether the random number is the same as the preset value;
第三确定模块,用于根据判断结果确定是否拒绝处理待处理请求;a third determining module, configured to determine, according to the determination result, whether to reject the pending request;
处理模块,用于当确定拒绝处理待处理请求时,执行拒绝对待处理请求进行处理的步骤。And a processing module, configured to perform a step of rejecting the processing of the processing request when determining to refuse to process the pending request.
本实施例提供的装置,由于服务器的系统负载信息具有确定性,因而系统负载阈值能够反映服务器是否过载的真实情况,因此,通过将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对后,根据比对结果能够精准地确定服务器是否过载,从而在确定服务器过载时,通过拒绝对待处理请求进行处理,实现对服务器进行更佳的过载保护。In the device provided in this embodiment, since the system load information of the server is deterministic, the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, by comparing the current system load information of the server with a preset system load threshold. After that, according to the comparison result, it is possible to accurately determine whether the server is overloaded, thereby achieving better overload protection of the server by rejecting the processing of the processing request when determining that the server is overloaded.
实施例五Embodiment 5
本实施例提供了一种服务器的过载保护设备,该设备可以用于执行上述实施例中提供的服务器的过载保护方法。参见图5,该服务器的过载保护设备500包括:The embodiment provides an overload protection device for a server, which can be used to perform the overload protection method of the server provided in the foregoing embodiment. Referring to FIG. 5, the overload protection device 500 of the server includes:
服务器的过载保护设备500可以包括RF(Radio Frequency,射频)电路110、包括有一个或一个以上计算机可读存储介质的存储器120、输入单元130、显示单元140、传感器150、音频电路160、WiFi(Wireless Fidelity,无线保真)模块170、包括有一个或者一个以上处理核心的处理器180、以及电源190等部件。本领域技术人员可以理解,图5中示出的服务器的过载保护设备500结构并不构成对服务器的过载保护设备500的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中: The server's overload protection device 500 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more computer readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, and WiFi ( Wireless Fidelity module 170, a processor 180 including one or more processing cores, and a power supply 190 and the like. It will be understood by those skilled in the art that the structure of the overload protection device 500 of the server shown in FIG. 5 does not constitute a limitation of the overload protection device 500 of the server, and may include more or less components than those illustrated, or may combine some Parts, or different parts. among them:
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器180处理;另外,将涉及上行的数据发送给基站。通常,RF电路110包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM)卡、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA(Code Division Multiple Access,码分多址)、WCDMA(Wideband Code Division Multiple Access,宽带码分多址)、LTE(Long Term Evolution,长期演进)、电子邮件、SMS(Short Messaging Service,短消息服务)等。The RF circuit 110 can be used for transmitting and receiving information or during a call, and receiving and transmitting signals. Specifically, after receiving downlink information of the base station, the downlink information is processed by one or more processors 180. In addition, the data related to the uplink is sent to the base station. . Generally, the RF circuit 110 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier). , duplexer, etc. In addition, RF circuitry 110 can also communicate with the network and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access). , Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据服务器的过载保护设备500的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器120还可以包括存储器控制器,以提供处理器180和输入单元130对存储器120的访问。The memory 120 can be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by running software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to The data of the server's overload protection device 500 is created (such as audio data, phone book, etc.). Moreover, memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 120 may also include a memory controller to provide access to memory 120 by processor 180 and input unit 130.
输入单元130可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体 地,输入单元130可包括触敏表面131以及其他输入设备132。触敏表面131,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面131上或在触敏表面131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面131。除了触敏表面131,输入单元130还可以包括其他输入设备132。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 130 can be configured to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls. Specific The input unit 130 can include a touch-sensitive surface 131 as well as other input devices 132. Touch-sensitive surface 131, also referred to as a touch display or trackpad, can collect touch operations on or near the user (such as a user using a finger, stylus, etc., on any suitable object or accessory on touch-sensitive surface 131 or The operation near the touch-sensitive surface 131) and driving the corresponding connecting device according to a preset program. Alternatively, the touch-sensitive surface 131 can include two portions of a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 180 is provided and can receive commands from the processor 180 and execute them. In addition, the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 can also include other input devices 132. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及服务器的过载保护设备500的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元140可包括显示面板141,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板141。进一步的,触敏表面131可覆盖显示面板141,当触敏表面131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图5中,触敏表面131与显示面板141是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面131与显示面板141集成而实现输入和输出功能。 The display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the overload protection device 500 of the server, which can be composed of graphics, text, icons, videos, and any combination thereof. . The display unit 140 may include a display panel 141. Alternatively, the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when the touch-sensitive surface 131 detects a touch operation thereon or nearby, it is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 according to the touch event The type provides a corresponding visual output on display panel 141. Although in FIG. 5, touch-sensitive surface 131 and display panel 141 are implemented as two separate components to implement input and input functions, in some embodiments, touch-sensitive surface 131 can be integrated with display panel 141 for input. And output function.
服务器的过载保护设备500还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在服务器的过载保护设备500移动到耳边时,关闭显示面板141和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于服务器的过载保护设备500还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The server's overload protection device 500 may also include at least one type of sensor 150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may be turned off when the overload protection device 500 of the server moves to the ear. Display panel 141 and/or backlight. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc. As for the server's overload protection device 500, other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. can be configured. , will not repeat them here.
音频电路160、扬声器161,传声器162可提供用户与服务器的过载保护设备500之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理后,经RF电路110以发送给比如另一服务器的过载保护设备500,或者将音频数据输出至存储器120以便进一步处理。音频电路160还可能包括耳塞插孔,以提供外设耳机与服务器的过载保护设备500的通信。The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the server's overload protection device 500. The audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal by the audio circuit 160. After receiving, it is converted into audio data, and then processed by the audio data output processor 180, transmitted to the overload protection device 500 such as another server via the RF circuit 110, or outputted to the memory 120 for further processing. The audio circuit 160 may also include an earbud jack to provide communication of the peripheral earphones with the server's overload protection device 500.
WiFi属于短距离无线传输技术,服务器的过载保护设备500通过WiFi模块170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图5示出了WiFi模块170,但是可以理解的是,其并不属于服务器的过载保护设备500的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。 WiFi is a short-range wireless transmission technology, and the server's overload protection device 500 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 170, which provides wireless broadband Internet access for users. Although FIG. 5 shows the WiFi module 170, it can be understood that it does not belong to the necessary configuration of the overload protection device 500 of the server, and can be omitted as needed within the scope of not changing the essence of the invention.
处理器180是服务器的过载保护设备500的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行服务器的过载保护设备500的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器180可包括一个或多个处理核心;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。The processor 180 is the control center of the server's overload protection device 500, which connects various portions of the entire handset using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and by calling stored in the memory 120. The internal data, the server's overload protection device 500's various functions and processing data, thereby overall monitoring of the mobile phone. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
服务器的过载保护设备500还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理系统与处理器180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源190还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The server's overload protection device 500 also includes a power supply 190 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically coupled to the processor 180 through a power management system to manage charging, discharging, and power consumption through the power management system. Management and other functions. Power supply 190 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
尽管未示出,服务器的过载保护设备500还可以包括摄像头、蓝牙模块等,在此不再赘述。具体在本实施例中,服务器的过载保护设备500的显示单元是触摸屏显示器,服务器的过载保护设备500还包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行。所述一个或者一个以上程序包含用于执行以下操作的指令:Although not shown, the overload protection device 500 of the server may further include a camera, a Bluetooth module, and the like, and details are not described herein again. Specifically, in this embodiment, the display unit of the overload protection device 500 of the server is a touch screen display, and the overload protection device 500 of the server further includes a memory, and one or more programs, wherein one or more programs are stored in the memory, And configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:
接收待处理请求,并获取服务器当前的系统负载信息;Receiving a pending request and obtaining current system load information of the server;
将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对,并根据比对结果确定服务器是否过载;Comparing the current system load information of the server with a preset system load threshold, and determining whether the server is overloaded according to the comparison result;
若确定服务器过载,则拒绝对待处理请求进行处理。 If it is determined that the server is overloaded, the processing request is rejected.
具体的,服务器的系统负载信息可以包括服务器的本地资源使用率,服务器的本地资源使用率可以包括CPU使用率,内存使用率,网络带宽使用率等中的至少一种;对应的,预先设置的系统负载阈值可以包括预先设置的本地资源使用率阈值。Specifically, the system load information of the server may include a local resource usage rate of the server, and the local resource usage rate of the server may include at least one of a CPU usage rate, a memory usage rate, and a network bandwidth usage rate; correspondingly, preset The system load threshold may include a pre-set local resource usage threshold.
假设上述为第一种可能的实施方式,则在第一种可能的实施方式作为基础而提供的第二种可能的实施方式中,服务器的过载保护设备500的存储器中,还包含用于执行以下操作的指令:It is assumed that the above is the first possible implementation manner, and in the second possible implementation manner provided by the first possible implementation manner, the memory of the overload protection device 500 of the server is further included for performing the following Operation instructions:
当预先存储的服务器的系统负载信息过期时,重新获取服务器的系统负载信息,并将获取到的系统负载信息作为服务器当前的系统负载信息。When the system load information of the pre-stored server expires, the system load information of the server is re-acquired, and the obtained system load information is used as the current system load information of the server.
在第一种可能的实施方式作为基础而提供的第三种可能的实施方式中,服务器的过载保护设备500的存储器中,还包含用于执行以下操作的指令:In a third possible implementation provided by the first possible implementation, the memory of the overload protection device 500 of the server further includes instructions for performing the following operations:
当预先存储的服务器的系统负载信息未过期时,读取预先存储的服务器的系统负载信息,并将读取的系统负载信息作为服务器当前的系统负载信息。When the system load information of the pre-stored server has not expired, the system load information of the pre-stored server is read, and the read system load information is used as the current system load information of the server.
在第二种或第三种可能的实施方式的任一种实施方式作为基础而提供的第四种可能的实施方式中,服务器的过载保护设备500的存储器中,还包含用于执行以下操作的指令:In a fourth possible implementation manner provided by any one of the second or third possible implementation manners, the memory of the overload protection device 500 of the server further includes the following operations. instruction:
预先获取并存储服务器的系统负载信息。Pre-fetch and store the system load information of the server.
在第一种可能的实施方式作为基础而提供的第五种可能的实施方式中,服务器的过载保护设备500的存储器中,还包含用于执行以下操作的指令:In a fifth possible implementation manner provided by the first possible implementation manner, the memory of the overload protection device 500 of the server further includes an instruction for performing the following operations:
接收系统负载阈值设置命令,并根据系统负载阈值设置命令设置并存储系统负载阈值。Receive system load threshold setting commands and set and store system load thresholds based on system load threshold setting commands.
在第五种可能的实施方式作为基础而提供的第六种可能的实施方式中,服务器的过载保护设备500的存储器中,还包含用于执行以下操作的指令: In a sixth possible implementation manner provided by the fifth possible implementation manner, the memory of the overload protection device 500 of the server further includes an instruction for performing the following operations:
判断系统负载阈值设置命令是否合法;Determine whether the system load threshold setting command is legal;
若判断系统负载阈值设置命令合法,则执行根据系统负载阈值设置命令设置并存储系统负载阈值的步骤。If it is determined that the system load threshold setting command is legal, the step of setting and storing the system load threshold according to the system load threshold setting command is performed.
在第一种可能的实施方式作为基础而提供的第七种可能的实施方式中,服务器的过载保护设备500的存储器中,还包含用于执行以下操作的指令:In a seventh possible implementation manner provided by the first possible implementation manner, the memory of the overload protection device 500 of the server further includes an instruction for performing the following operations:
获取预设时间段内应拒绝处理请求的次数,并根据获取到的预设时间段内应拒绝处理请求的次数确定是否拒绝处理待处理请求;Obtaining the number of times the request should be rejected within the preset time period, and determining whether to reject the pending request according to the number of times the request should be rejected within the preset time period obtained;
若确定拒绝处理待处理请求,则执行拒绝对待处理请求进行处理的步骤。If it is determined that the pending request is refused to be processed, the step of rejecting the processing of the processing request is performed.
在第一种可能的实施方式作为基础而提供的第八种可能的实施方式中,服务器的过载保护设备500的存储器中,还包含用于执行以下操作的指令:In an eighth possible implementation manner provided by the first possible implementation manner, the memory of the overload protection device 500 of the server further includes an instruction for performing the following operations:
获取一个随机数,并判断随机数与预设数值是否相同;Obtain a random number and determine whether the random number is the same as the preset value;
根据判断结果确定是否拒绝处理待处理请求;Determining whether to refuse to process the pending request according to the judgment result;
若确定拒绝处理待处理请求,则执行拒绝对待处理请求进行处理的步骤。If it is determined that the pending request is refused to be processed, the step of rejecting the processing of the processing request is performed.
本发明提供的服务器的过载保护设备500,由于服务器的系统负载信息具有确定性,因而系统负载阈值能够反映服务器是否过载的真实情况,因此,通过将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对后,根据比对结果能够精准地确定服务器是否过载,从而在确定服务器过载时,通过拒绝对待处理请求进行处理,实现对服务器进行更佳的过载保护。The overload protection device 500 of the server provided by the present invention, because the system load information of the server is deterministic, the system load threshold can reflect the real situation of whether the server is overloaded, and therefore, the current system load information of the server and the preset system load are After the thresholds are compared, it is possible to accurately determine whether the server is overloaded according to the comparison result, thereby performing better overload protection on the server by rejecting the processing of the processing request when determining that the server is overloaded.
实施例六Embodiment 6
本发明实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中的存储器中所包含的计算机可读存储介质;也可以是单独存在,未装配入终端中的计算机可读存储介质。该计算机可读存储介质 存储有一个或者一个以上程序,该一个或者一个以上程序被一个或者一个以上的处理器用来执行实现多维数据的权限查询方法,该方法包括:The embodiment of the present invention further provides a computer readable storage medium, which may be a computer readable storage medium included in the memory in the above embodiment; or may exist separately and not assembled into the terminal. Computer readable storage medium. Computer readable storage medium One or more programs are stored, and the one or more programs are used by one or more processors to execute a permission query method for implementing multidimensional data, the method comprising:
接收待处理请求,并获取服务器当前的系统负载信息;Receiving a pending request and obtaining current system load information of the server;
将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对,并根据比对结果确定服务器是否过载;Comparing the current system load information of the server with a preset system load threshold, and determining whether the server is overloaded according to the comparison result;
若确定服务器过载,则拒绝对待处理请求进行处理。If it is determined that the server is overloaded, the processing request is rejected.
具体的,服务器的系统负载信息可以包括服务器的本地资源使用率,服务器的本地资源使用率可以包括CPU使用率,内存使用率,网络带宽使用率等中的至少一种;对应的,预先设置的系统负载阈值可以包括预先设置的本地资源使用率阈值。Specifically, the system load information of the server may include a local resource usage rate of the server, and the local resource usage rate of the server may include at least one of a CPU usage rate, a memory usage rate, and a network bandwidth usage rate; correspondingly, preset The system load threshold may include a pre-set local resource usage threshold.
假设上述为第一种可能的实施方式,则在第一种可能的实施方式作为基础而提供的第二种可能的实施方式中,所述获取服务器当前的系统负载信息,包括:Assume that the above is the first possible implementation manner, in the second possible implementation manner provided by the first possible implementation manner, the acquiring the current system load information of the server includes:
当预先存储的服务器的系统负载信息过期时,重新获取服务器的系统负载信息,并将获取到的系统负载信息作为服务器当前的系统负载信息。When the system load information of the pre-stored server expires, the system load information of the server is re-acquired, and the obtained system load information is used as the current system load information of the server.
在第一种可能的实施方式作为基础而提供的第三种可能的实施方式中,所述获取服务器当前的系统负载信息,包括:In a third possible implementation manner provided by the first possible implementation manner, the acquiring current system load information of the server includes:
当预先存储的服务器的系统负载信息未过期时,读取预先存储的服务器的系统负载信息,并将读取的系统负载信息作为服务器当前的系统负载信息。When the system load information of the pre-stored server has not expired, the system load information of the pre-stored server is read, and the read system load information is used as the current system load information of the server.
在第二种或者第三种可能的实施方式作为基础而提供的第四种可能的实施方式中,所述获取服务器当前的系统负载信息之前,还包括:In a fourth possible implementation manner provided by the second or the third possible implementation manner, before the acquiring the current system load information of the server, the method further includes:
预先获取并存储服务器的系统负载信息。Pre-fetch and store the system load information of the server.
在第一种可能的实施方式作为基础而提供的第五种可能的实施方式中, 所述将所述服务器当前的系统负载信息与预先设置的系统负载阈值进行比对之前,还包括:In a fifth possible implementation provided by the first possible embodiment as a basis, Before comparing the current system load information of the server with a preset system load threshold, the method further includes:
接收系统负载阈值设置命令,并根据系统负载阈值设置命令设置并存储系统负载阈值。Receive system load threshold setting commands and set and store system load thresholds based on system load threshold setting commands.
在第五种可能的实施方式作为基础而提供的第六种可能的实施方式中,所述接收系统负载阈值设置命令之后,还包括:In a sixth possible implementation manner provided by the fifth possible implementation manner, after the receiving the system load threshold setting command, the method further includes:
判断系统负载阈值设置命令是否合法;Determine whether the system load threshold setting command is legal;
若判断系统负载阈值设置命令合法,则执行根据系统负载阈值设置命令设置并存储系统负载阈值的步骤。If it is determined that the system load threshold setting command is legal, the step of setting and storing the system load threshold according to the system load threshold setting command is performed.
在第一种可能的实施方式作为基础而提供的第七种可能的实施方式中,所述拒绝对所述待处理请求进行处理之前,还包括:In a seventh possible implementation manner provided by the first possible implementation manner, before the refusing to process the to-be-processed request, the method further includes:
获取预设时间段内应拒绝处理请求的次数,并根据获取到的预设时间段内应拒绝处理请求的次数确定是否拒绝处理待处理请求;Obtaining the number of times the request should be rejected within the preset time period, and determining whether to reject the pending request according to the number of times the request should be rejected within the preset time period obtained;
若确定拒绝处理待处理请求,则执行拒绝对待处理请求进行处理的步骤。If it is determined that the pending request is refused to be processed, the step of rejecting the processing of the processing request is performed.
在第一种可能的实施方式作为基础而提供的第八种可能的实施方式中,所述拒绝对所述待处理请求进行处理之前,还包括:In an eighth possible implementation manner provided by the first possible implementation manner, before the refusing to process the to-be-processed request, the method further includes:
获取一个随机数,并判断随机数与预设数值是否相同;Obtain a random number and determine whether the random number is the same as the preset value;
根据判断结果确定是否拒绝处理待处理请求;Determining whether to refuse to process the pending request according to the judgment result;
若确定拒绝处理待处理请求,则执行拒绝对待处理请求进行处理的步骤。If it is determined that the pending request is refused to be processed, the step of rejecting the processing of the processing request is performed.
本发明实施例提供的计算机可读存储介质,由于服务器的系统负载信息具有确定性,因而系统负载阈值能够反映服务器是否过载的真实情况,因此,通过将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对后,根据比对结果能够精准地确定服务器是否过载,从而在确定服务器过载时, 通过拒绝对待处理请求进行处理,实现对服务器进行更佳的过载保护。The computer readable storage medium provided by the embodiment of the present invention, because the system load information of the server is deterministic, the system load threshold can reflect the real situation of whether the server is overloaded, and therefore, the current system load information of the server and the preset system are After the load thresholds are compared, it is possible to accurately determine whether the server is overloaded according to the comparison result, thereby determining the server overload. Better handling of the server is achieved by refusing to process the request.
实施例七Example 7
本发明实施例提供了一种图形用户接口,所述图形用户接口用在终端上,所述终端包括触摸屏显示器、存储器和用于执行一个或者一个以上的程序的一个或者一个以上的处理器;所述图形用户接口包括:Embodiments of the present invention provide a graphical user interface for use on a terminal, the terminal including a touch screen display, a memory, and one or more processors for executing one or more programs; The graphical user interface includes:
接收待处理请求,并获取服务器当前的系统负载信息;Receiving a pending request and obtaining current system load information of the server;
将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对,并根据比对结果确定服务器是否过载;Comparing the current system load information of the server with a preset system load threshold, and determining whether the server is overloaded according to the comparison result;
若确定服务器过载,则拒绝对待处理请求进行处理。If it is determined that the server is overloaded, the processing request is rejected.
具体的,服务器的系统负载信息可以包括服务器的本地资源使用率,服务器的本地资源使用率可以包括CPU使用率,内存使用率,网络带宽使用率等中的至少一种;对应的,预先设置的系统负载阈值可以包括预先设置的本地资源使用率阈值。Specifically, the system load information of the server may include a local resource usage rate of the server, and the local resource usage rate of the server may include at least one of a CPU usage rate, a memory usage rate, and a network bandwidth usage rate; correspondingly, preset The system load threshold may include a pre-set local resource usage threshold.
本发明实施例提供的图形用户接口,由于服务器的系统负载信息具有确定性,因而系统负载阈值能够反映服务器是否过载的真实情况,因此,通过将服务器当前的系统负载信息与预先设置的系统负载阈值进行比对后,根据比对结果能够精准地确定服务器是否过载,从而在确定服务器过载时,通过拒绝对待处理请求进行处理,实现对服务器进行更佳的过载保护。The graphical user interface provided by the embodiment of the present invention, because the system load information of the server is deterministic, the system load threshold can reflect the real situation of whether the server is overloaded. Therefore, by setting the current system load information of the server and the preset system load threshold. After the comparison, the server can accurately determine whether the server is overloaded according to the comparison result, so that when the server is overloaded, the server can be processed by rejecting the processing request, thereby achieving better overload protection for the server.
需要说明的是:上述实施例提供的服务器的过载保护装置在对服务器进行过载保护时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构 划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的服务器的过载保护装置与服务器的过载保护方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the overload protection device of the server provided by the foregoing embodiment is only illustrated by the division of each functional module in the overload protection of the server. In actual applications, the foregoing functions may be assigned differently according to requirements. The functional module is completed, that is, the internal structure of the device Divided into different functional modules to complete all or part of the functions described above. In addition, the overload protection device of the server provided by the foregoing embodiment is the same as the embodiment of the overload protection method of the server. For the specific implementation process, refer to the method embodiment, and details are not described herein again.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims (18)

  1. 一种服务器的过载保护方法,其特征在于,所述方法包括:A method for overload protection of a server, the method comprising:
    接收待处理请求,并获取服务器当前的系统负载信息;Receiving a pending request and obtaining current system load information of the server;
    将所述服务器当前的系统负载信息与预先设置的系统负载阈值进行比对,并根据比对结果确定所述服务器是否过载;Comparing the current system load information of the server with a preset system load threshold, and determining whether the server is overloaded according to the comparison result;
    若确定所述服务器过载,则拒绝对所述待处理请求进行处理。If it is determined that the server is overloaded, the processing of the pending request is refused.
  2. 根据权利要求1所述的方法,其特征在于,所述获取服务器当前的系统负载信息,包括:The method according to claim 1, wherein the obtaining current system load information of the server comprises:
    当预先存储的所述服务器的系统负载信息过期时,重新获取所述服务器的系统负载信息,并将获取到的系统负载信息作为所述服务器当前的系统负载信息。When the system load information of the server that is pre-stored expires, the system load information of the server is re-acquired, and the acquired system load information is used as the current system load information of the server.
  3. 根据权利要求1所述的方法,其特征在于,所述获取服务器当前的系统负载信息,包括:The method according to claim 1, wherein the obtaining current system load information of the server comprises:
    当预先存储的所述服务器的系统负载信息未过期时,读取预先存储的所述服务器的系统负载信息,并将读取的系统负载信息作为所述服务器当前的系统负载信息。When the system load information of the server stored in advance is not expired, the system load information of the server stored in advance is read, and the read system load information is used as the current system load information of the server.
  4. 根据权利要求2或3所述的方法,其特征在于,所述获取服务器当前的系统负载信息之前,还包括:The method according to claim 2 or 3, wherein before the obtaining the current system load information of the server, the method further comprises:
    预先获取并存储服务器的系统负载信息。 Pre-fetch and store the system load information of the server.
  5. 根据权利要求1所述的方法,其特征在于,所述将所述服务器当前的系统负载信息与预先设置的系统负载阈值进行比对之前,还包括:The method according to claim 1, wherein before the comparing the current system load information of the server with a preset system load threshold, the method further includes:
    接收系统负载阈值设置命令,并根据所述系统负载阈值设置命令设置并存储系统负载阈值。A system load threshold setting command is received, and a system load threshold is set and stored according to the system load threshold setting command.
  6. 根据权利要求5所述的方法,其特征在于,所述接收系统负载阈值设置命令之后,还包括:The method according to claim 5, further comprising: after receiving the system load threshold setting command, further comprising:
    判断所述系统负载阈值设置命令是否合法;Determining whether the system load threshold setting command is legal;
    若判断所述系统负载阈值设置命令合法,则执行根据所述系统负载阈值设置命令设置并存储系统负载阈值的步骤。If it is determined that the system load threshold setting command is legal, the step of setting and storing the system load threshold according to the system load threshold setting command is performed.
  7. 根据权利要求1所述的方法,其特征在于,所述拒绝对所述待处理请求进行处理之前,还包括:The method according to claim 1, wherein before the refusing to process the pending request, the method further comprises:
    获取预设时间段内应拒绝处理请求的次数,并根据获取到的拒绝处理请求的次数确定是否拒绝处理所述待处理请求;Obtaining the number of times the request should be rejected within the preset time period, and determining whether to reject the pending request according to the obtained number of times of rejecting the processing request;
    若确定拒绝处理所述待处理请求,则执行拒绝对所述待处理请求进行处理的步骤。If it is determined that the pending request is refused to be processed, the step of rejecting the processing of the pending request is performed.
  8. 根据权利要求1所述的方法,其特征在于,所述拒绝对所述待处理请求进行处理之前,还包括:The method according to claim 1, wherein before the refusing to process the pending request, the method further comprises:
    获取一个随机数,并判断所述随机数与预设数值是否相同;Obtaining a random number and determining whether the random number is the same as the preset value;
    根据判断结果确定是否拒绝处理所述待处理请求;Determining whether to refuse to process the pending request according to the judgment result;
    若确定拒绝处理所述待处理请求,则执行拒绝对所述待处理请求进行处 理的步骤。If it is determined that the pending request is refused to be processed, performing a rejection of the pending request The steps.
  9. 根据权利要求1所述的方法,其特征在于,所述服务器的系统负载信息包括所述服务器的本地资源使用率;The method according to claim 1, wherein the system load information of the server comprises a local resource usage rate of the server;
    所述获取服务器当前的系统负载信息包括:获取服务器当前的本地资源使用率;The obtaining the current system load information of the server includes: acquiring a current local resource usage rate of the server;
    所述将所述服务器当前的系统负载信息与预先设置的系统负载阈值进行比对,并根据比对结果确定所述服务器是否过载包括:将所述服务器的当前的本地资源使用率与预先设置的本地资源使用率阈值进行比对,并根据比对结果确定所述服务器是否过载。Comparing the current system load information of the server with a preset system load threshold, and determining whether the server is overloaded according to the comparison result includes: setting a current local resource usage rate of the server with a preset The local resource usage thresholds are compared, and it is determined whether the server is overloaded according to the comparison result.
  10. 根据权利要求9所述的方法,其特征在于,所述本地资源包括多项本地资源,The method according to claim 9, wherein the local resource comprises a plurality of local resources.
    所述将所述服务器的当前的本地资源使用率与预先设置的本地资源使用率阈值进行比对,并根据比对结果确定所述服务器是否过载包括:The comparing the current local resource usage rate of the server with a preset local resource usage threshold, and determining whether the server is overloaded according to the comparison result includes:
    将所述服务器每一项本地资源的当前使用率与预先设置的每一项本地资源的使用率阈值进行比对;Comparing the current usage rate of each local resource of the server with a preset usage threshold of each local resource;
    若所有项本地资源的当前使用率都小于对应的预先设置的本地资源使用率阈值,确定所述服务器不过载;If the current usage rate of all the local resources is less than the corresponding preset local resource usage threshold, it is determined that the server is not overloaded;
    若任意一项本地资源的当前使用率大于对应的预先设置的本地资源使用率阈值,确定所述服务器过载。If the current usage rate of any one of the local resources is greater than the corresponding preset local resource usage threshold, the server is determined to be overloaded.
  11. 一种服务器的过载保护装置,其特征在于,所述装置包括处理器和 处理器可读存储介质,所述处理器可读存储介质存储有多个模块,所述多个模块包括:An overload protection device for a server, characterized in that the device comprises a processor and The processor readable storage medium stores a plurality of modules, the plurality of modules including:
    第一接收模块,用于接收待处理请求;a first receiving module, configured to receive a pending request;
    第一获取模块,用于获取服务器当前的系统负载信息;a first acquiring module, configured to acquire current system load information of the server;
    第一确定模块,用于将所述服务器当前的系统负载信息与预先设置的系统负载阈值进行比对,并根据比对结果确定所述服务器是否过载;a first determining module, configured to compare the current system load information of the server with a preset system load threshold, and determine whether the server is overloaded according to the comparison result;
    处理模块,用于当确定所述服务器过载时,拒绝对所述待处理请求进行处理。And a processing module, configured to refuse to process the to-be-processed request when determining that the server is overloaded.
  12. 根据权利要求11所述的装置,其特征在于,所述获取模块,用于当预先存储的所述服务器的系统负载信息过期时,重新获取所述服务器的系统负载信息,并将获取到的系统负载信息作为所述服务器当前的系统负载信息。The device according to claim 11, wherein the obtaining module is configured to re-acquire system load information of the server when the system load information of the server stored in advance expires, and acquire the system The load information is used as current system load information of the server.
  13. 根据权利要求11所述的装置,其特征在于,所述获取模块,用于当预先存储的所述服务器的系统负载信息未过期时,读取预先存储的所述服务器的系统负载信息,并将读取的系统负载信息作为所述服务器当前的系统负载信息。The device according to claim 11, wherein the obtaining module is configured to: when pre-stored system load information of the server is not expired, read pre-stored system load information of the server, and The read system load information is used as the current system load information of the server.
  14. 根据权利要求12或13所述的装置,其特征在于,所述多个模块还包括:The device according to claim 12 or 13, wherein the plurality of modules further comprises:
    第一存储模块,用于预先获取并存储服务器的系统负载信息。The first storage module is configured to pre-fetch and store system load information of the server.
  15. 根据权利要求11所述的装置,其特征在于,所述多个模块还包括: The device according to claim 11, wherein the plurality of modules further comprises:
    第二接收模块,用于接收系统负载阈值设置命令;a second receiving module, configured to receive a system load threshold setting command;
    第二存储模块,用于根据所述系统负载阈值设置命令设置并存储系统负载阈值。And a second storage module, configured to set and store a system load threshold according to the system load threshold setting command.
  16. 根据权利要求15所述的装置,其特征在于,所述第二存储模块,还用于判断所述系统负载阈值设置命令是否合法;当判断所述系统负载阈值设置命令合法时,执行根据所述系统负载阈值设置命令设置并存储系统负载阈值的步骤。The device according to claim 15, wherein the second storage module is further configured to determine whether the system load threshold setting command is legal; when it is determined that the system load threshold setting command is legal, performing according to the The system load threshold setting command sets and stores the system load threshold.
  17. 根据权利要求11所述的装置,其特征在于,所述多个模块还包括:The device according to claim 11, wherein the plurality of modules further comprises:
    第二获取模块,用于获取预设时间段内应拒绝处理请求的次数;a second obtaining module, configured to acquire a number of times that the request should be rejected within a preset time period;
    第二确定模块,用于根据获取到的预设时间段内应拒绝处理请求的次数确定是否拒绝处理所述待处理请求;a second determining module, configured to determine, according to the number of times the processing request should be rejected within the preset preset time period, whether to refuse to process the pending request;
    所述处理模块,用于当确定拒绝处理所述待处理请求时,执行拒绝对所述待处理请求进行处理的步骤。The processing module is configured to perform a step of rejecting processing of the to-be-processed request when determining to refuse to process the to-be-processed request.
  18. 根据权利要求11所述的装置,其特征在于,所述多个模块还包括:The device according to claim 11, wherein the plurality of modules further comprises:
    第三获取模块,用于获取一个随机数;a third obtaining module, configured to acquire a random number;
    判断模块,用于判断所述随机数与预设数值是否相同;a determining module, configured to determine whether the random number is the same as a preset value;
    第三确定模块,用于根据判断结果确定是否拒绝处理所述待处理请求;a third determining module, configured to determine, according to the determination result, whether to reject the pending request;
    所述处理模块,用于当确定拒绝处理所述待处理请求时,执行拒绝对所述待处理请求进行处理的步骤。 The processing module is configured to perform a step of rejecting processing of the to-be-processed request when determining to refuse to process the to-be-processed request.
PCT/CN2015/073012 2013-12-16 2015-02-13 Server overload protection method and device WO2015090248A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310693053.1A CN104142862B (en) 2013-12-16 2013-12-16 The overload protection method of server and device
CN201310693053.1 2013-12-16

Publications (1)

Publication Number Publication Date
WO2015090248A1 true WO2015090248A1 (en) 2015-06-25

Family

ID=51852043

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/073012 WO2015090248A1 (en) 2013-12-16 2015-02-13 Server overload protection method and device

Country Status (2)

Country Link
CN (1) CN104142862B (en)
WO (1) WO2015090248A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109918196A (en) * 2019-01-23 2019-06-21 深圳壹账通智能科技有限公司 Method for distributing system resource, device, computer equipment and storage medium
CN110674060A (en) * 2019-09-06 2020-01-10 平安普惠企业管理有限公司 Service fusing control method and device
CN111356903A (en) * 2019-01-25 2020-06-30 深圳市大疆创新科技有限公司 Visual positioning method, device and system
CN113765687A (en) * 2020-06-05 2021-12-07 网联清算有限公司 Fault alarm method, device, equipment and storage medium of server
CN114326430A (en) * 2022-01-07 2022-04-12 康体佳智能科技(深圳)有限公司 Load control method, device, equipment and computer readable storage medium
US11340956B2 (en) 2020-09-11 2022-05-24 Toyota Motor Engineering & Manufacturing North America, Inc. Systems and methods for dynamic prediction and optimization of edge server scheduling
CN115150460A (en) * 2022-06-30 2022-10-04 济南浪潮数据技术有限公司 Node secure registration method, device, equipment and readable storage medium

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142862B (en) * 2013-12-16 2015-09-16 腾讯科技(深圳)有限公司 The overload protection method of server and device
CN106302570A (en) * 2015-05-14 2017-01-04 阿里巴巴集团控股有限公司 A kind of request processing method and device
CN105554049B (en) * 2015-08-14 2018-12-25 广州爱九游信息技术有限公司 Distributed service amount control method and device
CN105376332A (en) * 2015-12-14 2016-03-02 江苏名通信息科技有限公司 Load migration method for mobile phone game servers
CN107092526B (en) * 2016-11-02 2021-06-15 北京星选科技有限公司 Task processing method and device
CN107465627A (en) * 2017-08-11 2017-12-12 北京小度信息科技有限公司 Overload protection method, device, electronic equipment and flow processing system
CN108509148B (en) * 2018-02-07 2021-08-06 新华三技术有限公司 I/O request processing method and device
CN110933122B (en) * 2018-09-20 2023-06-23 北京默契破冰科技有限公司 Method, apparatus and computer storage medium for managing server
CN109726003B (en) * 2019-01-04 2020-09-15 Oppo广东移动通信有限公司 Application unfreezing processing method, electronic device and computer readable storage medium
CN111988234A (en) * 2019-05-23 2020-11-24 厦门网宿有限公司 Overload protection method, device, server and storage medium
CN110502345A (en) * 2019-08-26 2019-11-26 北京博睿宏远数据科技股份有限公司 A kind of overload protection method, device, computer equipment and storage medium
CN111984437A (en) * 2020-08-31 2020-11-24 平安医疗健康管理股份有限公司 DRG packet server RPC service processing method and device and computer equipment
CN112559189A (en) * 2020-12-21 2021-03-26 厦门亿联网络技术股份有限公司 Service request processing method and device, electronic equipment and storage medium
CN113051079B (en) * 2021-03-31 2022-03-01 淄博职业学院 Computer overload protection device
CN115801684B (en) * 2023-01-31 2023-04-21 深圳方位通讯科技有限公司 Terminal interaction method and system based on SSH server

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009648A (en) * 2006-12-27 2007-08-01 北京航空航天大学 Multi-server hierarchical alterative load balance method
US20080154805A1 (en) * 2006-12-20 2008-06-26 Nagasubramanian Gurumoorthy Utilization based installation on a computing system
CN102708011A (en) * 2012-05-11 2012-10-03 南京邮电大学 Multistage load estimating method facing task scheduling of cloud computing platform
TW201308097A (en) * 2011-08-02 2013-02-16 Viaccess Sa Method for smoothing the workload of a server
CN103036994A (en) * 2012-12-18 2013-04-10 曙光信息产业(北京)有限公司 Cloud storage system capable of achieving load balance
CN103188345A (en) * 2013-03-01 2013-07-03 北京邮电大学 Distributive dynamic load management system and distributive dynamic load management method
CN104142862A (en) * 2013-12-16 2014-11-12 腾讯科技(深圳)有限公司 Overload protection method and device for server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080154805A1 (en) * 2006-12-20 2008-06-26 Nagasubramanian Gurumoorthy Utilization based installation on a computing system
CN101009648A (en) * 2006-12-27 2007-08-01 北京航空航天大学 Multi-server hierarchical alterative load balance method
TW201308097A (en) * 2011-08-02 2013-02-16 Viaccess Sa Method for smoothing the workload of a server
CN102708011A (en) * 2012-05-11 2012-10-03 南京邮电大学 Multistage load estimating method facing task scheduling of cloud computing platform
CN103036994A (en) * 2012-12-18 2013-04-10 曙光信息产业(北京)有限公司 Cloud storage system capable of achieving load balance
CN103188345A (en) * 2013-03-01 2013-07-03 北京邮电大学 Distributive dynamic load management system and distributive dynamic load management method
CN104142862A (en) * 2013-12-16 2014-11-12 腾讯科技(深圳)有限公司 Overload protection method and device for server

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109918196A (en) * 2019-01-23 2019-06-21 深圳壹账通智能科技有限公司 Method for distributing system resource, device, computer equipment and storage medium
CN109918196B (en) * 2019-01-23 2022-11-29 深圳壹账通智能科技有限公司 System resource allocation method, device, computer equipment and storage medium
CN111356903A (en) * 2019-01-25 2020-06-30 深圳市大疆创新科技有限公司 Visual positioning method, device and system
CN110674060A (en) * 2019-09-06 2020-01-10 平安普惠企业管理有限公司 Service fusing control method and device
CN113765687A (en) * 2020-06-05 2021-12-07 网联清算有限公司 Fault alarm method, device, equipment and storage medium of server
CN113765687B (en) * 2020-06-05 2023-08-01 网联清算有限公司 Fault alarm method, device and equipment of server and storage medium
US11340956B2 (en) 2020-09-11 2022-05-24 Toyota Motor Engineering & Manufacturing North America, Inc. Systems and methods for dynamic prediction and optimization of edge server scheduling
CN114326430A (en) * 2022-01-07 2022-04-12 康体佳智能科技(深圳)有限公司 Load control method, device, equipment and computer readable storage medium
CN115150460A (en) * 2022-06-30 2022-10-04 济南浪潮数据技术有限公司 Node secure registration method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN104142862B (en) 2015-09-16
CN104142862A (en) 2014-11-12

Similar Documents

Publication Publication Date Title
WO2015090248A1 (en) Server overload protection method and device
US10831161B2 (en) Method and device for sending communication message
US10304461B2 (en) Remote electronic service requesting and processing method, server, and terminal
CN104518953B (en) Method for deleting message, instant communication terminal and system
WO2016150270A1 (en) Method and apparatus for processing group session message
WO2017096909A1 (en) Data connection establishing method and apparatus
US10237291B2 (en) Session processing method and device, server and storage medium
CN109039989B (en) Address resolution protocol spoofing detection method, host and computer-readable storage medium
WO2014032559A1 (en) Method and device for downloading file
CN104065693A (en) Method, device and system for accessing network data in webpage applications
WO2023236972A1 (en) Communication environment security warning method and apparatus, terminal device, and storage medium
CN107317828B (en) File downloading method and device
CN115118636B (en) Method and device for determining network jitter state, electronic equipment and storage medium
US20140344423A1 (en) Method, apparatus and system for switching function mode
CN113613310A (en) WIFI connection method and device, storage medium and mobile terminal
US20140366094A1 (en) Communication method, communication apparatus and terminal
CN110913022A (en) Method, device and system for downloading network file of mobile terminal and storage medium
CN106445841B (en) A kind of data transfer control method and device
CN114095585B (en) Data transmission method, device, storage medium and electronic equipment
TW201503937A (en) Method, apparatus and system for checking data security
CN114189436B (en) Multi-cluster configuration deployment method and device, electronic equipment and storage medium
CN111405649B (en) Information transmission method and device and mobile terminal
CN116684467B (en) Data acquisition method, electronic device and storage medium
CN107276880B (en) Method and device for acquiring mail
CN117112153A (en) Task processing method, device, computer equipment and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15729730

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC , EPO FORM 1205A DATED 31-10-16

122 Ep: pct application non-entry in european phase

Ref document number: 15729730

Country of ref document: EP

Kind code of ref document: A1