WO2021018058A1 - 系统过负荷控制方法及装置 - Google Patents

系统过负荷控制方法及装置 Download PDF

Info

Publication number
WO2021018058A1
WO2021018058A1 PCT/CN2020/104645 CN2020104645W WO2021018058A1 WO 2021018058 A1 WO2021018058 A1 WO 2021018058A1 CN 2020104645 W CN2020104645 W CN 2020104645W WO 2021018058 A1 WO2021018058 A1 WO 2021018058A1
Authority
WO
WIPO (PCT)
Prior art keywords
current
sliding window
service
time
real
Prior art date
Application number
PCT/CN2020/104645
Other languages
English (en)
French (fr)
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 WO2021018058A1 publication Critical patent/WO2021018058A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services

Definitions

  • the embodiments of the present invention relate to the field of computer technology, and in particular to a system overload control method, device and storage medium.
  • System overload means that the system's computing resources and memory resources have reached or will reach the limit of the system due to excessive business processing.
  • business needs to be controlled to reduce resource consumption.
  • the 5G Core Network (5G Core Network, referred to as 5GC) is a microservice-based architecture. These microservices are synchronized in time. Each microservice has its own overload control mechanism, but the 5GC system itself does not have a system overload control method.
  • the resource control effect of overload control methods usually used in other systems such as 4G is not ideal, which makes the resource fluctuation range large and makes the system overload control unstable.
  • the embodiments of the present invention provide a system overload control method, device, and storage medium to solve the problem of unsatisfactory resource control effect of the overload control method in the prior art and large resource fluctuation range.
  • the embodiment of the present invention provides a system overload control method, including:
  • the embodiment of the present invention provides a system overload control device, including:
  • the processing module is set to count the current business data into the current sliding window
  • the control module is set to judge whether there is a historical statistics window before the current sliding window. If the judgment is no, the current business is allowed to be executed, and the current business data is updated in the current sliding window; if the judgment is yes, the historical statistics window is accumulated Historical data, based on the historical data, determine whether the current business is allowed to be executed, and update the current business data in the current sliding window according to the processing result.
  • An embodiment of the present invention also provides a system overload control device, including: a memory, a processor, and a computer program stored in the memory and running on the processor, and a system overload control method implemented when the computer program is executed by the processor A step of.
  • the embodiment of the present invention also provides a computer-readable storage medium on which is stored a program for realizing information transmission, and the steps of the system overload control method are realized when the program is executed by a processor.
  • the system load can be controlled steadily, so that the computing resources and memory resources of the system can be used reasonably, and the stable operation of the system is ensured.
  • Fig. 1 is a schematic diagram of a system overload control method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of the working principle of the sliding window according to the embodiment of the present invention.
  • FIG. 3 is a schematic diagram of the working effect of the sliding window according to the embodiment of the present invention.
  • FIG. 4 is a schematic diagram of the system overload control device of the first embodiment of the device of the present invention.
  • Fig. 5 is a schematic diagram of the system overload control device of the second embodiment of the device of the present invention.
  • FIG. 1 is a schematic diagram of a system overload control method according to an embodiment of the present invention. As shown in FIG. 1, the system overload control method according to an embodiment of the present invention is specifically include:
  • Step 101 Calculate the current business data into the current sliding window
  • Step 101 specifically includes the following processing:
  • Step 1011 Obtain the time when the system receives the service request message, and calculate the real-time sliding window serial number according to the time; in step 1011, calculating the real-time sliding window serial number according to the time specifically includes:
  • T is the time for the system to receive the service request message
  • W is the size of the sliding window in seconds.
  • a sliding window is a sliding window.
  • FIG. 2 is a schematic diagram of the working principle of the sliding window according to an embodiment of the present invention. As shown in FIG. 2, the window size is in the unit of time. The embodiment of the present invention divides time into a series of continuous windows. The sliding window is identified by the sliding window serial number, and its value is the current time/window size, which is formula 1. All basic data are counted in these windows based on time, including the number of request messages, the number of failed messages, message types, and message weights.
  • Step 1012 Determine whether the serial number of the real-time sliding window is equal to the serial number of the current sliding window. If the judgment is yes, then the current business data is included in the current sliding window. If the judgment is no, slide the sliding window according to the real-time sliding window serial number to change the current business The data is included in the current sliding window.
  • the current service data specifically includes: the number of request messages, the number of failed messages, the message type, the message weight, and the number of service successes.
  • Step 102 Judge whether there is a historical statistics window before the current sliding window. If the judgement is no, the current business is allowed to be executed, and the current business data is updated in the current sliding window; if the judgement is yes, the historical data of the historical statistics window is accumulated , Determine whether the current business is allowed to be executed based on historical data, and update the current business data in the current sliding window according to the processing result.
  • the historical statistics window is the nearest N sliding windows before the current sliding window and the current sliding window, where N is a positive integer.
  • consecutive N sliding windows constitute a historical statistics window.
  • the most recent N sliding windows constitute the most recent historical statistical window, and the historical pass rate is calculated according to the data of each sliding window of the statistical window.
  • Step 102 specifically includes:
  • Step 1021 Calculate the service historical pass rate of each service based on historical data; Step 1021 specifically includes: calculate the service historical pass rate of each service according to formula 2:
  • HISTORY_PASSRATE k is the historical pass rate of service k
  • ACCEPT_TPS k is the number of services accepted by service k, which does not include the number of rejections due to overload control
  • WEIGHT k is the weight of service k
  • ALL_TPS n is all services of service n Number, including the number of rejections due to overload control
  • WEIGHT n is the weight of business n
  • m is the total number of business categories.
  • Step 1022 Calculate the real-time pass rate or real-time rejection rate of the current service according to the historical service pass rate; Step 1022 specifically includes:
  • REALTIME_PASSRATE k is the real-time pass rate of service k
  • SYS_LOAD is the system load, ranging from 0 to 100
  • THRESHOLD is the control threshold, ranging from 0 to 100
  • HISTORY_PASSRATE k is the historical passing rate of service k
  • REALTIME_REJECTRATE k 100-REALTIME_PASSRATE k
  • REALTIME_REJECTRATE k is the real-time rejection rate of business k.
  • Step 1023 Determine whether to allow execution of the current service according to the real-time pass rate or the real-time rejection rate of the current service.
  • Step 1022 specifically includes:
  • USER_REJECTRATE is the user rejection rate
  • USERID is the user ID
  • USERWINSEQ is the value obtained by dividing the system time by the user time window size
  • the user time window size is a pre-configured value
  • the user time window is different from the previous sliding window, and its unit Is seconds, the size is configurable, the default is 10 seconds;
  • Example 1 When the system is started, the first business message is received in the first sliding window, assuming it is authentication
  • Step 2 Add 1 to the number of authentication requests and count them into the current sliding window 1234567.
  • Step 3 Since it is the first sliding window message in the system, there is no historical statistics window, so this business is allowed. The number of successful authentication times plus 1 is counted into the current sliding window 1234567.
  • Example 2 Receive a follow-up business message in the first sliding window
  • Step 2 Count the number of service requests into the current sliding window 1234567. If it is an authentication service, add 1 to the number of authentication requests and count it into the current sliding window; if it is a registration service, add 1 to the number of registration requests and count it into the current sliding window; other business processes are similar.
  • Step 3 Since it is the first sliding window message in the system, there is no historical statistics window, so this business is allowed. Count the number of successful business operations into the current sliding window 1234567. If it is an authentication service, add 1 to the number of successful authentications and count it in the current sliding window; if it is a registration service, add 1 to the number of successful registrations and count it in the current sliding window; other business processes are similar.
  • Step 2 Count the number of service requests to the current sliding window 1234568. If it is an authentication service, add 1 to the number of authentication requests and count it in the current sliding window; if it is a registration service, add 1 to the number of registration requests and count to Currently in sliding window; other business processes are similar.
  • Step 3 Since it is the second sliding window message of the system, there is no historical statistics window, so this service is allowed. Count the number of successful business operations into the current sliding window 1234568. If it is an authentication service, add 1 to the number of successful authentications and count it in the current sliding window; if it is a registration service, add 1 to the number of successful registrations and count it in the current sliding window; other business processes are similar.
  • Example 4 A business message is received in the third sliding window.
  • the sliding window 1234567 and the sliding window 1234568 form a historical statistical window, and the statistical window data is calculated to obtain the historical pass rate HISTORY_PASSRATE of each business such as authentication and registration.
  • Step 2 Count the number of service requests into the current sliding window 1234569. If it is an authentication service, add 1 to the number of authentication requests and count it into the current sliding window; if it is a registration service, add 1 to the number of registration requests and count it into the current sliding window; other business processes are similar.
  • Step 3 Calculate the system load SYS_LOAD in real time according to the system's CPU and memory usage requests. According to the formula, calculate the real-time pass rate and real-time rejection rate of the currently received service. According to the real-time rejection rate of the service, judge whether to allow this service. If the result is allowed: if it is an authentication service, add 1 to the number of successful authentications and count it in the current sliding window 1234569; if it is a registration service, add 1 to the number of successful registrations and count it in the current sliding window 1234569; other business processing similar. If the result is rejected: The number of successful business operations is not accumulated.
  • the system load can be smoothly controlled. As shown in Figure 3, as the service flow increases, the system load has always been below the preset threshold, and the system's computing resources And memory resources can be used reasonably, ensuring the stable operation of the system.
  • FIG. 4 is a schematic diagram of the system overload control device of the first embodiment of the present invention. As shown in FIG. 4, the system overload control device according to the embodiment of the present invention The device specifically includes:
  • the processing module 40 is set to count the current business data into the current sliding window
  • the processing module 40 specifically includes the following processing:
  • the processing module 40 obtains the time when the system receives the service request message, and calculates the real-time sliding window serial number according to the time; in step 1011, calculating the real-time sliding window serial number according to the time specifically includes:
  • T is the time for the system to receive the service request message
  • W is the size of the sliding window in seconds.
  • a sliding window is a sliding window.
  • FIG. 2 is a schematic diagram of the working principle of the sliding window according to an embodiment of the present invention. As shown in FIG. 2, the window size is in the unit of time. The embodiment of the present invention divides time into a series of continuous windows. The sliding window is identified by the sliding window serial number, and its value is the current time/window size, which is formula 1. All basic data are counted in these windows based on time, including the number of request messages, the number of failed messages, message types, and message weights.
  • the processing module 40 judges whether the serial number of the real-time sliding window is equal to the serial number of the current sliding window. If the judgment is yes, the current business data is included in the current sliding window. If the judgment is no, the sliding window is moved according to the real-time sliding window serial number and the current business The data is included in the current sliding window.
  • the current service data specifically includes: the number of request messages, the number of failed messages, the message type, the message weight, and the number of service successes.
  • the control module 42 is configured to determine whether there is a historical statistics window before the current sliding window, if the determination is no, the current business is allowed to be executed, and the current business data is updated in the current sliding window; if the determination is yes, the history is accumulated Based on the historical data of the statistics window, it is determined whether the current business is allowed to be executed based on the historical data, and the current business data is updated in the current sliding window according to the processing result.
  • the historical statistics window is the nearest N sliding windows before the current sliding window and the current sliding window, where N is a positive integer.
  • consecutive N sliding windows constitute a historical statistics window.
  • the most recent N sliding windows constitute the most recent historical statistical window, and the historical pass rate is calculated according to the data of each sliding window of the statistical window.
  • the control module 42 is specifically set as:
  • the control module 42 calculates the service historical pass rate of each service based on historical data; in practical applications, the control module 42 calculates the service historical pass rate of each service according to formula 2:
  • HISTORY_PASSRATE k is the historical pass rate of service k
  • ACCEPT_TPS k is the number of services accepted by service k, which does not include the number of rejections due to overload control
  • WEIGHT k is the weight of service k
  • ALL_TPS n is all services of service n Number, including the number of rejections due to overload control
  • WEIGHT n is the weight of business n
  • m is the total number of business categories.
  • the control module 42 calculates the real-time pass rate or the real-time rejection rate of the current service according to the historical service pass rate; in actual applications, the control module 42 calculates the real-time pass rate of the current service according to formula 3:
  • REALTIME_PASSRATE k is the real-time pass rate of service k
  • SYS_LOAD is the system load, ranging from 0 to 100
  • THRESHOLD is the control threshold, ranging from 0 to 100
  • HISTORY_PASSRATE k is the historical passing rate of service k
  • REALTIME_REJECTRATE k 100-REALTIME_PASSRATE k
  • REALTIME_REJECTRATE k is the real-time rejection rate of business k.
  • the control module 42 determines whether to allow execution of the current service according to the real-time pass rate or the real-time rejection rate of the current service. In practical applications, the control module 42 calculates the user rejection rate according to formula 5:
  • USER_REJECTRATE is the user rejection rate
  • USERID is the user ID
  • USERWINSEQ is the value obtained by dividing the system time by the user time window size
  • the user time window size is a pre-configured value
  • the user time window is different from the previous sliding window, and its unit Is seconds, the size is configurable, the default is 10 seconds;
  • the system load can be smoothly controlled. As shown in Figure 3, as the service flow increases, the system load has always been below the preset threshold, and the system's computing resources And memory resources can be used reasonably, ensuring the stable operation of the system.
  • the embodiment of the present invention provides a system overload control device, as shown in FIG. 5, comprising: a memory 50, a processor 52, and a computer program stored on the memory 50 and running on the processor 52, so When the computer program is executed by the processor 52, the following method steps are implemented:
  • Step 101 Calculate the current business data into the current sliding window
  • Step 101 specifically includes the following processing:
  • Step 1011 Obtain the time when the system receives the service request message, and calculate the real-time sliding window serial number according to the time; in step 1011, calculating the real-time sliding window serial number according to the time specifically includes:
  • T is the time for the system to receive the service request message
  • W is the size of the sliding window in seconds.
  • a sliding window is a sliding window.
  • FIG. 2 is a schematic diagram of the working principle of the sliding window according to an embodiment of the present invention. As shown in FIG. 2, the window size is in the unit of time. The embodiment of the present invention divides time into a series of continuous windows. The sliding window is identified by the sliding window serial number, and its value is the current time/window size, which is formula 1. All basic data are counted in these windows based on time, including the number of request messages, the number of failed messages, message types, and message weights.
  • Step 1012 Determine whether the serial number of the real-time sliding window is equal to the serial number of the current sliding window. If the judgment is yes, then the current business data is included in the current sliding window. If the judgment is no, slide the sliding window according to the real-time sliding window serial number to change the current business The data is included in the current sliding window.
  • the current service data specifically includes: the number of request messages, the number of failed messages, the message type, the message weight, and the number of service successes.
  • Step 102 Judge whether there is a historical statistics window before the current sliding window. If the judgement is no, the current business is allowed to be executed, and the current business data is updated in the current sliding window; if the judgement is yes, the historical data of the historical statistics window is accumulated , Determine whether the current business is allowed to be executed based on historical data, and update the current business data in the current sliding window according to the processing result.
  • the historical statistics window is the nearest N sliding windows before the current sliding window and the current sliding window, where N is a positive integer.
  • consecutive N sliding windows constitute a historical statistics window.
  • the most recent N sliding windows constitute the most recent historical statistical window, and the historical pass rate is calculated according to the data of each sliding window of the statistical window.
  • Step 102 specifically includes:
  • Step 1021 Calculate the service historical pass rate of each service based on historical data; Step 1021 specifically includes: calculate the service historical pass rate of each service according to formula 2:
  • HISTORY_PASSRATE k is the historical pass rate of service k
  • ACCEPT_TPS k is the number of services accepted by service k, which does not include the number of rejections due to overload control
  • WEIGHT k is the weight of service k
  • ALL_TPS n is all services of service n Number, including the number of rejections due to overload control
  • WEIGHT n is the weight of business n
  • m is the total number of business categories.
  • Step 1022 Calculate the real-time pass rate or real-time rejection rate of the current service according to the historical service pass rate; Step 1022 specifically includes:
  • REALTIME_PASSRATE k is the real-time pass rate of service k
  • SYS_LOAD is the system load, ranging from 0 to 100
  • THRESHOLD is the control threshold, ranging from 0 to 100
  • HISTORY_PASSRATE k is the historical passing rate of service k
  • REALTIME_REJECTRATE k 100-REALTIME_PASSRATE k
  • REALTIME_REJECTRATE k is the real-time rejection rate of business k.
  • Step 1023 Determine whether to allow execution of the current service according to the real-time pass rate or the real-time rejection rate of the current service.
  • Step 1022 specifically includes:
  • USER_REJECTRATE is the user rejection rate
  • USERID is the user ID
  • WINSEQ is the real-time sliding window serial number
  • the embodiment of the present invention provides a computer-readable storage medium, on which a program for implementing information transmission is stored, and when the program is executed by the processor 52, the following method steps are implemented:
  • Step 101 Calculate the current business data into the current sliding window
  • Step 101 specifically includes the following processing:
  • Step 1011 Obtain the time when the system receives the service request message, and calculate the real-time sliding window serial number according to the time; in step 1011, calculating the real-time sliding window serial number according to the time specifically includes:
  • T is the time for the system to receive the service request message
  • W is the size of the sliding window in seconds.
  • a sliding window is a sliding window.
  • FIG. 2 is a schematic diagram of the working principle of the sliding window according to an embodiment of the present invention. As shown in FIG. 2, the window size is in the unit of time. The embodiment of the present invention divides time into a series of continuous windows. The sliding window is identified by the sliding window serial number, and its value is the current time/window size, which is formula 1. All basic data are counted in these windows based on time, including the number of request messages, the number of failed messages, message types, and message weights.
  • Step 1012 Determine whether the serial number of the real-time sliding window is equal to the serial number of the current sliding window. If the judgment is yes, then the current business data is included in the current sliding window. If the judgment is no, slide the sliding window according to the real-time sliding window serial number to change the current business The data is included in the current sliding window.
  • the current service data specifically includes: the number of request messages, the number of failed messages, the message type, the message weight, and the number of service successes.
  • Step 102 Judge whether there is a historical statistics window before the current sliding window. If the judgement is no, the current business is allowed to be executed, and the current business data is updated in the current sliding window; if the judgement is yes, the historical data of the historical statistics window is accumulated , Determine whether the current business is allowed to be executed based on historical data, and update the current business data in the current sliding window according to the processing result.
  • the historical statistics window is the nearest N sliding windows before the current sliding window and the current sliding window, where N is a positive integer.
  • consecutive N sliding windows constitute a historical statistics window.
  • the most recent N sliding windows constitute the most recent historical statistical window, and the historical pass rate is calculated according to the data of each sliding window of the statistical window.
  • Step 102 specifically includes:
  • Step 1021 Calculate the service historical pass rate of each service based on historical data; Step 1021 specifically includes: calculate the service historical pass rate of each service according to formula 2:
  • HISTORY_PASSRATE k is the historical pass rate of service k
  • ACCEPT_TPS k is the number of services accepted by service k, which does not include the number of rejections due to overload control
  • WEIGHT k is the weight of service k
  • ALL_TPS n is all services of service n Number, including the number of rejections due to overload control
  • WEIGHT n is the weight of business n
  • m is the total number of business categories.
  • Step 1022 Calculate the real-time pass rate or real-time rejection rate of the current service according to the historical service pass rate; Step 1022 specifically includes:
  • REALTIME_PASSRATE k is the real-time pass rate of service k
  • SYS_LOAD is the system load, ranging from 0 to 100
  • THRESHOLD is the control threshold, ranging from 0 to 100
  • HISTORY_PASSRATE k is the historical passing rate of service k
  • REALTIME_REJECTRATE k 100-REALTIME_PASSRATE k
  • REALTIME_REJECTRATE k is the real-time rejection rate of business k.
  • Step 1023 Determine whether to allow execution of the current service according to the real-time pass rate or the real-time rejection rate of the current service.
  • Step 1022 specifically includes:
  • USER_REJECTRATE is the user rejection rate
  • USERID is the user ID
  • WINSEQ is the real-time sliding window serial number
  • the computer-readable storage medium described in this embodiment includes, but is not limited to: ROM, RAM, magnetic disks, or optical disks.
  • the system load can be smoothly controlled. As shown in Figure 3, as the service flow increases, the system load has always been below the preset threshold, and the system's computing resources And memory resources can be used reasonably, ensuring the stable operation of the system.
  • modules or steps of the present invention can be implemented by a general computing device. They can be concentrated on a single computing device or distributed in a network composed of multiple computing devices. Above, alternatively, they can be implemented with program codes executable by the computing device, so that they can be stored in the storage device for execution by the computing device, and in some cases, can be executed in a different order than here. Perform the steps shown or described, or fabricate them into individual integrated circuit modules, or fabricate multiple modules or steps of them into a single integrated circuit module to achieve. In this way, the present invention is not limited to any specific combination of hardware and software.

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Theoretical Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种系统过负荷控制方法、装置及存储介质,其中,所述方法包括:将当次业务数据计入当前滑窗;判断在当前滑窗之前是否存在历史统计窗口,如果判断为否,则允许执行当前业务,在当前滑窗中更新当次业务数据;如果判断为是,则累计所述历史统计窗口的历史数据,基于所述历史数据确定是否允许执行当前业务,并根据处理结果在当前滑窗中更新当次业务数据。本发明能够对系统负荷进行平稳的控制,使得系统的计算资源和内存资源能够合理的使用,保证了系统的稳定运行。

