TWI855948B - Monitoring and limiting system of requesting to access system resources and method thereof - Google Patents
Monitoring and limiting system of requesting to access system resources and method thereof Download PDFInfo
- Publication number
- TWI855948B TWI855948B TW112150913A TW112150913A TWI855948B TW I855948 B TWI855948 B TW I855948B TW 112150913 A TW112150913 A TW 112150913A TW 112150913 A TW112150913 A TW 112150913A TW I855948 B TWI855948 B TW I855948B
- Authority
- TW
- Taiwan
- Prior art keywords
- current limiting
- application program
- request
- data
- program interface
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
- H04L47/2475—Traffic characterised by specific attributes, e.g. priority or QoS for supporting traffic characterised by the type of applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
- H04L47/2425—Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
- H04L47/2433—Allocation of priorities to traffic types
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
本發明是有關於一種限流應用程式介面的請求數據,且特別是有關於一種監控限流系統及其方法。The present invention relates to a request data of a current limiting application program interface, and in particular to a monitoring current limiting system and method thereof.
用於提供(業務)服務的應用程式通常會提供有具體能力的應用程式介面(Application Programming Interface,API),以此對外提供功能服務。然而,通常為了實現某個業務行為,系統或使用者會調用特定的應用程式介面,來獲得期望的執行服務或輸出結果(業務數據)。然而,當一時間段中有大量的服務資源需求或是流量峰值時,將可能導致提供服務的伺服器或系統發生故障、回應/響應變慢或當機。在系統出現故障時,將導致整個服務系統無法工作,造成使用者體驗差。因此,傳統的連接應用程式介面的專案服務器具有無法處理大量請求數據,以及沒有根據時間段或運算資源進行限流或資源配置的問題。Applications used to provide (business) services usually provide application programming interfaces (APIs) with specific capabilities to provide functional services to the outside world. However, in order to implement a certain business behavior, the system or user will usually call a specific application programming interface to obtain the desired execution service or output result (business data). However, when there is a large demand for service resources or a traffic peak in a period of time, it may cause the server or system providing the service to fail, respond/respond slowly, or crash. When a system fails, the entire service system will not work, resulting in a poor user experience. Therefore, traditional project servers connected to application programming interfaces have the problem of being unable to handle large amounts of request data and not being able to limit traffic or configure resources based on time periods or computing resources.
本發明是針對一種監控限流系統及其方法,可根據請求數據的時間段以及所調用的應用程式介面的等級,以自動判斷是否進行部分請求數據的限流。The present invention is directed to a monitoring and current limiting system and method thereof, which can automatically determine whether to limit the current of part of the requested data according to the time period of the requested data and the level of the called application program interface.
根據本發明的實施例,本發明的監控限流系統包括儲存裝置以及處理器。儲存裝置儲存多個模組以及限流配置表。處理器耦接儲存裝置。處理器執行多個模組,並接收用於執行應用程式介面的請求數據。多個模組包括限流攔截模組、數據分析模組以及執行模組。限流攔截模組根據限流配置表判斷請求數據是否為限流請求,並且產生判斷結果。響應於判斷結果為限流請求,限流攔截模組拒絕請求數據的訪問,並且輸出預設訊息。響應於判斷結果為非限流請求,限流攔截模組將請求數據輸入至執行模組。執行模組執行請求數據。數據分析模組根據資源數據以及應用程式介面請求歷程調整限流配置表。According to an embodiment of the present invention, the monitoring and current limiting system of the present invention includes a storage device and a processor. The storage device stores multiple modules and a current limiting configuration table. The processor is coupled to the storage device. The processor executes multiple modules and receives request data for executing an application programming interface. The multiple modules include a current limiting interception module, a data analysis module, and an execution module. The current limiting interception module determines whether the request data is a current limiting request based on the current limiting configuration table, and generates a judgment result. In response to the judgment result being a current limiting request, the current limiting interception module rejects access to the request data and outputs a default message. In response to the judgment result being a non-current-limited request, the current-limiting interception module inputs the request data to the execution module. The execution module executes the request data. The data analysis module adjusts the current-limiting configuration table based on the resource data and the API request history.
根據本發明的實施例,本發明的監控限流方法包括以下步驟:接收用於執行應用程式介面的請求數據;通過限流攔截模組根據限流配置表判斷請求數據是否為限流請求,並且產生判斷結果;響應於判斷結果為限流請求,通過限流攔截模組拒絕請求數據的訪問,並且輸出預設訊息;響應於判斷結果為非限流請求,通過限流攔截模組將請求數據輸入至執行模組;通過執行模組執行請求數據;通過數據分析模組根據資源數據以及應用程式介面請求歷程調整限流配置表。According to an embodiment of the present invention, the monitoring and current limiting method of the present invention includes the following steps: receiving request data for executing an application program interface; judging whether the request data is a current limiting request according to a current limiting configuration table through a current limiting interception module, and generating a judgment result; in response to the judgment result being a current limiting request, refusing access to the request data through the current limiting interception module, and outputting a preset message; in response to the judgment result being a non-current limiting request, inputting the request data into an execution module through the current limiting interception module; executing the request data through the execution module; adjusting the current limiting configuration table according to resource data and the application program interface request history through a data analysis module.
基於上述,本發明的監控限流系統及其方法,可根據請求數據的時間段以及所調用的應用程式介面的等級,對不同的應用程式介面以及不同時間段的請求數據進行限流設定。Based on the above, the monitoring and current limiting system and method of the present invention can set current limits for different application program interfaces and request data in different time periods according to the time period of the request data and the level of the called application program interface.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above features and advantages of the present invention more clearly understood, embodiments are given below and described in detail with reference to the accompanying drawings.
現將詳細地參考本發明的示範性實施例,示範性實施例的實例說明於附圖中。只要有可能,相同元件符號在圖式和描述中用來表示相同或相似部分。Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and description to represent the same or similar parts.
圖1是本發明的一實施例的監控限流系統的示意圖。參考圖1,監控限流系統100包括處理器110以及儲存裝置120。處理器110耦接儲存裝置120。儲存裝置120儲存有限流攔截模組、數據分析模組以及執行模組。在本實施例中,監控限流系統100可例如是設置在雲端伺服器,以供用戶連線並執行同樣設置在雲端伺服器中的不同的應用程式介面(Application Programming Interface,API)的相關業務服務(Business service)功能。所述雲端伺服器可例如是軟體即服務(Software as a Service,SaaS)伺服器,並且所述應用程式介面對應於軟體即服務應用程式,但本發明並不限於此。或者,在一實施例中,監控限流系統100可設置在企業內部的地端伺服器所運行的企業資源規劃(Enterprise Resource Planning,ERP)系統中,以通過不同的應用程式介面提供相關業務服務功能(例如產生採購單、請購單、報價等諸如此類的業務服務),本案不應以此為限。FIG1 is a schematic diagram of a monitoring and current limiting system of an embodiment of the present invention. Referring to FIG1 , the monitoring and current limiting
在本實施例中,處理器110可為系統單晶片(System on a Chip,SOC),或可例如包括中央處理單元(Central Processing Unit,CPU)或是其他可程式化之一般用途或特殊用途的微處理器(Microprocessor)、數字信號處理器(Digital Signal Processor,DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits,ASIC)、可程式化邏輯裝置(Programmable Logic Device,PLD)、其他類似處理裝置或這些裝置的組合。儲存裝置120可包括儲存器(Memory)及/或資料庫(database),其中儲存器可例如是動態隨機存取儲存器(Dynamic Random Access Memory,DRAM)、快閃儲存器(Flash memory)或非揮發性隨機存取儲存器(Non-Volatile Random Access Memory,NVRAM)等。儲存裝置120可儲存有用於實現本發明各實施例的相關程式、模組、系統或演算法,以供處理器110存取並執行而實現本發明各實施例所描述的相關功能及操作。在本實施例中,限流攔截模組、數據分析模組、執行模組以及本案中的其他模組可例如是以JSON(JavaScript Object Notation)、可延伸標記式語言(Extensible Markup Language,XML)或YAML等諸如此類的程式語言來實現的,但本發明也不限於此。In the present embodiment, the
在本實施例中,使用者可例如通過個人電腦裝置執行監控限流系統100,並且將請求數據輸入至監控限流系統100,以請求執行對應的應用程式介面。在另一實施例中,監控限流系統100與專案服務系統被設置於同一個伺服器中,接著,使用者通過個人終端裝置輸入請求數據至伺服器中,以請求執行專案服務。監控限流系統100可根據請求數據來自動執行限流攔截模組、數據分析模組以及執行模組,以自動產生對應的限流判斷結果以及執行結果(業務數據)。In this embodiment, the user can, for example, execute the monitoring and current limiting
在本實施例中,限流攔截模組可根據儲存在儲存裝置120中的限流配置表判斷當前的請求數據是否為限流請求,並且產生判斷結果。當判斷結果為當前請求數據屬於限流請求,則限流攔截模組拒絕當前請求數據的訪問以及應用程式介面的調用,並且限流攔截模組同時輸出預設訊息至對應當前請求數據的終端裝置。另一方面,當判斷結果為非限流請求時,限流攔截模組將請求數據輸入至執行模組。接著,執行模組執行請求數據。值得注意的是,數據分析模組根據資源數據以及應用程式介面請求歷程調整限流配置表。In this embodiment, the current limiting interception module can determine whether the current request data is a current limiting request according to the current limiting configuration table stored in the
圖2是本發明的一實施例的監控限流方法的流程圖。參考圖1以及圖2,監控限流系統100可執行以下步驟S210~S260,以自動產生對應的判斷結果,根據請求數據的種類以及時間段執行對應的結果。在本實施例中,用戶可輸入請求數據至監控限流系統100,以欲執行(特定)應用程式介面。在步驟S210,處理器110可接收用於執行應用程式介面的請求數據。具體來說,使用者通過其終端裝置輸出使用專案系統(例如調用特定的應用程式介面)的請求數據至裝設有監控限流系統100的伺服器中。接著,伺服器將請求數據輸入至監控限流系統100中。FIG2 is a flow chart of a monitoring and current limiting method of an embodiment of the present invention. Referring to FIG1 and FIG2, the monitoring and current limiting
在步驟S220,處理器110可通過限流攔截模組根據限流配置表判斷請求數據是否為限流請求,並且產生判斷結果。在本實施例中,限流配置表包括限流時間段、限流時間段中每個應用程式介面等級、以及每個應用程式介面等級所對應的限流比率。如此設置,限流攔截模組比對當前的請求數據與限流配置表,進而判斷當前的請求數據是否屬於限流配置表中需要限制流量的請求(例如服務請求)。並且,限流攔截模組根據比對結果產生判斷結果。In step S220, the
在步驟S230,響應於判斷結果為限流請求,限流攔截模組拒絕請求數據的訪問。具體來說,當判斷結果為當前的請求數據屬於限流請求之時,限流攔截模組拒絕當前的請求數據,以達到運算資源的控制以及流量的限制。在步驟S240,通過限流攔截模組輸出預設訊息。在一實施例中,限流攔截模組輸出預設訊息至對應當前請求數據的終端裝置。換言之,限流攔截模組將預設訊息輸出至發出當前請求數據的終端裝置,進而告知使用者當前請求數據未能請求成功的原因。預設訊息可以是「當前服務請求過多,請稍後」或是「當前服務塞車中,請稍待」等內容。In step S230, in response to the judgment result being a current limiting request, the current limiting interception module denies access to the request data. Specifically, when the judgment result is that the current request data belongs to a current limiting request, the current limiting interception module denies the current request data to achieve control of computing resources and flow limitation. In step S240, a default message is output through the current limiting interception module. In one embodiment, the current limiting interception module outputs a default message to the terminal device corresponding to the current request data. In other words, the current limiting interception module outputs a default message to the terminal device that issued the current request data, and then informs the user of the reason why the current request data failed to be successfully requested. The default message may be "There are too many service requests at this time, please wait" or "There is a traffic jam at this time, please wait".
在步驟S250,響應於所述判斷結果為非限流請求,通過限流攔截模組將所述請求數據輸入至執行模組。具體來說,當判斷結果為當情的請求數據不屬於限流請求(即屬於非限流請求)之時,限流攔截模組將當前的請求數據輸入至執行模組中。接著,在步驟S260,通過執行模組執行當前的請求數據。舉例而言,執行模組執行請求數據是調用對應請求數據的應用程式介面,或是執行對應請求數據的服務運算。在一實施路中,執行模組可根據請求數據的結構來決定多個應用程式介面物件的調用方式,例如一次調用或多次調用。In step S250, in response to the judgment result being a non-current-limited request, the request data is input into the execution module through the current-limiting interception module. Specifically, when the judgment result is that the current request data does not belong to a current-limited request (i.e., it belongs to a non-current-limited request), the current-limiting interception module inputs the current request data into the execution module. Then, in step S260, the current request data is executed through the execution module. For example, the execution module executes the request data by calling the application programming interface corresponding to the request data, or executing the service operation corresponding to the request data. In one implementation, the execution module can determine the calling method of multiple application programming interface objects according to the structure of the request data, such as one call or multiple calls.
如此一來,本發明的監控限流系統100及其方法可根據限流配置表中的設定以及批註,自動地判斷請求數據是否需要限流,進而達到服務資源的管理以及限流監控。如此設置,監控限流系統100可以通過部分時間段以及部分比率限流的方式,有效地避免服務資源超載以及系統故障的狀況發生。In this way, the monitoring and current limiting
圖3是本發明的一實施例的多個模組的執行示意圖。參考圖3。在一實施例中,多個模組還包括數據採集模組340,並且儲存裝置為資料庫350。數據採集模組340根據預設時間定時地採集資源數據以及應用程式介面請求歷程,並且將資源數據以及應用程式介面請求歷程儲存至儲存裝置120或是資料庫350中。FIG3 is a schematic diagram of the execution of multiple modules of an embodiment of the present invention. Refer to FIG3. In one embodiment, the multiple modules further include a
在一實施例中,限流配置表包括應用程式介面等級、限流時間段、當前服務執行次數、多個應用程式介面等級的執行上限值、當前應用程式介面等級的執行次數、限流計算設定、可執行率、限流係數的至少其中之一。應用程式介面等級為不同的應用程式介面所被預設的等級,舉例而言,應用程式介面等級根據請求頻次和運算複雜度分成三個等級,分別是一級應用程式介面、二級應用程式介面以及三級應用程式介面。一級應用程式介面的運算複雜度大於三級應用程式介面的運算複雜度。In one embodiment, the current limiting configuration table includes at least one of the following: application program interface level, current limiting time period, current service execution times, execution upper limits of multiple application program interface levels, current application program interface level execution times, current current application program interface level, current limiting calculation settings, executable rate, and current limiting coefficient. The application program interface level is a preset level for different application program interfaces. For example, the application program interface level is divided into three levels according to request frequency and computational complexity, namely, a first-level application program interface, a second-level application program interface, and a third-level application program interface. The computational complexity of a first-level application program interface is greater than that of a third-level application program interface.
換言之,限流配置表中包括每一個應用程式介面所對應的等級(即應用程式介面等級)。限流時間段為多個服務時間段中備批註為需要進行限流的時間段。當前服務執行次數為當前總服務的請求次數。應用程式介面等級的執行上限值為限流階段中每個應用程式介面等級所可以執行的上限值,例如是一級應應用程式介面可執行100次,二級應用程式介面可執行50次。當前應用程式介面等級的執行次數為當前時間段每個應用程式介面等級已經執行的次數。限流計算設定為計算每個應用程式介面等級的執行上限值的設定或是公式。可執行率為每個應用程式介面等級所可以執行的比率,例如一級應應用程式介面的可執行率為90%,二級應用程式介面的可執行率為95%,三級應用程式介面的可執行率為98%。限流係數為限流計算設定中的係數。在一實施例中,限流係數為正整數。In other words, the current limiting configuration table includes the level (i.e., application interface level) corresponding to each application program interface. The current limiting time period is the time period in multiple service time periods that is annotated as requiring current limiting. The current service execution times are the current total service request times. The execution upper limit of the application program interface level is the upper limit of each application program interface level that can be executed in the current limiting stage. For example, the first-level application program interface can be executed 100 times, and the second-level application program interface can be executed 50 times. The current application program interface level execution times are the number of times each application program interface level has been executed in the current time period. The current limiting calculation setting is a setting or formula for calculating the execution upper limit value of each application program interface level. The executable rate is the ratio of each application program interface level that can be executed, for example, the executable rate of the first-level application program interface is 90%, the executable rate of the second-level application program interface is 95%, and the executable rate of the third-level application program interface is 98%. The current limiting coefficient is the coefficient in the current limiting calculation setting. In one embodiment, the current limiting coefficient is a positive integer.
在一實施例中,限流配置表包括應用程式介面等級,應用程式介面等級包括一級應用程式介面、二級應用程式介面以及三級應用程式介面,並且不同的應用程式介面等級具有不同的可執行率。舉例而言,一級應用程式介面的可執行率相關於指數為限流係數的值,二級應用程式介面的可執行率相關於限流係數與常數的積,三級應用程式介面的可執行率相關於限流係數。具體來說,一級應用程式介面的可執行率與指數為限流係數的值成反比。在一實施例中,一級應用程式介面的可執行率為1-1%*2 n,二級應用程式介面的可執行率1-1%*2n,三級應用程式介面的可執行率為1-1%*n,本案不應以此為限。在本實施例中,n為限流係數,並且n不大於5。 In one embodiment, the current limiting configuration table includes application program interface levels, and the application program interface levels include first-level application program interfaces, second-level application program interfaces, and third-level application program interfaces, and different application program interface levels have different executable rates. For example, the executable rate of the first-level application program interface is related to the value of the current limiting coefficient, the executable rate of the second-level application program interface is related to the product of the current limiting coefficient and a constant, and the executable rate of the third-level application program interface is related to the current limiting coefficient. Specifically, the executable rate of the first-level application program interface is inversely proportional to the value of the current limiting coefficient. In one embodiment, the executable rate of the first-level application programming interface is 1-1%*2 n , the executable rate of the second-level application programming interface is 1-1%*2n, and the executable rate of the third-level application programming interface is 1-1%*n. The present invention should not be limited to this. In this embodiment, n is the current limiting coefficient, and n is not greater than 5.
如圖3所示,監控限流系統100可執行以下步驟S311~S314以及步驟S351。使用者透過終端裝置360發出請求數據至監控限流系統300中。在步驟S311中,限流攔截模組310接收到請求數據後,限流攔截模組310判斷當前的請求數據是否需要限流(即是否為限流請求)。步驟S311的判斷可以更細分為步驟S312以及步驟S313。在步驟S312中,限流攔截模組310判斷請求數據是否在限流範圍中,例如是限流時間段內(例如早上9點到早上10點),或是對應特定的應用程式介面。當步驟S312的判斷結果為當前請求數據在限流範圍中,接著執行步驟S313。As shown in FIG3 , the monitoring and current limiting
在步驟S313中,限流攔截模組310判斷對應請求數據的當前限流閾值(例如當前應用程式介面等級的執行次數)是否已經達到限流閾值(例如對應的應用程式介面等級的執行上限值)。當步驟S312的判斷結果為當前請求數據所對應的應用程式介面等級的執行次數已達到上限值,則接著執行步驟S314。在步驟S314中,限流攔截模組310輸出友好訊息至使用者的終端裝置360。友好訊息為預設的系統訊息(即預設訊息)。當步驟S312以及步驟S313的判斷結果為否,則通過執行模組330執行當前的請求數據。In step S313, the current limiting
在一實施例中,限流攔截模組310根據限流配置表以及應用程式介面請求歷程判斷請求數據是否為限流請求。具體來說,通過限流配置表可以得知限流時間段、應用程式介面的等級以及限流閾值等訊息。通過應用程式介面請求歷程可以得知當前限流閾值或是當前應用程式介面等級的執行次數(例如,二級應用程式介面的當前執行次數為20次)。限流請求為請求數據匹配於監控時間段中的服務請求,並且監控時間段的當前應用程式介面等級的執行次數達到對應的所述應用程式介面等級的執行上限值。In one embodiment, the current limiting
圖4是本發明的一實施例的數據分析模組320調整限流配置表的流程圖。在一實施例中,限流配置表包括當前限流係數以及資源數據閾值。參考圖3以及圖4,監控限流系統300可執行以下步驟S410~S450。在步驟S410,數據分析模組320掃描儲存裝置/資料庫350中的資源數據。具體來說,數據分析模組320可被設置於非高峰流量的時間進行數據掃描,以避免佔用高峰值的運算資源。例如是每晚的晚上12點數據分析模組320進行資源數據的掃描。在步驟S420,數據分析模組320獲得資源數據中超出資源數據閾值的監控時間段。舉例而言,資源數據包括中央處理器(Central Processing Unit, CPU)的使用率以及記憶體使用率,並且資源數據閾值為CPU使用率達到75%以及記憶體使用率達到80%。在步驟S420中,數據分析模組320判斷儲存裝置/資料庫350中所儲存的請求數據歷程,進而逐一判斷每個時間段的資源數據是否有高於資源數據閾值,進而獲得至少一個資源數據超出閾值的監控時間段。FIG4 is a flow chart of the
在步驟S430,數據分析模組320判斷在步驟S420所獲得的監控時間段是否已經有設置限流係數。具體來說,限流計算設定中包括限流係數。因此,數據分析模組320判斷監控時間段是否設置有限流係數,就可以得出當前的監控時間段是否已被監控過。舉例而言,第一天的晚上7點到晚上9點的資源數據高於資源數據閾值,則數據分析模組320將晚上7點到晚上9點設置限流係數為1。接著,第二天的晚上7點到晚上9點的資源數據仍然高於資源數據閾值,則數據分析模組320判斷出晚上7點到晚上9點的時間段已經設置有限流係數。如此設置,響應於晚上7點到晚上9點的時間控已經有限流係數,數據分析模組320執行步驟S450。相反地,當數據分析模組320判斷當前的監控時間段未被設置限流係數,則執行步驟S440。In step S430, the
在步驟S440,響應於監控時間段沒有設置限流係數,數據分析模組320將監控時間段的限流係數設置為1。在步驟S450,響應於監控時間段有設置限流係數,數據分析模組320將監控時間段的限流係數加上1以作為新限流係數。舉例而言,第三天的晚上7點到晚上9點的當前限流係數為2,則數據分析模組320將3作為當前監控時間段的新限流係數。在本實施例中,限流係數具有係數閾值,係數閾值例如是5。當監控時間段的限流係數到達係數閾值時,數據分析模組320停止增加限流係數的值,而是數據分析模組320輸出監控時間段的訊息以及預設警示訊息。具體來說,當數據分析模組320執行步驟S430之時,判斷到監控時間段已經有設置限流係數,並且監控時間段的限流係數已經到達係數閾值。舉例而言,數據分析模組320將提醒訊息輸出至工作人員的終端裝置。在另一實施例中,數據分析模組320記錄這些時間段的訊息並且儲存於儲存裝置(例如資料庫350)中,以供系統人員的查閱。In step S440, in response to the monitoring time period not having a current limiting coefficient set, the
在一實施例中,數據分析模組320根據限流配置表以獲得具有限流係數的係數時間段。數據分析模組320掃描資源數據,以獲得係數時間段中資源數據(例如CPU使用率以及記憶體使用率)低於資源數據閾值的待調整時間段。接著,數據分析模組320將待調整時間段的限流係數減去1以作為新限流係數。當限流係數為0,則所述限流計算設定為0。也就是說,當限流係數為0,對應的時間段為非監控時間段。In one embodiment, the
在一實施例中,限流配置表包括自訂批註表。具體來說,自訂批註表包括應用程式介面的等級、應用程式介面的描述訊息以及應用程式介面的名稱的至少其中之一。舉例而言,監控限流系統300可根據自訂批註表獲得相關於應用程式介面的批註以及訊息,例如應用程式介面的等級。In one embodiment, the current limiting configuration table includes a custom annotation table. Specifically, the custom annotation table includes at least one of the level of the application program interface, the description information of the application program interface, and the name of the application program interface. For example, the monitoring current limiting
在一實施例中,多個模組還包括非同步攔截模組。非同步攔截模組用以攔截請求數據,進而將請求數據的訊息儲存至儲存裝置/資料庫350中。非同步攔截模組通過非同步的方式將相關於請求數據的應用程式介面、應用程式介面的執行次數、時間段、應用程式介面名稱、應用程式介面的訪問方式、應用程式介面的訪問位址以及/或是應用程式介面的輸入數據結構儲存至請求日誌表中。值得說明的是,非同步攔截模組通過非同步的方式擷取以及儲存有關於請求數據的訊息,是為了不影響專案系統地執行以及不影響業務流程,進而避免影響專案服務的資源數據以及運算效率。在本實施例中,限流係數的最大值為5,並且儲存裝置120儲存請求日誌表。In one embodiment, the plurality of modules further include an asynchronous interception module. The asynchronous interception module is used to intercept request data and store the information of the request data in the storage device/
綜上所述,本發明的監控限流系統(100、300)及其方法可根據執行時間段以及限流計算設定,判斷當前的請求數據的時間段以及應用程式介面等級,進而根據執行的複雜度以及執行時間段進行特定的限流控制。並且,監控限流系統(100、300)根據請求數據歷程得知每一時間段的資源數據,進而根據資源數據的歷程進行限流係數的遞增或遞減,以達到逐步資源數據的控制(即限流),以有效地逐步管理以及控制每個時間段以及每個應用程式介面等級的限流比率。In summary, the monitoring and current limiting system (100, 300) and method of the present invention can determine the time period and application program interface level of the current request data according to the execution time period and the current limiting calculation setting, and then perform specific current limiting control according to the complexity of the execution and the execution time period. In addition, the monitoring and current limiting system (100, 300) obtains the resource data of each time period according to the request data history, and then increases or decreases the current limiting coefficient according to the resource data history to achieve step-by-step resource data control (i.e., current limiting), so as to effectively and step-by-step manage and control the current limiting ratio of each time period and each application program interface level.
最後應說明的是:以上各實施例僅用以說明本發明的技術方案,而非對其限制;儘管參照前述各實施例對本發明進行了詳細的說明,本領域的普通技術人員應當理解:其依然可以對前述各實施例所記載的技術方案進行修改,或者對其中部分或者全部技術特徵進行等同替換;而這些修改或者替換,並不使相應技術方案的本質脫離本發明各實施例技術方案的範圍。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technical personnel in this field should understand that they can still modify the technical solutions described in the above embodiments, or replace part or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
100:監控限流系統100: Monitoring current limiting system
110:處理器110:Processor
120:儲存裝置120: Storage device
101:數據關係求取和解析模組101: Data relationship acquisition and analysis module
102:請求數據分析單元102: Request data analysis unit
300:監控限流系統300: Monitoring current limiting system
310:限流攔截模組310: Current limiting module
320:數據分析模組320:Data Analysis Module
330:執行模組330: Execution module
340:數據採集模組340:Data Collection Module
350:資料庫350: Database
360:終端裝置360: Terminal Device
S210~S260、S311~S314、S351、S410~S450:步驟S210~S260, S311~S314, S351, S410~S450: Steps
圖1是本發明的一實施例的監控限流系統的示意圖。 圖2是本發明的一實施例的監控限流方法的流程圖。 圖3是本發明的一實施例的多個模組的執行示意圖。 圖4是本發明的一實施例的數據分析模組調整限流配置表的流程圖。 FIG1 is a schematic diagram of a monitoring current limiting system of an embodiment of the present invention. FIG2 is a flow chart of a monitoring current limiting method of an embodiment of the present invention. FIG3 is a schematic diagram of the execution of multiple modules of an embodiment of the present invention. FIG4 is a flow chart of a data analysis module adjusting a current limiting configuration table of an embodiment of the present invention.
S210~S260:步驟 S210~S260: Steps
Claims (18)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311459247.5A CN117459469A (en) | 2023-11-03 | 2023-11-03 | Monitoring current limiting systems and methods thereof |
| CN2023114592475 | 2023-11-03 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TWI855948B true TWI855948B (en) | 2024-09-11 |
| TW202520071A TW202520071A (en) | 2025-05-16 |
Family
ID=89590714
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW112150913A TWI855948B (en) | 2023-11-03 | 2023-12-27 | Monitoring and limiting system of requesting to access system resources and method thereof |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN117459469A (en) |
| TW (1) | TWI855948B (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160171071A1 (en) * | 2014-12-11 | 2016-06-16 | International Business Machines Corporation | Dynamic creation and configuration of partitioned index through analytics based on existing data population |
| TW201931142A (en) * | 2017-10-30 | 2019-08-01 | 韓商愛思開海力士有限公司 | Converged memory device and operation method thereof |
| CN113489702A (en) * | 2021-06-29 | 2021-10-08 | 网易(杭州)网络有限公司 | Interface current limiting method and device and electronic equipment |
-
2023
- 2023-11-03 CN CN202311459247.5A patent/CN117459469A/en active Pending
- 2023-12-27 TW TW112150913A patent/TWI855948B/en active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160171071A1 (en) * | 2014-12-11 | 2016-06-16 | International Business Machines Corporation | Dynamic creation and configuration of partitioned index through analytics based on existing data population |
| TW201931142A (en) * | 2017-10-30 | 2019-08-01 | 韓商愛思開海力士有限公司 | Converged memory device and operation method thereof |
| CN113489702A (en) * | 2021-06-29 | 2021-10-08 | 网易(杭州)网络有限公司 | Interface current limiting method and device and electronic equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202520071A (en) | 2025-05-16 |
| CN117459469A (en) | 2024-01-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110489447B (en) | Data query method and device, computer equipment and storage medium | |
| CN111367693B (en) | Method, system, device and medium for scheduling plug-in tasks based on message queue | |
| CN113285883A (en) | Access request current limiting method and device, electronic equipment and storage medium | |
| WO2019169724A1 (en) | Server concurrency control method and device, computer device, and storage medium | |
| WO2021159638A1 (en) | Method, apparatus and device for scheduling cluster queue resources, and storage medium | |
| JP2023089891A (en) | Cluster capacity expansion method and device | |
| CN115766876B (en) | Resource scheduling method, device, equipment and storage medium | |
| CN114143327B (en) | Cluster resource quota allocation method and device and electronic equipment | |
| CN111913784B (en) | Task scheduling method and device, network element and storage medium | |
| CN113419863B (en) | A data distribution and processing method and device based on node capability | |
| CN114745278A (en) | Method and device for expanding and contracting capacity of business system, electronic equipment and storage medium | |
| WO2023093194A1 (en) | Cloud monitoring method and cloud management platform | |
| CN106933673B (en) | Method and device for adjusting number of logical threads of component | |
| CN118331751A (en) | Computing resource allocation method, computer program, device and medium | |
| CN105404554B (en) | Method and device for Storm streaming computing framework | |
| TWI855948B (en) | Monitoring and limiting system of requesting to access system resources and method thereof | |
| CN116248473A (en) | Information processing method, device and computer readable storage medium | |
| CN111555918B (en) | Return source optimization method and device and electronic equipment | |
| WO2020000724A1 (en) | Method, electronic device and medium for processing communication load between hosts of cloud platform | |
| CN118626252A (en) | Data operation request processing method, device, equipment and storage medium | |
| CN119025514A (en) | Data quality detection method, device, equipment and storage medium | |
| CN111782364A (en) | Service invocation method, device, electronic device and storage medium | |
| CN117435302A (en) | Container capacity adjustment method, device, electronic equipment and storage medium | |
| CN114124757B (en) | Parameter adjustment method, device, related equipment and storage medium | |
| TWI735520B (en) | Method and device for adjusting the number of component logic threads |