[go: up one dir, main page]

TWI671708B - Flow rate control method and device - Google Patents

Flow rate control method and device Download PDF

Info

Publication number
TWI671708B
TWI671708B TW106126176A TW106126176A TWI671708B TW I671708 B TWI671708 B TW I671708B TW 106126176 A TW106126176 A TW 106126176A TW 106126176 A TW106126176 A TW 106126176A TW I671708 B TWI671708 B TW I671708B
Authority
TW
Taiwan
Prior art keywords
transaction
transaction dimension
dimension
node
controlled
Prior art date
Application number
TW106126176A
Other languages
Chinese (zh)
Other versions
TW201805889A (en
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 TW201805889A publication Critical patent/TW201805889A/en
Application granted granted Critical
Publication of TWI671708B publication Critical patent/TWI671708B/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本發明公開了一種流速控制方法及裝置。其包含確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取待控制節點的各個交易維度在當前時刻所佔用的資源個數,以確保系統的可用性,且有效避免了在資源不緊張時進行無效的流速控制;針對各個交易維度中的第一交易維度,若確定第一交易維度在當前時刻所佔用的資源個數大於其當前閾值,則將接收到的第一交易維度的交易進行快速失敗處理,從而實現了對可能發生故障的管道進行平滑過渡的控制,其中第一交易維度的當前閾值是根據其歷史閾值得到的,從而保證了閾值的動態更新,更加符合實際交易的特點。 The invention discloses a method and a device for controlling flow velocity. It includes determining that the resource occupancy of the node to be controlled is greater than a preset occupancy threshold, and obtaining the number of resources occupied by each transaction dimension of the node to be controlled at the current moment to ensure the availability of the system, and effectively avoids resource constraints. Invalid flow rate control at the time; for the first transaction dimension of each transaction dimension, if it is determined that the number of resources occupied by the first transaction dimension at the current moment is greater than its current threshold, the received transaction of the first transaction dimension is performed Fast failure handling, so as to achieve smooth transition control of the pipeline that may fail, in which the current threshold of the first transaction dimension is obtained based on its historical threshold, thereby ensuring the dynamic update of the threshold and more in line with the characteristics of actual transactions.

Description

一種流速控制方法及裝置 Method and device for controlling flow velocity

本發明屬於通信技術領域,尤其是關於一種流速控制方法及裝置。 The invention belongs to the field of communication technology, and in particular, relates to a method and a device for controlling flow velocity.

在閘道以及分散式互聯網交易系統中,通常需要進行流速控制。現有技術在進行流速控制時,為保證內部系統不至於承受來自外部的太大壓力,通常將佔用資源過多的節點作為故障節點,並對故障節點進行隔離。 In gateways and decentralized Internet trading systems, flow rate control is often required. In the prior art, when performing flow rate control, in order to ensure that the internal system does not endure too much pressure from the outside, a node that occupies too many resources is usually used as a fault node, and the fault node is isolated.

然而,被隔離的故障節點在滿足何種條件進行恢復是比較難以處理的問題,而且其恢復交易往往會導致系統出現較大的波動。因此,目前亟需一種更為有效的流速控制方法,用於解決現有技術中對故障節點進行隔離,從而使得後續難以恢復的技術問題。 However, it is difficult to deal with the conditions under which the isolated fault node meets the recovery, and its recovery transactions often cause large fluctuations in the system. Therefore, there is an urgent need for a more effective flow rate control method for solving the technical problem of isolating a faulty node in the prior art, which makes subsequent recovery difficult.

本發明實施例提供一種流速控制方法及裝置,用於解決現有技術中對故障節點進行隔離,從而使得後續難以恢復的技術問題。 Embodiments of the present invention provide a method and a device for controlling a flow rate, which are used to solve a technical problem of isolating a faulty node in the prior art, thereby making subsequent recovery difficult.

本發明實施例提供的一種流速控制方法,包括:確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數; 針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;該第一交易維度為該各個交易維度中的任一交易維度。 A flow rate control method provided by an embodiment of the present invention includes: after determining that a resource occupancy rate of a node to be controlled is greater than a preset occupancy threshold, obtaining the number of resources occupied by each transaction dimension of the node to be controlled at the current moment; For the first transaction dimension of each transaction dimension, if it is determined that the number of resources occupied by the first transaction dimension at the current moment is greater than the current threshold of the first transaction dimension, the transaction of the first transaction dimension will be received Fast failure processing is performed; the current threshold of the first transaction dimension is obtained according to the historical threshold of the first transaction dimension; the first transaction dimension is any one of the transaction dimensions of the respective transaction dimensions.

較佳地,若確定該第一交易維度在當前時刻所佔用的資源個數小於等於該第一交易維度的當前閾值,則對接收到的該第一交易維度的交易進行處理。 Preferably, if it is determined that the number of resources occupied by the first transaction dimension at the current time is less than or equal to the current threshold of the first transaction dimension, the received transaction of the first transaction dimension is processed.

較佳地,該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的,包括:通過以下公式確定該第一交易維度的當前閾值:F t =αX t +(1-α)F t-1 Preferably, the current threshold value of the first transaction dimension is obtained according to the historical threshold value of the first transaction dimension and includes: determining the current threshold value of the first transaction dimension by the following formula: F t = αX t + (1- α ) F t -1

其中,F t 為該第一交易維度的當前閾值,F t-1為該第一交易維度在當前時刻的前一時刻的歷史閾值,X t 為該第一交易維度當前佔用的資源個數,α為第一交易維度的權重值。 Among them, F t is the current threshold value of the first transaction dimension, F t -1 is the historical threshold value of the first transaction dimension at a moment before the current time, and X t is the number of resources currently occupied by the first transaction dimension. α is the weight value of the first transaction dimension.

較佳地,該待控制節點的各個交易維度是通過如下方式得到的:獲取該待控制節點對應的各個訊息(message);根據該各個訊息中包含的服務元素(service element),將該各個訊息中均包含的服務元素確定為目標服務元素;將各個該目標服務元素中所包含的類型進行組合,得到該待控制節點的各個交易維度。 Preferably, each transaction dimension of the node to be controlled is obtained by: acquiring each message corresponding to the node to be controlled; and according to the service element included in the each message, The service elements contained in each are determined as the target service elements; the types contained in each target service element are combined to obtain each transaction dimension of the node to be controlled.

本發明實施例提供一種流速控制裝置,該裝置包括:獲取模組,用於確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數;處理模組,用於針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;該第一交易維度為該各個交易維度中的任一交易維度。 An embodiment of the present invention provides a flow rate control device. The device includes: an acquisition module for determining that a resource occupancy rate of a node to be controlled is greater than a preset occupancy threshold value, and acquiring each transaction dimension of the node to be controlled at the current moment. Number of resources; a processing module for the first transaction dimension of each transaction dimension, if it is determined that the number of resources occupied by the first transaction dimension at the current moment is greater than the current threshold of the first transaction dimension, Fast fail processing of the received transaction of the first transaction dimension; the current threshold value of the first transaction dimension is obtained according to the historical threshold value of the first transaction dimension; the first transaction dimension is any of the respective transaction dimensions A transaction dimension.

較佳地,該處理模組還用於:若確定該第一交易維度在當前時刻所佔用的資源個數小於等於該第一交易維度的當前閾值,則對接收到的該第一交易維度的交易進行處理。 Preferably, the processing module is further configured to: if it is determined that the number of resources occupied by the first transaction dimension at the current time is less than or equal to the current threshold value of the first transaction dimension, The transaction is processed.

較佳地,該處理模組具體用於:通過以下公式確定該第一交易維度的當前閾值:F t =αX t +(1-α)F t-1 Preferably, the processing module is specifically configured to determine the current threshold value of the first transaction dimension by the following formula: F t = αX t + (1- α ) F t -1

其中,F t 為該第一交易維度的當前閾值,F t-1為該第一交易維度在當前時刻的前一時刻的歷史閾值,X t 為該第一交易維度當前佔用的資源個數,α為第一交易維度的權重值。 Among them, F t is the current threshold value of the first transaction dimension, F t -1 is the historical threshold value of the first transaction dimension at a moment before the current time, and X t is the number of resources currently occupied by the first transaction dimension. α is the weight value of the first transaction dimension.

較佳地,該處理模組還用於通過如下方式得到該待控制節點的各個交易維度:獲取該待控制節點對應的各個訊息;根據該各個訊息中包含的服務元素,將該各個訊息中均包含的服務元素確定為目標服務元素; 將各個該目標服務元素中所包含的類型進行組合,得到該待控制節點的各個交易維度。 Preferably, the processing module is further configured to obtain each transaction dimension of the node to be controlled by: obtaining each message corresponding to the node to be controlled; and according to the service elements contained in each message, all the messages are The included service element is determined as the target service element; The types included in each target service element are combined to obtain each transaction dimension of the node to be controlled.

本發明實施例提供一種流速控制裝置,該裝置包括:處理器和記憶體,該記憶體用於儲存軟體程式,該處理器用於讀取該記憶體中儲存的軟體程式執行:確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數;針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;該第一交易維度為該各個交易維度中的任一交易維度。 An embodiment of the present invention provides a flow rate control device. The device includes a processor and a memory. The memory is used to store a software program. The processor is used to read the software program stored in the memory to execute: determine a node to be controlled. After the resource occupancy rate is greater than a preset occupancy threshold, the number of resources occupied by each transaction dimension of the node to be controlled at the current moment is obtained. For the first transaction dimension of each transaction dimension, if it is determined that the first transaction dimension is If the number of resources occupied at the current moment is greater than the current threshold of the first transaction dimension, the transaction of the received first transaction dimension is quickly failed to be processed; the current threshold of the first transaction dimension is based on the first transaction dimension Obtained from the historical threshold; the first transaction dimension is any one of the transaction dimensions.

可選地,該處理器還用於:若確定該第一交易維度在當前時刻所佔用的資源個數小於等於該第一交易維度的當前閾值,則對接收到的該第一交易維度的交易進行處理。 Optionally, the processor is further configured to: if it is determined that the number of resources occupied by the first transaction dimension at the current moment is less than or equal to the current threshold value of the first transaction dimension, the received transaction of the first transaction dimension is For processing.

可選地,該處理器具體用於:通過以下公式確定該第一交易維度的當前閾值:F t =αX t +(1-α)F t-1 Optionally, the processor is specifically configured to determine the current threshold value of the first transaction dimension by the following formula: F t = αX t + (1- α ) F t -1

其中,F t 為該第一交易維度的當前閾值,F t-1為該第一交易維度在當前時刻的前一時刻的歷史閾值,X t 為該第一交易維度當前佔用的資源個數,α為第一交易維度的權重值。 Among them, F t is the current threshold value of the first transaction dimension, F t -1 is the historical threshold value of the first transaction dimension at a moment before the current time, and X t is the number of resources currently occupied by the first transaction dimension. α is the weight value of the first transaction dimension.

可選地,該處理器還用於通過如下方式得到該待控制節點的各個交易維度: 獲取該待控制節點對應的各個訊息;根據該各個訊息中包含的服務元素,將該各個訊息中均包含的服務元素確定為目標服務元素;將各個該目標服務元素中所包含的類型進行組合,得到該待控制節點的各個交易維度。 Optionally, the processor is further configured to obtain each transaction dimension of the node to be controlled in the following manner: Obtaining each message corresponding to the node to be controlled; determining the service elements included in each message as target service elements according to the service elements included in each message; and combining the types contained in each target service element, Obtain the various transaction dimensions of the node to be controlled.

本發明實施例中還提供一種電腦儲存介質,該儲存介質中儲存軟體程式,該軟體程式在被一個或多個處理器讀取並執行時可實現上述任意一種設計提供的流速控制方法。 An embodiment of the present invention also provides a computer storage medium. A software program is stored in the storage medium, and the software program, when read and executed by one or more processors, can implement the flow rate control method provided by any of the above designs.

本發明實施例還提供了一種包含指令的電腦程式產品,當其在電腦上運行時,使得電腦執行上述各方面所述的流速控制方法。 An embodiment of the present invention also provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the flow rate control method described in the above aspects.

本發明的上述實施例中,確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數;針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;本發明實施例中,一方面,通過將待控制節點的資源佔用率與預設佔用率閾值進行比較,並在資源佔用率大於預設佔用率閾值的情況下,執行後續的流速控制操作,不僅確保了系統的可用性,而且有效避免了在資源不緊張時進行無效的流速控制,節省處理資源;另一方面,針對各個交易維度中的任一交易維度,若佔用的資源個數大於閾值,則說明該交易維度的管道可能發生故障,此時可將接收到的該交易維度的交易進行快速失敗處理,從而實現在資源緊張 的情況下,對可能發生故障的管道進行平滑過渡的控制,而非完全隔離,通過犧牲一部分本來就無法成功的交易,來避免該交易維度的管道發生故障,以便於在該交易維度恢復正常後平緩地進行自動恢復;特別地,第一交易維度的當前閾值是根據第一交易維度的歷史閾值得到的,從而保證了閾值的動態更新,更加符合實際交易的特點。 In the foregoing embodiment of the present invention, after determining that the resource occupancy rate of the node to be controlled is greater than a preset occupancy threshold, the number of resources occupied by each transaction dimension of the node to be controlled at the current moment is obtained; For the first transaction dimension, if it is determined that the number of resources occupied by the first transaction dimension at the current moment is greater than the current threshold value of the first transaction dimension, the received transaction of the first transaction dimension is quickly failed; The current threshold of a transaction dimension is obtained according to the historical threshold of the first transaction dimension. In an embodiment of the present invention, on the one hand, by comparing the resource occupancy rate of a node to be controlled with a preset occupancy rate threshold, When the rate is greater than the preset occupancy threshold, performing subsequent flow rate control operations not only ensures the availability of the system, but also effectively avoids invalid flow rate control when resources are not tight and saves processing resources; on the other hand, for each Any transaction dimension in the transaction dimension, if the number of resources occupied is greater than the threshold, it indicates that the transaction dimension The pipeline may fail, this time received the transaction dimension fast transaction processing failure, thereby achieving resource constraints In the case of smooth transition control of the pipeline that may fail, rather than complete isolation, by sacrificing a part of the transaction that could not be successful, the failure of the pipeline of the transaction dimension is avoided, so that after the transaction dimension returns to normal, Automatic recovery is performed gently; in particular, the current threshold value of the first transaction dimension is obtained based on the historical threshold value of the first transaction dimension, thereby ensuring that the threshold is dynamically updated and more in line with the characteristics of actual transactions.

101-102‧‧‧步驟 101-102‧‧‧step

201‧‧‧獲取模組 201‧‧‧Get Module

202‧‧‧處理模組 202‧‧‧Processing Module

300‧‧‧流速控制裝置 300‧‧‧ Flow control device

301‧‧‧記憶體 301‧‧‧Memory

302‧‧‧處理器 302‧‧‧Processor

為了更清楚地說明本發明實施例中的技術方案,下面將對實施例描述中所需要使用的附圖作簡要介紹,顯而易見地,下面描述中的附圖僅僅是本發明的一些實施例,對於本領域的普通技術人員來講,在不付出創造性勞動的前提下,還可以根據這些附圖獲得其他的附圖。 In order to explain the technical solutions in the embodiments of the present invention more clearly, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. Those of ordinary skill in the art can also obtain other drawings according to these drawings without paying creative labor.

圖1為本發明實施例提供的一種流速控制方法所對應的流程示意圖。 FIG. 1 is a schematic flowchart of a flow velocity control method according to an embodiment of the present invention.

圖2為本發明實施例提供的一種流速控制裝置的結構示意圖。 FIG. 2 is a schematic structural diagram of a flow rate control device according to an embodiment of the present invention.

圖3為本發明實施例提供的另一種流速控制裝置的結構示意圖。 FIG. 3 is a schematic structural diagram of another flow rate control device according to an embodiment of the present invention.

為了使本發明的目的、技術方案和優點更加清楚,下面將結合附圖對本發明作進一步地詳細描述,顯然,所描述的實施例僅僅是本發明一部分實施例,而不是全部的實施例。基於本發明中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其它實施例,都屬於本發明保護的範圍。 In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本發明實施例中的流速控制方法可適用於多種架構中,尤其適用於TSM平台雲端遷移架構。TSM平台分為接入層、應用層、服務層, 針對該系統架構的特點,本發明實施例中的流速控制方法可應用在接入層與應用層。具體來說,由於TSM系統需要和許多外部機構進行資訊交流,若存在某些外部機構處理緩慢,則在此情況下需要採用流速控制方法,以防止部分機構突發的故障擠佔其他機構的交易處理資源,確保內部應用系統的穩定性。 The flow velocity control method in the embodiment of the present invention can be applied to various architectures, and is particularly applicable to the cloud migration architecture of the TSM platform. TSM platform is divided into access layer, application layer and service layer. According to the characteristics of the system architecture, the flow rate control method in the embodiment of the present invention can be applied to the access layer and the application layer. Specifically, because the TSM system needs to exchange information with many external institutions, if there are some external institutions that are slow to process, then in this case, a flow rate control method needs to be adopted to prevent sudden failures of some institutions from crowding out the transaction processing of other institutions Resources to ensure the stability of internal application systems.

圖1為本發明實施例提供的一種流速控制方法所對應的流程示意圖。如圖1所示,該方法包括:步驟101,確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數;步驟102,針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;該第一交易維度為該各個交易維度中的任一交易維度。 FIG. 1 is a schematic flowchart of a flow velocity control method according to an embodiment of the present invention. As shown in FIG. 1, the method includes: Step 101, after determining that the resource occupancy rate of a node to be controlled is greater than a preset occupancy threshold, obtaining the number of resources occupied by each transaction dimension of the node to be controlled at the current moment; step 102 For the first transaction dimension of each transaction dimension, if it is determined that the number of resources occupied by the first transaction dimension at the current moment is greater than the current threshold value of the first transaction dimension, the received The transaction undergoes rapid failure processing; the current threshold value of the first transaction dimension is obtained according to the historical threshold value of the first transaction dimension; the first transaction dimension is any one of the transaction dimensions of the respective transaction dimensions.

具體來說,本發明實施例中,在步驟101中,不同的節點可對應不同的預設佔用率閾值。以本發明實施例中的待控制節點為例,待控制節點的預設佔用率閾值可由本領域技術人員根據經驗設置,進一步地,可依據待控制節點後續所有應用節點的反應速度以及待控制節點的處理能力來確定預設佔用率閾值。 Specifically, in the embodiment of the present invention, in step 101, different nodes may correspond to different preset occupancy thresholds. Taking the to-be-controlled node in the embodiment of the present invention as an example, the preset occupancy threshold of the to-be-controlled node can be set by those skilled in the art based on experience, and further, it can be based on the response speed of all subsequent application nodes of the to-be-controlled node and the to-be-controlled node. Processing power to determine a preset occupancy threshold.

本發明實施例中,通過將待控制節點的資源佔用率與預設佔用率閾值進行比較,並在資源佔用率大於預設佔用率閾值的情況下,執行後續的流速控制操作,不僅確保了系統的可用性,而且有效避免了在資源 不緊張時進行無效的流速控制,節省了處理資源。 In the embodiment of the present invention, by comparing the resource occupancy of the node to be controlled with a preset occupancy threshold, and performing a subsequent flow rate control operation when the resource occupancy is greater than the preset occupancy threshold, not only the system is ensured Availability, and effectively avoid resources Ineffective flow rate control when not stressed, saving processing resources.

本發明實施例中,針對待控制節點,需要先定義待控制節點的各個交易維度,具體來說,待控制節點的各個交易維度是通過如下方式得到的:獲取該待控制節點對應的各個訊息;根據該各個訊息中包含的服務元素,將該各個訊息中均包含的服務元素確定為目標服務元素;將各個該目標服務元素中所包含的類型進行組合,得到該待控制節點的各個交易維度。 In the embodiment of the present invention, for the node to be controlled, it is necessary to first define each transaction dimension of the node to be controlled. Specifically, each transaction dimension of the node to be controlled is obtained by: obtaining each message corresponding to the node to be controlled; According to the service elements contained in each message, the service elements contained in each message are determined as the target service elements; the types contained in each of the target service elements are combined to obtain the various transaction dimensions of the node to be controlled.

舉個例子,假設確定出的待控制節點的目標服務元素為服務元素A和服務元素B,服務元素A中包含的類型個數為3個,分別為類型A1、類型A2、類型A3,服務元素B中包含的類型個數為2個,分別為類型B1、類型B2,則可得到待控制節點的交易維度為6個,分別為{A1,B1}、{A2,B1}、{A3,B1}、{A1,B2}、{A2,B2}、{A3,B2},如表1,示出了待控制節點的交易維度。 For example, suppose the target service elements of the node to be controlled are service element A and service element B. The number of types contained in service element A is three, which are type A1, type A2, type A3, and service element. The number of types contained in B is two, namely type B1 and type B2, and the transaction dimensions of the nodes to be controlled are six, namely {A1, B1}, {A2, B1}, {A3, B1 }, {A1, B2}, {A2, B2}, {A3, B2}, as shown in Table 1, show the transaction dimensions of the nodes to be controlled.

由上述內容可知,若待控制節點的目標服務元素為服務元素 A和服務元素B,服務元素A中包含的類型個數為M個,服務元素B中包含的類型個數為N個,則可得到待控制節點的交易維度為M*N個。 It can be known from the above that if the target service element of the node to be controlled is a service element A and service element B, the number of types contained in service element A is M, and the number of types contained in service element B is N, then the transaction dimension of the node to be controlled is M * N.

本發明實施例中,通過上述方式確定出待控制節點的各個交易維度後,可為每個交易維度設置一個基準值。其中,基準值可由本領域技術人員根據經驗設置,或者,也可以根據待控制節點的總資源個數以及交易維度的個數確定基準值。具體來說,若待控制節點的總資源個數為S個,交易維度的個數為k個,將S/k向下取整得到X,並將待控制節點的各個交易維度的基準值設置為X。 In the embodiment of the present invention, after each transaction dimension of the node to be controlled is determined in the foregoing manner, a reference value may be set for each transaction dimension. The reference value can be set by a person skilled in the art based on experience, or the reference value can also be determined according to the total number of nodes to be controlled and the number of transaction dimensions. Specifically, if the total number of resources of the node to be controlled is S and the number of transaction dimensions is k, S / k is rounded down to obtain X, and the reference value of each transaction dimension of the node to be controlled is set. Is X.

本發明實施例中,若各個服務維度的權重值分別為α 1、α 2、α 3、……、α k,則說明可為各個維度分配的資源個數分別為X* α 1、X* α 2、X* α 3、……、X* α k,也就是說,各個服務維度在初始時刻的閾值可以分別為X* α 1、X* α 2、X* α 3、……、X* α k。 In the embodiment of the present invention, if the weight values of each service dimension are α 1, α 2, α 3, ..., α k, then the number of resources that can be allocated for each dimension is X * α 1, X * α 2, X * α 3, ..., X * α k, that is, the thresholds of each service dimension at the initial moment can be X * α 1, X * α 2, X * α 3, ..., X * α k.

本發明實施例中,可將未分配的多餘資源作為動態分配資源,動態分配資源的特點是先不給任何特定的管道/服務分配,當某個管道/服務在獲取執行緒資源的時候沒有空閒執行緒,則可將動態資源配置給它。 In the embodiment of the present invention, unallocated excess resources can be used as dynamically allocated resources. The characteristic of dynamic allocation of resources is that no specific pipeline / service is allocated at first. When a pipeline / service obtains thread resources, it is not idle. Threads, you can allocate dynamic resources to it.

以各個服務維度中的第一交易維度為例,第一交易維度在不同時刻可對應有不同的閾值,第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的。需要說明的是,根據上述內容可知,若是在初始時刻,則第一交易維度的閾值可根據基準值和權重值得到,此時不存在歷史時刻,可假設歷史閾值為0。 Taking the first transaction dimension in each service dimension as an example, the first transaction dimension may correspond to different thresholds at different times, and the current threshold value of the first transaction dimension is obtained based on the historical threshold value of the first transaction dimension. It should be noted that according to the foregoing, if it is at the initial time, the threshold value of the first transaction dimension can be obtained according to the reference value and the weight value. At this time, there is no historical time, and it can be assumed that the historical threshold is 0.

具體地,可通過以下公式確定該第一交易維度的當前閾值:F t =αX t +(1-α)F t-1……公式(1) Specifically, the current threshold value of the first transaction dimension can be determined by the following formula: F t = αX t + (1- α ) F t -1 ...... Formula (1)

其中,F t 為該第一交易維度的當前閾值,F t-1為該第一交易維度在當前時刻的前一時刻的歷史閾值,X t 為該第一交易維度當前佔用的資源個數,α為第一交易維度的權重值。其中,第一交易維度當前佔用的資源個數可通過第一交易維度當前處理的交易量得到。 Among them, F t is the current threshold value of the first transaction dimension, F t -1 is the historical threshold value of the first transaction dimension at a moment before the current time, and X t is the number of resources currently occupied by the first transaction dimension. α is the weight value of the first transaction dimension. The number of resources currently occupied by the first transaction dimension can be obtained by the transaction volume currently processed by the first transaction dimension.

可選地,也可通過以下公式確定該第一交易維度的當前閾值:F t =αX t +α(1-α)X t-1+α(1-α)2 X t-2+…(1-α) t-1 X 1…公式(2) Optionally, the current threshold of the first transaction dimension can also be determined by the following formula: F t = αX t + α (1- α ) X t -1 + α (1- α ) 2 X t -2 + ... ( 1- α ) t -1 X 1 … Formula (2)

其中,F t 為該第一交易維度的當前閾值,X t 為該第一交易維度當前佔用的資源個數,為該第一交易維度在當前時刻的前一時刻的佔用的資源個數,為該第一交易維度在當前時刻的前兩個時刻的佔用的資源個數,X 1為該第一交易維度在初始時刻佔用的資源個數。 Among them, F t is the current threshold value of the first transaction dimension, X t is the number of resources currently occupied by the first transaction dimension, and is the number of resources occupied by the first transaction dimension at a moment before the current moment, as The number of resources occupied by the first transaction dimension in the first two moments of the current moment, and X 1 is the number of resources occupied by the first transaction dimension at the initial moment.

在步驟102中,若佔用的資源個數大於閾值,則說明第一交易維度的管道可能發生故障,此時可將接收到的第一交易維度的交易進行快速失敗處理,從而實現在資源緊張的情況下,對可能發生故障的管道進行平滑過渡的控制,而非完全隔離,通過犧牲一部分本來就無法成功的交易,來避免交易維度的管道發生故障。 In step 102, if the number of occupied resources is greater than the threshold value, it may indicate that the pipeline of the first transaction dimension may be faulty. At this time, the received transaction of the first transaction dimension may be quickly failed to process, thereby realizing resource-constrained Under circumstances, smooth transition control of pipelines that may fail, rather than complete isolation, is to avoid the failure of pipelines in the transaction dimension by sacrificing a part of the transaction that could not be successful.

進一步地,在後續時刻,若確定該第一交易維度在當前時刻所佔用的資源個數小於等於該第一交易維度的當前閾值,則說明第一交易維度已恢復正常,此時,可對接收到的第一交易維度的交易進行正常處理,而不再進行快速失敗處理,從而能夠平穩地恢復交易流量。 Further, at a subsequent time, if it is determined that the number of resources occupied by the first transaction dimension at the current time is less than or equal to the current threshold of the first transaction dimension, it means that the first transaction dimension has returned to normal. The transactions in the first transaction dimension are processed normally instead of fast failure processing, so that the transaction flow can be restored smoothly.

本發明實施例中,由於當前閾值是根據歷史閾值得到的,從而實現了閾值的不斷更新,更加符合實際交易的特點,比如某後端管道處理交易緩慢,那麼在資源不緊張的情況下,資源必定向其傾斜,保證其交 易能夠處理;但是資源緊張的時候,就不能因此而影響其他交易量大的管道,將此後端管道的交易進行有限度的控制,既保證有交易處理,又控制其交易量。這種處理方法比直接隔離此管道的交易更為溫和,且能夠動態的恢復其交易流量。 In the embodiment of the present invention, since the current threshold is obtained based on the historical threshold, the threshold is continuously updated, which is more in line with the characteristics of actual transactions. For example, a certain back-end pipeline processes transactions slowly. Be sure to orient it to ensure its intersection Easy to deal with; but when resources are tight, it ca n’t affect other pipelines with large transaction volume. Limiting the back-end pipeline's transactions to a limited extent will not only ensure transaction processing, but also control its transaction volume. This processing method is more gentle than directly isolating the transactions of this pipeline, and can dynamically restore its transaction flow.

本發明實施例中,可按照設定週期對各個交易維度進行監控,具體的監控資訊可包括每個交易的到達時間、處理時長、是否成功/超時/快速失敗、所屬的交易維度;目前正在處理的交易數量;各個交易維度目前使用的閾值。每個交易的到達時間與所屬的交易維度用來確定某個交易維度的交易量資料,正在處理的交易資料與閾值的比較用來判斷是否需要進行有限控制。其他資訊可以提供報警功能,便於人工查看各個管道處理能力,明確的性能資料,有便於與外部系統介面人進行溝通。通過上述羽量級的並行監控取樣,保證了性能資料的準確性和準時性,監控資訊取樣週期可以精確到秒級別。 In the embodiment of the present invention, each transaction dimension can be monitored according to a set period. The specific monitoring information may include the arrival time of each transaction, the processing time, success / timeout / quick failure, and the transaction dimension to which it belongs. Number of transactions processed; thresholds currently used for each transaction dimension. The arrival time and transaction dimension of each transaction are used to determine the transaction volume data of a certain transaction dimension. The comparison of the transaction data being processed with the threshold value is used to determine whether limited control is required. Other information can provide an alarm function, which is convenient to manually check the processing capabilities of each pipeline, clear performance data, and facilitate communication with external system interface personnel. Through the above-mentioned feather-weighted parallel monitoring sampling, the accuracy and punctuality of performance data is guaranteed, and the sampling period of monitoring information can be accurate to the second level.

上述流速控制方法與通用流控模組相比,提供了更細細微性的控制能力;與細細微性流控模型相比,無需複雜的配置參數,且更加符合實際。通過公式(1)或公式(2)中的自我調整的演算法能夠保證系統的適應能力,在交易分佈發生變化的情況下,不需要人工重新配置參數,減少了運營維護時間,降低了運營維護難度。且,通過設置閾值的更新速度,能夠保證秒級別的閾值更新能力,相比於人工配置閾值,本發明實施例更合理可信。 Compared with the general flow control module, the above flow rate control method provides more fine-grained control capabilities; compared with the fine-grained flow control model, no complicated configuration parameters are required, and it is more in line with reality. The self-adjusting algorithm in formula (1) or formula (2) can ensure the adaptability of the system. When the transaction distribution changes, there is no need to manually reconfigure the parameters, which reduces the operation and maintenance time and operation maintenance. Difficulty. In addition, by setting the threshold update speed, the threshold update capability at the second level can be guaranteed. Compared with manually configured thresholds, the embodiments of the present invention are more reasonable and credible.

針對上述方法流程,本發明實施例還提供一種流速控制裝置,該裝置的具體內容可以參照上述方法實施。 In view of the above method flow, an embodiment of the present invention further provides a flow rate control device, and the specific content of the device can be implemented by referring to the above method.

圖2為本發明實施例提供的一種流速控制裝置的結構示意圖。如圖2所示,該裝置包括:獲取模組201,用於確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數;處理模組202,用於針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;該第一交易維度為該各個交易維度中的任一交易維度。 FIG. 2 is a schematic structural diagram of a flow rate control device according to an embodiment of the present invention. As shown in FIG. 2, the device includes an acquisition module 201 for determining that the resource occupancy rate of the node to be controlled is greater than a preset occupancy threshold, and acquiring the resources occupied by each transaction dimension of the node to be controlled at the current moment. Processing module 202, for the first transaction dimension of each transaction dimension, if it is determined that the number of resources occupied by the first transaction dimension at the current moment is greater than the current threshold of the first transaction dimension, it will receive The transaction of the first transaction dimension is quickly failed; the current threshold of the first transaction dimension is obtained according to the historical threshold of the first transaction dimension; the first transaction dimension is any transaction in each of the transaction dimensions Dimensions.

較佳地,該處理模組還用於:若確定該第一交易維度在當前時刻所佔用的資源個數小於等於該第一交易維度的當前閾值,則對接收到的該第一交易維度的交易進行處理。 Preferably, the processing module is further configured to: if it is determined that the number of resources occupied by the first transaction dimension at the current time is less than or equal to the current threshold value of the first transaction dimension, The transaction is processed.

較佳地,該處理模組具體用於:通過以下公式確定該第一交易維度的當前閾值:F t =αX t +(1-α)F t-1 Preferably, the processing module is specifically configured to determine the current threshold value of the first transaction dimension by the following formula: F t = αX t + (1- α ) F t -1

其中,F t 為該第一交易維度的當前閾值,F t-1為該第一交易維度在當前時刻的前一時刻的歷史閾值,X t 為該第一交易維度當前佔用的資源個數,α為第一交易維度的權重值。 Among them, F t is the current threshold value of the first transaction dimension, F t -1 is the historical threshold value of the first transaction dimension at a moment before the current time, and X t is the number of resources currently occupied by the first transaction dimension. α is the weight value of the first transaction dimension.

較佳地,該處理模組還用於通過如下方式得到該待控制節點的各個交易維度:獲取該待控制節點對應的各個訊息;根據該各個訊息中包含的服務元素,將該各個訊息中均包含的服務元 素確定為目標服務元素;將各個該目標服務元素中所包含的類型進行組合,得到該待控制節點的各個交易維度。 Preferably, the processing module is further configured to obtain each transaction dimension of the node to be controlled by: obtaining each message corresponding to the node to be controlled; and according to the service elements contained in each message, all the messages are Included service elements Prime is determined as the target service element; the types contained in each target service element are combined to obtain each transaction dimension of the node to be controlled.

圖3為本發明實施例提供的另一種流速控制裝置的結構示意圖。如圖3所示,該流速控制裝置300包括:記憶體301和處理器302;記憶體301,用於儲存程式;具體地,程式可以包括程式碼,程式碼包括電腦操作指令。記憶體301可能為隨機存取記憶體(英文:random access memory,RAM),也可能為非揮發性記憶體(英文:non-volatile memory),例如至少一個磁碟記憶體。圖中僅示出了一個記憶體,當然,記憶體也可以根據需要,設置為多個。記憶體301也可以是處理器302中的記憶體。 FIG. 3 is a schematic structural diagram of another flow rate control device according to an embodiment of the present invention. As shown in FIG. 3, the flow rate control device 300 includes: a memory 301 and a processor 302; the memory 301 is used to store a program; specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory 301 may be a random access memory (English: random access memory, RAM), or may be a non-volatile memory (English: non-volatile memory), such as at least one magnetic disk memory. Only one memory is shown in the figure. Of course, the memory can also be set as many as needed. The memory 301 may also be a memory in the processor 302.

記憶體301儲存了如下的元素,可執行模組或者資料結構,或者它們的子集,或者它們的擴展集:操作指令:包括各種操作指令,用於實現各種操作。 The memory 301 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: operation instructions: including various operation instructions for implementing various operations.

作業系統:包括各種系統程式,用於實現各種基礎服務以及處理基於硬體的任務。 Operating system: Includes various system programs for implementing various basic services and processing hardware-based tasks.

處理器302還可以稱為中央處理單元(英文:Central Processing Unit,CPU)。上述本發明實施例揭示的方法可以應用於處理器302中,或者由處理器302實現。處理器302可能是一種積體電路晶片,具有信號的處理能力。在實現過程中,上述方法的各步驟可以通過處理器302中的硬體的積體邏輯電路或者軟體形式的指令完成。上述的處理器302可以是通用處理器、數位訊號處理器(DSP)、專用積體電路(ASIC)、現場可程式設計閘陣列(FPGA)或者其他可程式設計邏輯裝置、離散閘或者電晶體邏 輯裝置、離散硬體元件。可以實現或者執行本發明實施例中的公開的各方法、步驟及邏輯方塊圖。通用處理器可以是微處理器或者該處理器也可以是任何常規的處理器等。軟體模組可以位於隨機記憶體,快閃記憶體、唯讀記憶體,可程式設計唯讀記憶體或者電可讀寫可程式設計記憶體、暫存器等本領域成熟的儲存介質中。該儲存介質位於記憶體301,處理器302讀取記憶體301中的資訊,結合其硬體執行該記憶體儲存的該程式,當該程式被執行時,該處理器用於:確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數;針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;該第一交易維度為該各個交易維度中的任一交易維度。 The processor 302 may also be referred to as a central processing unit (English: Central Processing Unit, CPU). The method disclosed in the foregoing embodiment of the present invention may be applied to the processor 302, or implemented by the processor 302. The processor 302 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by a hardware integrated logic circuit or a software form instruction in the processor 302. The processor 302 may be a general-purpose processor, a digital signal processor (DSP), a dedicated integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates, or transistor logic. Editing device, discrete hardware components. Various methods, steps, and logical block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The software module may be located in a mature storage medium such as a random memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically readable and writable programmable memory, a register, and the like. The storage medium is located in the memory 301, and the processor 302 reads the information in the memory 301 and combines the hardware to execute the program stored in the memory. When the program is executed, the processor is used to determine the node to be controlled. After the resource occupancy rate is greater than a preset occupancy threshold, the number of resources occupied by each transaction dimension of the node to be controlled at the current moment is obtained. For the first transaction dimension of each transaction dimension, if it is determined that the first transaction dimension is If the number of resources occupied at the current moment is greater than the current threshold of the first transaction dimension, the transaction of the received first transaction dimension is quickly failed to be processed; the current threshold of the first transaction dimension is based on the first transaction dimension Obtained from the historical threshold; the first transaction dimension is any one of the transaction dimensions.

可選地,該處理器302還用於:若確定該第一交易維度在當前時刻所佔用的資源個數小於等於該第一交易維度的當前閾值,則對接收到的該第一交易維度的交易進行處理。 Optionally, the processor 302 is further configured to: if it is determined that the number of resources occupied by the first transaction dimension at the current moment is less than or equal to the current threshold of the first transaction dimension, The transaction is processed.

可選地,該處理器302具體用於:通過以下公式確定該第一交易維度的當前閾值:F t =αX t +(1-α)F t-1 Optionally, the processor 302 is specifically configured to determine the current threshold value of the first transaction dimension by the following formula: F t = αX t + (1- α ) F t -1

其中,F t 為該第一交易維度的當前閾值,F t-1為該第一交易維度在當前時刻的前一時刻的歷史閾值,X t 為該第一交易維度當前佔用的資源個數,α為第一交易維度的權重值。 Among them, F t is the current threshold value of the first transaction dimension, F t -1 is the historical threshold value of the first transaction dimension at a moment before the current time, and X t is the number of resources currently occupied by the first transaction dimension. α is the weight value of the first transaction dimension.

可選地,該處理器302還用於通過如下方式得到該待控制節點的各個交易維度:獲取該待控制節點對應的各個訊息;根據該各個訊息中包含的服務元素,將該各個訊息中均包含的服務元素確定為目標服務元素;將各個該目標服務元素中所包含的類型進行組合,得到該待控制節點的各個交易維度。 Optionally, the processor 302 is further configured to obtain each transaction dimension of the node to be controlled by: obtaining each message corresponding to the node to be controlled; and according to the service element included in each message, The included service element is determined as the target service element; the types contained in each target service element are combined to obtain each transaction dimension of the node to be controlled.

從上述內容可以看出:本發明的上述實施例中,確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數;針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;本發明實施例中,一方面,通過將待控制節點的資源佔用率與預設佔用率閾值進行比較,並在資源佔用率大於預設佔用率閾值的情況下,執行後續的流速控制操作,不僅確保了系統的可用性,而且有效避免了在資源不緊張時進行無效的流速控制,節省處理資源;另一方面,針對各個交易維度中的任一交易維度,若佔用的資源個數大於閾值,則說明該交易維度的管道可能發生故障,此時可將接收到的該交易維度的交易進行快速失敗處理,從而實現在資源緊張的情況下,對可能發生故障的管道進行平滑過渡的控制,而非完全隔離,通過犧牲一部分本來就無法成功的交易,來避免該交易維度的管道發生故障,以便於在該交易維度恢復正常後平緩地進 行自動恢復;特別地,第一交易維度的當前閾值是根據第一交易維度的歷史閾值得到的,從而保證了閾值的動態更新,更加符合實際交易的特點。 It can be seen from the foregoing that: in the above embodiment of the present invention, after determining that the resource occupancy rate of the node to be controlled is greater than a preset occupancy threshold, obtaining the number of resources occupied by each transaction dimension of the node to be controlled at the current moment; For the first transaction dimension of each transaction dimension, if it is determined that the number of resources occupied by the first transaction dimension at the current moment is greater than the current threshold of the first transaction dimension, the transaction of the first transaction dimension will be received Fast failure processing is performed; the current threshold value of the first transaction dimension is obtained according to the historical threshold value of the first transaction dimension; in an embodiment of the present invention, on the one hand, the resource occupation rate of the node to be controlled is compared with a preset occupation rate threshold Compare and perform subsequent flow rate control operations when the resource occupancy rate is greater than the preset occupancy threshold value, which not only ensures the availability of the system, but also effectively avoids invalid flow rate control when resources are not tight and saves processing resources ; On the other hand, for any one of the transaction dimensions, if the number of resources occupied is greater than Value, it means that the pipeline of the transaction dimension may be faulty. At this time, the received transaction of the transaction dimension may be quickly failed to handle, so as to realize the smooth transition control of the pipeline that may fail in the case of resource constraints. , Rather than completely isolated, by sacrificing a part of the transaction that could not be successful, to avoid the failure of the pipeline of the transaction dimension, so that it can progress smoothly after the transaction dimension returns to normal. The line automatically recovers; in particular, the current threshold value of the first transaction dimension is obtained based on the historical threshold value of the first transaction dimension, thereby ensuring that the threshold is dynamically updated and more in line with the characteristics of actual transactions.

本領域內的技術人員應明白,本發明的實施例可提供為方法、或電腦程式產品。因此,本發明可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體方面的實施例的形式。而且,本發明可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存介質(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。 Those skilled in the art should understand that the embodiments of the present invention may be provided as a method or a computer program product. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk memory, CD-ROM, optical memory, etc.) containing computer-usable code therein. .

本發明是參照根據本發明實施例的方法、設備(系統)、和電腦程式產品的流程圖和/或方塊圖來描述的。應理解可由電腦程式指令實現流程圖和/或方塊圖中的每一流程和/或方框、以及流程圖和/或方塊圖中的流程和/或方框的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式設計資料處理設備的處理器以產生一個機器,使得通過電腦或其他可程式設計資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方塊圖一個方框或多個方框中指定的功能的裝置。 The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and a combination of the flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to generate a machine for instructions executed by the processor of the computer or other programmable data processing device Means are generated for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.

這些電腦程式指令也可儲存在能引導電腦或其他可程式設計資料處理設備以特定方式工作的電腦可讀記憶體中,使得儲存在該電腦可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方塊圖一個方框或多個方框中指定的功能。 These computer program instructions may also be stored in computer readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory generate a manufactured article including a command device The instruction device implements the functions specified in a flowchart or a plurality of processes and / or a block or a plurality of blocks in the block diagram.

這些電腦程式指令也可裝載到電腦或其他可程式設計資料處理設備上,使得在電腦或其他可程式設計設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可程式設計設備上執行的指令提 供用於實現在流程圖一個流程或多個流程和/或方塊圖一個方框或多個方框中指定的功能的步驟。 These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operating steps can be performed on the computer or other programmable equipment to generate computer-implemented processing, and thus on the computer or other programmable equipment The instructions executed on the Steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.

儘管已描述了本發明的優選實施例,但本領域內的技術人員一旦得知了基本創造性概念,則可對這些實施例作出另外的變更和修改。所以,所附申請專利範圍意欲解釋為包括優選實施例以及落入本發明範圍的所有變更和修改。 Although the preferred embodiments of the present invention have been described, those skilled in the art can make other changes and modifications to these embodiments once they know the basic inventive concepts. Therefore, the scope of the appended patent applications is intended to be construed to include the preferred embodiments and all changes and modifications that fall within the scope of the invention.

顯然,本領域的技術人員可以對本發明進行各種改動和變型而不脫離本發明的精神和範圍。這樣,倘若本發明的這些修改和變型屬於本發明申請專利範圍及其等同技術的範圍之內,則本發明也意圖包含這些改動和變型在內。 Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. In this way, if these modifications and variations of the present invention fall within the scope of the patent application for the present invention and the scope of the equivalent technology, the present invention also intends to include these modifications and variations.

Claims (12)

一種流速控制方法,應用於閘道以及分散式互聯網交易中,其特徵在於,該方法包括:確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數;針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;該第一交易維度為該各個交易維度中的任一交易維度。A method for controlling flow rate, which is applied to gateways and decentralized Internet transactions, is characterized in that the method includes: after determining that the resource occupancy rate of a node to be controlled is greater than a preset occupancy rate threshold, obtaining each transaction dimension of the node to be controlled in The number of resources occupied at the current moment; for the first transaction dimension of each transaction dimension, if it is determined that the number of resources occupied by the first transaction dimension at the current moment is greater than the current threshold of the first transaction dimension, it will receive The transaction of the first transaction dimension is quickly failed; the current threshold of the first transaction dimension is obtained according to the historical threshold of the first transaction dimension; the first transaction dimension is any transaction in each of the transaction dimensions Dimensions. 如請求項1所述的流速控制方法,其中,若確定該第一交易維度在當前時刻所佔用的資源個數小於等於該第一交易維度的當前閾值,則對接收到的該第一交易維度的交易進行處理。The flow rate control method according to claim 1, wherein if it is determined that the number of resources occupied by the first transaction dimension at the current moment is less than or equal to the current threshold value of the first transaction dimension, the received first transaction dimension is Transaction. 如請求項1所述的流速控制方法,其中,該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的,包括:通過以下公式確定該第一交易維度的當前閾值:F t X t +(1-α)F t-1其中,F t 為該第一交易維度的當前閾值,F t-1為該第一交易維度在當前時刻的前一時刻的歷史閾值,X t 為該第一交易維度當前佔用的資源個數,α為第一交易維度的權重值。The flow rate control method according to claim 1, wherein the current threshold value of the first transaction dimension is obtained according to the historical threshold value of the first transaction dimension, including: determining the current threshold value of the first transaction dimension by the following formula: F t = α X t + (1-α) F t -1, where F t is the current threshold value of the first transaction dimension, and F t -1 is the historical threshold value of the first transaction dimension at the moment before the current moment, X t is the number of resources currently occupied by the first transaction dimension, and α is a weight value of the first transaction dimension. 如請求項1-3中任一項所述的流速控制方法,其中,該待控制節點的各個交易維度是通過如下方式得到的:獲取該待控制節點對應的各個訊息;根據該各個訊息中包含的服務元素,將該各個訊息中均包含的服務元素確定為目標服務元素;將各個該目標服務元素中所包含的類型進行組合,得到該待控制節點的各個交易維度。The flow rate control method according to any one of claims 1-3, wherein each transaction dimension of the node to be controlled is obtained by: acquiring each message corresponding to the node to be controlled; and according to each message including The service element included in each message is determined as the target service element; the types contained in each target service element are combined to obtain each transaction dimension of the node to be controlled. 一種流速控制裝置,應用於閘道以及分散式互聯網交易中,其特徵在於,該裝置包括:獲取模組,用於確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數;處理模組,用於針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;該第一交易維度為該各個交易維度中的任一交易維度。A flow rate control device applied to a gateway and a decentralized Internet transaction is characterized in that the device includes: an acquisition module for determining that a resource occupation rate of a node to be controlled is greater than a preset occupation rate threshold, and acquiring the to-be-controlled The number of resources occupied by each transaction dimension of the node at the current moment; the processing module is used for the first transaction dimension of each transaction dimension, if it is determined that the number of resources occupied by the first transaction dimension at the current moment is greater than If the current threshold of the first transaction dimension is used to quickly fail the received transaction of the first transaction dimension; the current threshold of the first transaction dimension is obtained according to the historical threshold of the first transaction dimension; the first The transaction dimension is any one of the transaction dimensions. 如請求項5所述的流速控制裝置,其中,該處理模組還用於:若確定該第一交易維度在當前時刻所佔用的資源個數小於等於該第一交易維度的當前閾值,則對接收到的該第一交易維度的交易進行處理。The flow rate control device according to claim 5, wherein the processing module is further configured to: if it is determined that the number of resources occupied by the first transaction dimension at the current moment is less than or equal to the current threshold value of the first transaction dimension, The received transaction of the first transaction dimension is processed. 如請求項5所述的流速控制裝置,其中,該處理模組具體用於:通過以下公式確定該第一交易維度的當前閾值:F t X t +(1-α)F t-1其中,F t 為該第一交易維度的當前閾值,F t-1為該第一交易維度在當前時刻的前一時刻的歷史閾值,X t 為該第一交易維度當前佔用的資源個數,α為第一交易維度的權重值。The flow rate control device according to claim 5, wherein the processing module is specifically configured to determine a current threshold value of the first transaction dimension by the following formula: F t = α X t + (1-α) F t -1 Among them, F t is the current threshold value of the first transaction dimension, F t -1 is the historical threshold value of the first transaction dimension at a moment before the current time, and X t is the number of resources currently occupied by the first transaction dimension. α is the weight value of the first transaction dimension. 如請求項5-7中任一項所述的流速控制裝置,其中,該處理模組還用於通過如下方式得到該待控制節點的各個交易維度:獲取該待控制節點對應的各個訊息;根據該各個訊息訊息中包含的服務元素,將該各個訊息中均包含的服務元素確定為目標服務元素;將各個該目標服務元素中所包含的類型進行組合,得到該待控制節點的各個交易維度。The flow rate control device according to any one of claims 5-7, wherein the processing module is further configured to obtain each transaction dimension of the node to be controlled by: acquiring each message corresponding to the node to be controlled; according to The service elements included in each message are determined as the target service elements; the types contained in each target service element are combined to obtain each transaction dimension of the node to be controlled. 一種流速控制裝置,應用於閘道以及分散式互聯網交易中,其特徵在於,該裝置包括:處理器和記憶體,該記憶體用於儲存軟體程式,該處理器用於讀取該記憶體中儲存的軟體程式執行:確定待控制節點的資源佔用率大於預設佔用率閾值後,獲取該待控制節點的各個交易維度在當前時刻所佔用的資源個數;針對該各個交易維度中的第一交易維度,若確定該第一交易維度在當前時刻所佔用的資源個數大於該第一交易維度的當前閾值,則將接收到的該第一交易維度的交易進行快速失敗處理;該第一交易維度的當前閾值是根據該第一交易維度的歷史閾值得到的;該第一交易維度為該各個交易維度中的任一交易維度。A flow rate control device, which is used in gateways and distributed Internet transactions, is characterized in that the device includes: a processor and a memory, the memory is used to store software programs, and the processor is used to read the memory stored in the memory Software program execution: After determining that the resource occupancy of the node to be controlled is greater than a preset occupancy threshold, obtain the number of resources occupied by each transaction dimension of the node to be controlled at the current moment; for the first transaction in each transaction dimension Dimension, if it is determined that the number of resources occupied by the first transaction dimension at the current moment is greater than the current threshold value of the first transaction dimension, the received transaction of the first transaction dimension is quickly failed to be processed; the first transaction dimension The current threshold of is obtained according to the historical threshold of the first transaction dimension; the first transaction dimension is any one of the transaction dimensions. 如請求項9所述的流速控制裝置,其中,該處理器還用於:若確定該第一交易維度在當前時刻所佔用的資源個數小於等於該第一交易維度的當前閾值,則對接收到的該第一交易維度的交易進行處理。The flow rate control device according to claim 9, wherein the processor is further configured to: if it is determined that the number of resources occupied by the first transaction dimension at the current moment is less than or equal to the current threshold of the first transaction dimension, The transaction of the first transaction dimension is processed. 如請求項9所述的流速控制裝置,其中,該處理器具體用於:通過以下公式確定該第一交易維度的當前閾值:F t X t +(1-α)F t-1其中,F t 為該第一交易維度的當前閾值,F t-1為該第一交易維度在當前時刻的前一時刻的歷史閾值,X t 為該第一交易維度當前佔用的資源個數,α為第一交易維度的權重值。The flow rate control device according to claim 9, wherein the processor is specifically configured to determine a current threshold value of the first transaction dimension by the following formula: F t = α X t + (1-α) F t -1where , F t is the current threshold value of the first transaction dimension, F t -1 is the historical threshold value of the first transaction dimension at a moment before the current time, X t is the number of resources currently occupied by the first transaction dimension, α Is the weight value of the first transaction dimension. 如請求項9-11中任一項所述的流速控制裝置,其中,該處理器還用於通過如下方式得到該待控制節點的各個交易維度:獲取該待控制節點對應的各個訊息;根據該各個訊息訊息中包含的服務元素,將該各個訊息中均包含的服務元素確定為目標服務元素;將各個該目標服務元素中所包含的類型進行組合,得到該待控制節點的各個交易維度。The flow rate control device according to any one of claims 9-11, wherein the processor is further configured to obtain each transaction dimension of the node to be controlled by: acquiring each message corresponding to the node to be controlled; according to the The service elements included in each message are determined as the target service elements; the types contained in each target service element are combined to obtain the transaction dimensions of the node to be controlled.
TW106126176A 2016-08-04 2017-08-03 Flow rate control method and device TWI671708B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610632359.XA CN106100901B (en) 2016-08-04 2016-08-04 Flow velocity control method and device
??201610632359.X 2016-08-04

Publications (2)

Publication Number Publication Date
TW201805889A TW201805889A (en) 2018-02-16
TWI671708B true TWI671708B (en) 2019-09-11

Family

ID=57453731

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106126176A TWI671708B (en) 2016-08-04 2017-08-03 Flow rate control method and device

Country Status (3)

Country Link
CN (1) CN106100901B (en)
TW (1) TWI671708B (en)
WO (1) WO2018024076A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106100901B (en) * 2016-08-04 2019-12-06 中国银联股份有限公司 Flow velocity control method and device
CN110324411B (en) * 2019-06-18 2022-11-18 平安普惠企业管理有限公司 Service distribution method and device
CN112817948B (en) * 2019-11-15 2023-02-03 北京三快在线科技有限公司 Data detection method and device, readable storage medium and electronic equipment
CN111415261B (en) * 2020-03-27 2023-10-24 中国建设银行股份有限公司 Control method, system and device for dynamically updating flow control threshold of bank system
CN115545805B (en) * 2022-11-29 2023-04-07 中信建投证券股份有限公司 Service scaling method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200944022A (en) * 2008-02-14 2009-10-16 Qualcomm Inc Traffic management for multi-hop wireless communication
US7668966B2 (en) * 2001-11-02 2010-02-23 Internap Network Services Corporation Data network controller
TWI333770B (en) * 2005-10-26 2010-11-21 Qualcomm Inc Using resource utilization messages in a multi-carrier mac to achieve fairness

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4523381B2 (en) * 2004-10-29 2010-08-11 株式会社日立製作所 Packet communication device
CN103839182A (en) * 2012-11-23 2014-06-04 中国银联股份有限公司 Method and system for monitoring transaction data processing of online transaction system in real time
CN104753805B (en) * 2013-12-31 2018-07-24 腾讯科技(深圳)有限公司 Distributed flow control method, server and system
CN103825830B (en) * 2014-02-24 2017-02-01 北京南天软件有限公司 Method and device for system to achieve flow control based on TUXEDO middleware
CN104090823A (en) * 2014-06-09 2014-10-08 中国建设银行股份有限公司 Flow control method and device for computer system
CN104408656A (en) * 2014-10-29 2015-03-11 中国建设银行股份有限公司 Method and system for dynamic adjusting flow control threshold
US20180198855A1 (en) * 2014-11-24 2018-07-12 Alibaba Group Holding Limited Method and apparatus for scheduling calculation tasks among clusters
CN104580524A (en) * 2015-01-30 2015-04-29 华为技术有限公司 Resource scaling method and cloud platform with same
CN105389729A (en) * 2015-12-15 2016-03-09 中国建设银行股份有限公司 Precise control system and method for transaction flow
CN106100901B (en) * 2016-08-04 2019-12-06 中国银联股份有限公司 Flow velocity control method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7668966B2 (en) * 2001-11-02 2010-02-23 Internap Network Services Corporation Data network controller
TWI333770B (en) * 2005-10-26 2010-11-21 Qualcomm Inc Using resource utilization messages in a multi-carrier mac to achieve fairness
TW200944022A (en) * 2008-02-14 2009-10-16 Qualcomm Inc Traffic management for multi-hop wireless communication

Also Published As

Publication number Publication date
TW201805889A (en) 2018-02-16
CN106100901A (en) 2016-11-09
WO2018024076A1 (en) 2018-02-08
CN106100901B (en) 2019-12-06

Similar Documents

Publication Publication Date Title
TWI671708B (en) Flow rate control method and device
US11579935B2 (en) Merging scaled-down container clusters using vitality metrics
US10331492B2 (en) Techniques to dynamically allocate resources of configurable computing resources
KR101804605B1 (en) Controlled automatic healing of data-center services
US9396039B1 (en) Scalable load testing using a queue
TWI755415B (en) Method, device and system for application cluster resource allocation in cloud environment
US20180246751A1 (en) Techniques to select virtual machines for migration
US20150295970A1 (en) Method and device for augmenting and releasing capacity of computing resources in real-time stream computing system
US11144330B2 (en) Algorithm program loading method and related apparatus
CN109739627B (en) Task scheduling method, electronic device and medium
US20160182320A1 (en) Techniques to generate a graph model for cloud infrastructure elements
CN105939225A (en) Method and device for executing service
US11307900B2 (en) Adjustment of the number of central processing units to meet performance requirements of an I/O resource
CN116860459B (en) Method, device, equipment and medium for monitoring resource pool in cloud platform
CN110659108A (en) Cloud system virtual machine task migration method and device and server
CN114546714B (en) A data backup method, system, device and storage medium
CN106886477B (en) Method and device for setting monitoring threshold in cloud system
CN104281587B (en) A kind of method and device for establishing connection
CN117135151A (en) A fault detection method for GPU cluster and GPU cluster and electronic equipment
US10592127B2 (en) Method and system for allocating mirrored memories
WO2017107828A1 (en) Method and device for processing data after restart of node
CN111124754A (en) Data recovery method, device, equipment and medium
HK1231269B (en) Method and device for controlling the flow rate
CN117014312A (en) Capacity management method and related equipment
CN114721770A (en) A fault drill method and device