Description

系统过负荷控制方法及装置 技术领域
本发明实施例涉及计算机技术领域,尤其涉及一种系统过负荷控制方法、装置及存储介质。
背景技术
系统过负荷是指系统因处理过多的业务,导致系统的计算资源和内存资源使用达到或将达到系统的极限,为了保证系统的稳定运行,需要对业务进行控制,以减少资源的消耗。5G核心网(5G Core Network,简称为5GC)是基于微服务的构架。这些微服务在时间上是同步的,每个微服务有自身的过负荷控制机制,但是5GC系统本身没有系统过负荷控制方法。通常用在4G等其他系统的过负荷控制方法的资源控制效果不理想,使得资源波动幅度很大,使得系统过负荷控制不稳定。
因此,目前急需一种针对5GC的系统过负荷控制方法。
发明内容
本发明实施例提供了一种系统过负荷控制方法、装置及存储介质,用以解决现有技术中过负荷控制方法的资源控制效果不理想,资源波动幅度大的问题。
本发明实施例提供一种系统过负荷控制方法,包括:
将当次业务数据计入当前滑窗;
判断在当前滑窗之前是否存在历史统计窗口,如果判断为否,则允许执行当前业务,在当前滑窗中更新当次业务数据;如果判断为是,则累计 历史统计窗口的历史数据,基于历史数据确定是否允许执行当前业务,并根据处理结果在当前滑窗中更新当次业务数据。
本发明实施例提供一种系统过负荷控制装置,包括:
处理模块,设置为将当次业务数据计入当前滑窗;
控制模块,设置为判断在当前滑窗之前是否存在历史统计窗口,如果判断为否,则允许执行当前业务,在当前滑窗中更新当次业务数据;如果判断为是,则累计历史统计窗口的历史数据,基于历史数据确定是否允许执行当前业务,并根据处理结果在当前滑窗中更新当次业务数据。
本发明实施例还提供一种系统过负荷控制装置,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,计算机程序被处理器执行时实现的系统过负荷控制方法的步骤。
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有信息传递的实现程序,程序被处理器执行时实现的系统过负荷控制方法的步骤。
采用本发明实施例,能够对系统负荷进行平稳的控制,使得系统的计算资源和内存资源能够合理的使用,保证了系统的稳定运行。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目 的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1是本发明实施例的系统过负荷控制方法的示意图;
图2是本发明实施例的滑窗工作原理的示意图;
图3是本发明实施例的滑窗工作效果的示意图;
图4是本发明装置实施例一的系统过负荷控制装置的示意图;
图5是本发明装置实施例二的系统过负荷控制装置的示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
方法实施例
根据本发明实施例,提供了一种系统过负荷控制方法,图1是本发明实施例的系统过负荷控制方法的示意图,如图1所示,根据本发明实施例的系统过负荷控制方法具体包括:
步骤101,将当次业务数据计入当前滑窗;
步骤101具体包括如下处理:
步骤1011,获取系统接收业务请求消息的时间,并根据时间计算实时滑窗序号;在步骤1011中,根据时间计算实时滑窗序号具体包括:
根据公式1计算实时滑窗序号:
实时滑窗序号=T/W 公式1;
其中,T为系统接收业务请求消息的时间,W为滑窗的大小,单位为秒。
滑窗即滑动窗口,图2是本发明实施例的滑窗工作原理的示意图,如图2所示,其窗口大小以时间为单位,本发明实施例将时间分为一串连续的窗口。滑动窗口以滑窗序号标识,其值为当前时间/窗口大小即公式1。所有的基础数据都根据时间统计到这些窗口中,包括请求消息数目、失败的消息数目、消息类别、消息权重等。
步骤1012,判断实时滑窗序号是否等于当前滑窗序号,如果判断为是,则将当次业务数据计入当前滑窗,如果判断为否,根据实时滑窗序号滑动滑窗,将当次业务数据计入当前滑窗。其中,在本发明实施例中,当次业务数据具体包括:请求消息数目、失败的消息数目、消息类别、消息权重、以及业务成功次数。
步骤102,判断在当前滑窗之前是否存在历史统计窗口,如果判断为否,则允许执行当前业务,在当前滑窗中更新当次业务数据;如果判断为是,则累计历史统计窗口的历史数据,基于历史数据确定是否允许执行当前业务,并根据处理结果在当前滑窗中更新当次业务数据。其中,历史统计窗口为当前滑窗之前与当前滑窗最近的N个滑窗,其中,N为正整数。
也就是说,连续的N个滑动窗口构成一个历史统计窗口。当前最近的N个滑动窗口构成最近历史统计窗口,根据该统计窗口的各个滑动窗口的数据,计算出历史通过率。
步骤102具体包括:
步骤1021,基于历史数据计算各个业务的业务历史通过率;步骤1021具体包括:根据公式2计算各个业务的业务历史通过率:
Figure PCTCN2020104645-appb-000001
其中,HISTORY_PASSRATE k为业务k的历史通过率,ACCEPT_TPS k为业务k接受的业务数目,其中,不包含因过负荷控制拒绝的次数,WEIGHT k为业务k的权重,ALL_TPS n为业务n所有的业务数目,含因过负荷控制拒绝的次数,WEIGHT n为业务n的权重,m为业务总类别数目。
步骤1022,根据业务历史通过率计算当前业务的实时通过率或者实时拒绝率;步骤1022具体包括:
根据公式3计算当前业务的实时通过率:
Figure PCTCN2020104645-appb-000002
其中,REALTIME_PASSRATE k为业务k实时通过率,SYS_LOAD为系统负荷,范围为0-100,THRESHOLD为控制门限,范围为0-100,HISTORY_PASSRATE k为业务k历史通过率;
或者,根据公式4计算当前业务的实时拒绝率:
REALTIME_REJECTRATE k=100-REALTIME_PASSRATE k
公式4;
其中,REALTIME_REJECTRATE k为业务k实时拒绝率。
步骤1023,根据当前业务的实时通过率或者实时拒绝率确定是否允许执行当前业务。步骤1022具体包括:
根据公式5计算用户拒绝率:
USER_REJECTRATE=HASH(USERID^USERWINSEQ)公式5;
其中,USER_REJECTRATE为用户拒绝率,USERID为用户ID,USERWINSEQ为系统时间除以用户时间窗口大小所得到的值,用户时间窗口大小为预先配置的值;用户时间窗口不同于前面的滑动窗口,其单位为秒,大小可配置,默认情况为10秒;
判断用户拒绝率是否小于或等于业务k实时拒绝率,如果判断为是,则拒绝执行当前业务,否则,允许执行当前任务。
以下结合附图,对本发明实施的上述技术方案进行详细说明。
假设滑窗大小为10秒,一个统计周期包含2个滑窗,各个业务中重要性权重WEIGHT已确定,过负荷门限假设为THRESHOLD。
实例1:系统启动时,在第一个滑动窗口收到第一个业务消息,假设为鉴权
步骤1:系统收到鉴权请求消息,获取当前时间为12345672秒,计算实时滑窗序号REALTIME_WINSEQ=12345672/10=1234567。初始时当前滑窗序号CUR_WINSEQ为0,将CUR_WINSEQ设置为1234567。
步骤2:将鉴权请求次数加1,统计到当前滑窗1234567中。
步骤3:由于是系统的第一个滑窗消息,没有历史统计窗口,允许本次业务。将鉴权成功次数加1统计到当前滑窗1234567中。
实例2:在第一个滑动窗口收到后续业务消息
步骤1:系统收到业务请求消息,获取当前时间为12345673秒,计算实时滑窗序号REALTIME_WINSEQ=12345673/10=1234567,当前滑窗序号CUR_WINSEQ为1234567,和REALTIME_WINSEQ一样,不需要滑动。
步骤2:将业务请求次数统计到当前滑窗1234567中。如果是鉴权业务,将鉴权请求次数加1,统计到当前滑窗中;如果是登记业务,将登记 请求次数加1,统计到当前滑窗中;其他业务处理类似。
步骤3:由于是系统的第一个滑窗消息,没有历史统计窗口,允许本次业务。将业务成功次数统计到当前滑窗1234567中。如果是鉴权业务,将鉴权成功次数加1,统计到当前滑窗中;如果是登记业务,将登记成功次数加1,统计到当前滑窗中;其他业务处理类似。
实例3:在第二个滑动窗口收到业务消息
步骤1:系统收到业务请求消息,获取当前时间为12345681秒,计算实时滑窗序号REALTIME_WINSEQ=12345681/10=1234568,当前滑窗序号CUR_WINSEQ为1234567,和REALTIME_WINSEQ不一样,需要滑动当前窗口到REALTIME_WINSEQ,CUR_WINSEQ设置为1234568。
步骤2:将业务请求次数统计到当前滑窗1234568中,如果是鉴权业务,将鉴权请求次数加1,统计到当前滑窗中;如果是登记业务,将登记请求次数加1,统计到当前滑窗中;其他业务处理类似。
步骤3:由于是系统的第二个滑窗消息,没有历史统计窗口,允许本次业务。将业务成功次数统计到当前滑窗1234568中。如果是鉴权业务,将鉴权成功次数加1,统计到当前滑窗中;如果是登记业务,将登记成功次数加1,统计到当前滑窗中;其他业务处理类似。
实例4:在第三个滑动窗口收到业务消息。
步骤1:系统收到业务请求消息,获取当前时间为12345690秒,计算实时滑窗序号REALTIME_WINSEQ=12345690/10=1234569,当前滑窗序号CUR_WINSEQ为1234568,和REALTIME_WINSEQ不一样,需要滑动当前窗口到REALTIME_WINSEQ,将CUR_WINSEQ设置为1234569。滑动时,滑窗1234567和滑窗1234568组成一个历史统计窗口,对该统计窗口数据进行计算,得到鉴权、登记等各个业务的历史通过率 HISTORY_PASSRATE。
步骤2:将业务请求次数统计到当前滑窗1234569中。如果是鉴权业务,将鉴权请求次数加1,统计到当前滑窗中;如果是登记业务,将登记请求次数加1,统计到当前滑窗中;其他业务处理类似。
步骤3:根据系统的CPU和内存使用请求实时计算出系统负荷SYS_LOAD.根据公式计算出当前收到的业务的实时通过率和实时拒绝率。根据业务的实时拒绝率判断是否允许本次业务。如果结果为允许:如果是鉴权业务,将鉴权成功次数加1,统计到当前滑窗1234569中;如果是登记业务,将登记成功次数加1,统计到当前滑窗1234569中;其他业务处理类似。如果结果为拒绝:不累计业务成功次数。
综上所述,借助于本发明实施的技术方案,能够对系统负荷进行平稳的控制,如图3所示,随着服务流的增加,系统负载一直处于预设门限之下,系统的计算资源和内存资源能够合理的使用,保证了系统的稳定运行。
装置实施例一
根据本发明实施例,提供了一种系统过负荷控制装置,图4是本发明装置实施例一的系统过负荷控制装置的示意图,如图4所示,根据本发明实施例的系统过负荷控制装置具体包括:
处理模块40,设置为将当次业务数据计入当前滑窗;
处理模块40具体包括如下处理:
处理模块40获取系统接收业务请求消息的时间,并根据时间计算实时滑窗序号;在步骤1011中,根据时间计算实时滑窗序号具体包括:
根据公式1计算实时滑窗序号:
实时滑窗序号=T/W公式1;
其中,T为系统接收业务请求消息的时间,W为滑窗的大小,单位为秒。
滑窗即滑动窗口,图2是本发明实施例的滑窗工作原理的示意图,如图2所示,其窗口大小以时间为单位,本发明实施例将时间分为一串连续的窗口。滑动窗口以滑窗序号标识,其值为当前时间/窗口大小即公式1。所有的基础数据都根据时间统计到这些窗口中,包括请求消息数目、失败的消息数目、消息类别、消息权重等。
处理模块40判断实时滑窗序号是否等于当前滑窗序号,如果判断为是,则将当次业务数据计入当前滑窗,如果判断为否,根据实时滑窗序号滑动滑窗,将当次业务数据计入当前滑窗。其中,在本发明实施例中,当次业务数据具体包括:请求消息数目、失败的消息数目、消息类别、消息权重、以及业务成功次数。
控制模块42,设置为判断在当前滑窗之前是否存在历史统计窗口,如果判断为否,则允许执行当前业务,在当前滑窗中更新当次业务数据;如果判断为是,则累计所述历史统计窗口的历史数据,基于所述历史数据确定是否允许执行当前业务,并根据处理结果在当前滑窗中更新当次业务数据。
其中,历史统计窗口为当前滑窗之前与当前滑窗最近的N个滑窗,其中,N为正整数。
也就是说,连续的N个滑动窗口构成一个历史统计窗口。当前最近的N个滑动窗口构成最近历史统计窗口,根据该统计窗口的各个滑动窗口的数据,计算出历史通过率。
控制模块42具体设置为:
控制模块42基于历史数据计算各个业务的业务历史通过率;在实际 应用中,控制模块42根据公式2计算各个业务的业务历史通过率:
Figure PCTCN2020104645-appb-000003
其中,HISTORY_PASSRATE k为业务k的历史通过率,ACCEPT_TPS k为业务k接受的业务数目,其中,不包含因过负荷控制拒绝的次数,WEIGHT k为业务k的权重,ALL_TPS n为业务n所有的业务数目,含因过负荷控制拒绝的次数,WEIGHT n为业务n的权重,m为业务总类别数目。
控制模块42根据业务历史通过率计算当前业务的实时通过率或者实时拒绝率;在实际应用中,控制模块42根据公式3计算当前业务的实时通过率:
Figure PCTCN2020104645-appb-000004
其中,REALTIME_PASSRATE k为业务k实时通过率,SYS_LOAD为系统负荷,范围为0-100,THRESHOLD为控制门限,范围为0-100,HISTORY_PASSRATE k为业务k历史通过率;
或者,根据公式4计算当前业务的实时拒绝率:
REALTIME_REJECTRATE k=100-REALTIME_PASSRATE k
公式4;
其中,REALTIME_REJECTRATE k为业务k实时拒绝率。
控制模块42根据当前业务的实时通过率或者实时拒绝率确定是否允许执行当前业务。在实际应用中,控制模块42根据公式5计算用户拒绝率:
USER_REJECTRATE=HASH(USERID^USERWINSEQ) 公式5;
其中,USER_REJECTRATE为用户拒绝率,USERID为用户ID,USERWINSEQ为系统时间除以用户时间窗口大小所得到的值,用户时间窗口大小为预先配置的值;用户时间窗口不同于前面的滑动窗口,其单位为秒,大小可配置,默认情况为10秒;
判断用户拒绝率是否小于或等于业务k实时拒绝率,如果判断为是,则拒绝执行当前业务,否则,允许执行当前任务。
综上所述,借助于本发明实施的技术方案,能够对系统负荷进行平稳的控制,如图3所示,随着服务流的增加,系统负载一直处于预设门限之下,系统的计算资源和内存资源能够合理的使用,保证了系统的稳定运行。
装置实施例二
本发明实施例提供一种系统过负荷控制装置,如图5所示,包括:存储器50、处理器52及存储在所述存储器50上并可在所述处理器52上运行的计算机程序,所述计算机程序被所述处理器52执行时实现如下方法步骤:
步骤101,将当次业务数据计入当前滑窗;
步骤101具体包括如下处理:
步骤1011,获取系统接收业务请求消息的时间,并根据时间计算实时滑窗序号;在步骤1011中,根据时间计算实时滑窗序号具体包括:
根据公式1计算实时滑窗序号:
实时滑窗序号=T/W公式1;
其中,T为系统接收业务请求消息的时间,W为滑窗的大小,单位为秒。
滑窗即滑动窗口,图2是本发明实施例的滑窗工作原理的示意图,如图2所示,其窗口大小以时间为单位,本发明实施例将时间分为一串连续的窗口。滑动窗口以滑窗序号标识,其值为当前时间/窗口大小即公式1。所有的基础数据都根据时间统计到这些窗口中,包括请求消息数目、失败的消息数目、消息类别、消息权重等。
步骤1012,判断实时滑窗序号是否等于当前滑窗序号,如果判断为是,则将当次业务数据计入当前滑窗,如果判断为否,根据实时滑窗序号滑动滑窗,将当次业务数据计入当前滑窗。其中,在本发明实施例中,当次业务数据具体包括:请求消息数目、失败的消息数目、消息类别、消息权重、以及业务成功次数。
步骤102,判断在当前滑窗之前是否存在历史统计窗口,如果判断为否,则允许执行当前业务,在当前滑窗中更新当次业务数据;如果判断为是,则累计历史统计窗口的历史数据,基于历史数据确定是否允许执行当前业务,并根据处理结果在当前滑窗中更新当次业务数据。其中,历史统计窗口为当前滑窗之前与当前滑窗最近的N个滑窗,其中,N为正整数。
也就是说,连续的N个滑动窗口构成一个历史统计窗口。当前最近的N个滑动窗口构成最近历史统计窗口,根据该统计窗口的各个滑动窗口的数据,计算出历史通过率。
步骤102具体包括:
步骤1021,基于历史数据计算各个业务的业务历史通过率;步骤1021具体包括:根据公式2计算各个业务的业务历史通过率:
Figure PCTCN2020104645-appb-000005
其中,HISTORY_PASSRATE k为业务k的历史通过率,ACCEPT_TPS k为业务k接受的业务数目,其中,不包含因过负荷控制拒绝的次数,WEIGHT k为业务k的权重,ALL_TPS n为业务n所有的业务数目,含因过负荷控制拒绝的次数,WEIGHT n为业务n的权重,m为业务总类别数目。
步骤1022,根据业务历史通过率计算当前业务的实时通过率或者实时拒绝率;步骤1022具体包括:
根据公式3计算当前业务的实时通过率:
Figure PCTCN2020104645-appb-000006
其中,REALTIME_PASSRATE k为业务k实时通过率,SYS_LOAD为系统负荷,范围为0-100,THRESHOLD为控制门限,范围为0-100,HISTORY_PASSRATE k为业务k历史通过率;
或者,根据公式4计算当前业务的实时拒绝率:
REALTIME_REJECTRATE k=100-REALTIME_PASSRATE k
公式4;
其中,REALTIME_REJECTRATE k为业务k实时拒绝率。
步骤1023,根据当前业务的实时通过率或者实时拒绝率确定是否允许执行当前业务。步骤1022具体包括:
根据公式5计算用户拒绝率:
USER_REJECTRATE=HASH(USERID^WINSEQ)公式5;
其中,USER_REJECTRATE为用户拒绝率,USERID为用户ID,WINSEQ为实时滑窗序号;
判断用户拒绝率是否小于或等于系统拒绝率,如果判断为是,则拒绝 执行当前业务,否则,允许执行当前任务。
装置实施例三
本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质上存储有信息传输的实现程序,所述程序被处理器52执行时实现如下方法步骤:
步骤101,将当次业务数据计入当前滑窗;
步骤101具体包括如下处理:
步骤1011,获取系统接收业务请求消息的时间,并根据时间计算实时滑窗序号;在步骤1011中,根据时间计算实时滑窗序号具体包括:
根据公式1计算实时滑窗序号:
实时滑窗序号=T/W公式1;
其中,T为系统接收业务请求消息的时间,W为滑窗的大小,单位为秒。
滑窗即滑动窗口,图2是本发明实施例的滑窗工作原理的示意图,如图2所示,其窗口大小以时间为单位,本发明实施例将时间分为一串连续的窗口。滑动窗口以滑窗序号标识,其值为当前时间/窗口大小即公式1。所有的基础数据都根据时间统计到这些窗口中,包括请求消息数目、失败的消息数目、消息类别、消息权重等。
步骤1012,判断实时滑窗序号是否等于当前滑窗序号,如果判断为是,则将当次业务数据计入当前滑窗,如果判断为否,根据实时滑窗序号滑动滑窗,将当次业务数据计入当前滑窗。其中,在本发明实施例中,当次业务数据具体包括:请求消息数目、失败的消息数目、消息类别、消息权重、以及业务成功次数。
步骤102,判断在当前滑窗之前是否存在历史统计窗口,如果判断为否,则允许执行当前业务,在当前滑窗中更新当次业务数据;如果判断为是,则累计历史统计窗口的历史数据,基于历史数据确定是否允许执行当前业务,并根据处理结果在当前滑窗中更新当次业务数据。其中,历史统计窗口为当前滑窗之前与当前滑窗最近的N个滑窗,其中,N为正整数。
也就是说,连续的N个滑动窗口构成一个历史统计窗口。当前最近的N个滑动窗口构成最近历史统计窗口,根据该统计窗口的各个滑动窗口的数据,计算出历史通过率。
步骤102具体包括:
步骤1021,基于历史数据计算各个业务的业务历史通过率;步骤1021具体包括:根据公式2计算各个业务的业务历史通过率:
Figure PCTCN2020104645-appb-000007
其中,HISTORY_PASSRATE k为业务k的历史通过率,ACCEPT_TPS k为业务k接受的业务数目,其中,不包含因过负荷控制拒绝的次数,WEIGHT k为业务k的权重,ALL_TPS n为业务n所有的业务数目,含因过负荷控制拒绝的次数,WEIGHT n为业务n的权重,m为业务总类别数目。
步骤1022,根据业务历史通过率计算当前业务的实时通过率或者实时拒绝率;步骤1022具体包括:
根据公式3计算当前业务的实时通过率:
Figure PCTCN2020104645-appb-000008
其中,REALTIME_PASSRATE k为业务k实时通过率,SYS_LOAD为 系统负荷,范围为0-100,THRESHOLD为控制门限,范围为0-100,HISTORY_PASSRATE k为业务k历史通过率;
或者,根据公式4计算当前业务的实时拒绝率:
REALTIME_REJECTRATE k=100-REALTIME_PASSRATE k
公式4;
其中,REALTIME_REJECTRATE k为业务k实时拒绝率。
步骤1023,根据当前业务的实时通过率或者实时拒绝率确定是否允许执行当前业务。步骤1022具体包括:
根据公式5计算用户拒绝率:
USER_REJECTRATE=HASH(USERID^WINSEQ)公式5;
其中,USER_REJECTRATE为用户拒绝率,USERID为用户ID,WINSEQ为实时滑窗序号;
判断用户拒绝率是否小于或等于系统拒绝率,如果判断为是,则拒绝执行当前业务,否则,允许执行当前任务。
本实施例所述计算机可读存储介质包括但不限于为:ROM、RAM、磁盘或光盘等。
综上所述,借助于本发明实施的技术方案,能够对系统负荷进行平稳的控制,如图3所示,随着服务流的增加,系统负载一直处于预设门限之下,系统的计算资源和内存资源能够合理的使用,保证了系统的稳定运行。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来 执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (12)

  1. 一种系统过负荷控制方法,包括:
    将当次业务数据计入当前滑窗;
    判断在当前滑窗之前是否存在历史统计窗口,如果判断为否,则允许执行当前业务,在当前滑窗中更新当次业务数据;如果判断为是,则累计所述历史统计窗口的历史数据,基于所述历史数据确定是否允许执行当前业务,并根据处理结果在当前滑窗中更新当次业务数据。
  2. 如权利要求1所述的方法,其中,将当次业务数据计入当前滑窗具体包括:
    获取系统接收业务请求消息的时间,并根据所述时间计算实时滑窗序号;
    判断所述实时滑窗序号是否等于当前滑窗序号,如果判断为是,则将当次业务数据计入当前滑窗,如果判断为否,根据实时滑窗序号滑动滑窗,将当次业务数据计入当前滑窗。
  3. 如权利要求2所述的方法,其中,根据所述时间计算实时滑窗序号具体包括:
    根据公式1计算实时滑窗序号:
    实时滑窗序号=T/W公式1;
    其中,T为系统接收业务请求消息的时间,W为滑窗的大小,单位为秒。
  4. 如权利要求1所述的方法,其中,所述当次业务数据具体包括:请求消息数目、失败的消息数目、消息类别、消息权重、以及业务成功次数。
  5. 如权利要求1所述的方法,其中,所述历史统计窗口为当前滑窗 之前与当前滑窗最近的N个滑窗,其中,N为正整数。
  6. 如权利要求1所述的方法,其中,所述基于所述历史数据确定是否允许执行当前业务,并根据处理结果在当前滑窗中更新当次业务数据具体包括:
    基于所述历史数据计算各个业务的业务历史通过率;
    根据所述业务历史通过率计算当前业务的实时通过率或者实时拒绝率;
    根据所述当前业务的实时通过率或者实时拒绝率确定是否允许执行当前业务。
  7. 如权利要求6所述的方法,其中,基于所述历史数据计算各个业务的业务历史通过率具体包括:
    根据公式2计算各个业务的业务历史通过率:
    Figure PCTCN2020104645-appb-100001
    其中,HISTORY_PASSRATE k为业务k的历史通过率,ACCEPT_TPS k为业务k接受的业务数目,其中,不包含因过负荷控制拒绝的次数,WEIGHT k为业务k的权重,ALL_TPS n为业务n所有的业务数目,含因过负荷控制拒绝的次数,WEIGHT n为业务n的权重,m为业务总类别数目。
  8. 如权利要求6所述的方法,其中,根据所述业务历史通过率计算当前业务的实时通过率或者实时拒绝率具体包括:
    根据公式3计算当前业务的实时通过率:
    Figure PCTCN2020104645-appb-100002
    其中,REALTIME_PASSRATE k为业务k实时通过率,SYS_LOAD为系统负荷,范围为0-100,THRESHOLD为控制门限,范围为0-100,HISTORY_PASSRATE k为业务k历史通过率;
    或者,根据公式4计算当前业务的实时拒绝率:
    REALTIME_REJECTRATE k=100-REALTIME_PASSRATE k
    公式4;
    其中,REALTIME_REJECTRATE k为业务k实时拒绝率。
  9. 如权利要求8所述的方法,其中,根据所述当前业务的实时通过率或者实时拒绝率确定是否允许执行当前业务具体包括:
    根据公式5计算用户拒绝率:
    USER_REJECTRATE=HASH(USERID^USERWINSEQ)公式5;
    其中,USER_REJECTRATE为用户拒绝率,USERID为用户ID,USERWINSEQ为系统时间除以用户时间窗口大小所得到的值,所述用户时间窗口大小为预先配置的值;
    判断用户拒绝率是否小于或等于业务k实时拒绝率,如果判断为是,则拒绝执行当前业务,否则,允许执行当前任务。
  10. 一种系统过负荷控制装置,包括:
    处理模块,设置为将当次业务数据计入当前滑窗;
    控制模块,设置为判断在当前滑窗之前是否存在历史统计窗口,如果判断为否,则允许执行当前业务,在当前滑窗中更新当次业务数据;如果判断为是,则累计所述历史统计窗口的历史数据,基于所述历史数据确定是否允许执行当前业务,并根据处理结果在当前滑窗中更新当次业务数据。
  11. 一种系统过负荷控制装置,包括:存储器、处理器及存储在所述 存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至9中任一项所述的系统过负荷控制方法的步骤。
  12. 一种计算机可读存储介质,所述计算机可读存储介质上存储有信息传递的实现程序,所述程序被处理器执行时实现如权利要求1至9中任一项所述的系统过负荷控制方法的步骤。
PCT/CN2020/104645 2019-07-31 2020-07-24 系统过负荷控制方法及装置 WO2021018058A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910704896.4A CN112308354A (zh) 2019-07-31 2019-07-31 系统过负荷控制方法及装置
CN201910704896.4 2019-07-31

Publications (1)

Publication Number Publication Date
WO2021018058A1 true WO2021018058A1 (zh) 2021-02-04

Family

ID=74229467

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/104645 WO2021018058A1 (zh) 2019-07-31 2020-07-24 系统过负荷控制方法及装置

Country Status (2)

Country Link
CN (1) CN112308354A (zh)
WO (1) WO2021018058A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114302311B (zh) * 2021-12-30 2024-05-03 深圳市中科蓝讯科技股份有限公司 音频设备的可用时长计算方法、芯片及音频设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917445A (zh) * 2010-08-27 2010-12-15 电子科技大学 软交换平台下号码段的拒绝服务攻击检测方法
CN103164663A (zh) * 2011-12-12 2013-06-19 深圳市腾讯计算机系统有限公司 一种基于滑动窗口的服务器过载保护方法及装置
US20160249220A1 (en) * 2010-11-04 2016-08-25 Silver Spring Networks, Inc. Physically secured authorization for utility applications
CN109257294A (zh) * 2018-09-07 2019-01-22 武汉斗鱼网络科技有限公司 基于redis的服务动态降级方法、装置、服务器及存储介质
CN111324886A (zh) * 2020-03-12 2020-06-23 杭州海康威视系统技术有限公司 业务请求的处理方法、装置和服务器

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1301626C (zh) * 2004-05-10 2007-02-21 中兴通讯股份有限公司 一种对移动交换中心进行系统负荷控制的方法
CN100561985C (zh) * 2007-09-27 2009-11-18 中兴通讯股份有限公司 一种基于业务优先级的流量控制方法及其系统
CN106909495B (zh) * 2016-06-03 2020-07-03 阿里巴巴集团控股有限公司 一种数据的窗口统计方法、装置及系统
CN109962855A (zh) * 2017-12-14 2019-07-02 深圳市融汇通金科技有限公司 一种web服务器的限流方法、限流装置及终端设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917445A (zh) * 2010-08-27 2010-12-15 电子科技大学 软交换平台下号码段的拒绝服务攻击检测方法
US20160249220A1 (en) * 2010-11-04 2016-08-25 Silver Spring Networks, Inc. Physically secured authorization for utility applications
CN103164663A (zh) * 2011-12-12 2013-06-19 深圳市腾讯计算机系统有限公司 一种基于滑动窗口的服务器过载保护方法及装置
CN109257294A (zh) * 2018-09-07 2019-01-22 武汉斗鱼网络科技有限公司 基于redis的服务动态降级方法、装置、服务器及存储介质
CN111324886A (zh) * 2020-03-12 2020-06-23 杭州海康威视系统技术有限公司 业务请求的处理方法、装置和服务器

Also Published As

Publication number Publication date
CN112308354A (zh) 2021-02-02

Similar Documents

Publication Publication Date Title
JP6457447B2 (ja) データセンターのネットワークトラフィックスケジューリング方法及び装置
US9948791B2 (en) Sharing group notification
CN110138756B (zh) 一种限流方法及系统
US9112809B2 (en) Method and apparatus for controlling utilization in a horizontally scaled software application
US9071540B2 (en) Proxy server, hierarchical network system, and distributed workload management method
US20030200369A1 (en) System and method for dynamically tuning interrupt coalescing parameters
KR101938455B1 (ko) 동적인 에지 컴퓨팅을 수행하는 방법 및 장치
WO2016172848A1 (zh) 一种调整云计算中虚拟资源的方法及装置
CN113923216B (zh) 一种分布式集群限流系统及方法和分布式集群节点
CN112600761B (zh) 一种资源分配的方法、装置及存储介质
CN111277640B (zh) 用户请求处理方法、装置、系统、计算机设备和存储介质
US9665409B2 (en) Methods and apparatus facilitating access to storage among multiple computers
WO2021018058A1 (zh) 系统过负荷控制方法及装置
US20180115498A1 (en) Systems and methods for adaptive credit-based flow
CN113032410A (zh) 数据处理方法、装置、电子设备及计算机存储介质
WO2024088079A1 (zh) 请求处理方法以及系统
CN110858844A (zh) 服务请求处理方法、控制方法、装置、系统及电子设备
CN116382892B (zh) 一种基于多云融合以及云服务的负载均衡方法及装置
CN111897659A (zh) 业务处理频率的控制方法、系统、装置、电子设备
US11902167B2 (en) Communication apparatus having delay guarantee shaping function
CN107786371A (zh) 一种数据的加速方法、装置及存储介质
CN115357363A (zh) 限流方法、装置、任务响应系统、电子设备及存储介质
CN108289326B (zh) 一种无人系统装备通信方法、系统、设备及计算机介质
CN114585024B (zh) 一种5g/b5g网络的切片接入控制方法
CN110968257A (zh) 存储管理的方法、设备和计算机程序产品

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: 20847235

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20847235

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20847235

Country of ref document: EP

Kind code of ref document: A1