TW201909048A - Resource allocation method and device - Google Patents

Resource allocation method and device Download PDF

Info

Publication number
TW201909048A
TW201909048A TW107125302A TW107125302A TW201909048A TW 201909048 A TW201909048 A TW 201909048A TW 107125302 A TW107125302 A TW 107125302A TW 107125302 A TW107125302 A TW 107125302A TW 201909048 A TW201909048 A TW 201909048A
Authority
TW
Taiwan
Prior art keywords
resources
type
transaction
institution
resource
Prior art date
Application number
TW107125302A
Other languages
Chinese (zh)
Other versions
TWI688905B (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 TW201909048A publication Critical patent/TW201909048A/en
Application granted granted Critical
Publication of TWI688905B publication Critical patent/TWI688905B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Provided are a resource allocation method and device. The method comprises: acquiring a pending transaction of a target mechanism; determining a current resource usage situation of the target mechanism according to transaction data of the target mechanism; determining whether the current resource usage situation of the target mechanism exceeds a pre-set resource usage situation, wherein the pre-set resource usage situation is determined according to resources pre-allocated to the target mechanism and a first type of resources pre-allocated to all mechanisms; and if so, allocating to the pending transaction resources from a second type of resources, wherein the second type of resources are resources of the total resources other than the first type of resources. In the embodiments of the present invention, when the current resource usage situation of a target mechanism exceeds a pre-set resource usage situation of the target mechanism, resources are allocated to a pending transaction of the target mechanism by using a second type of resources; thus, the pending transaction of the target mechanism can avoid the problem that business cannot be conducted due to insufficient resources pre-allocated to the target mechanism, so that the stability of the transaction is improved, and the reuse of resources is achieved.

Description

一種資源配置方法和裝置 Resource configuration method and device

本發明實施例涉及資料調度技術領域,尤其涉及一種資源配置方法和裝置。 The embodiments of the present invention relate to the technical field of data scheduling, and in particular, to a resource configuration method and device.

當前,銀聯與越來越多的機構有業務合作,而且機構性質多樣化,有銀行、第三方支付機構、手機廠商、運營商、商戶等。各機構所處行業不同,技術能力不同,運維目標不同,所以與之對接的流控系統應該做到靈活調配本系統應用資源,最大可能保證業務的可用性。現有的流控系統中,系統將總執行緒資源按照歷史交易量預先分配給各機構,各機構在進行交易時只能使用預先分配的資源。當某一時間段內因行銷或其他原因導致機構的交易量增多而預先分配的資源無法滿足交易需求時,該機構的交易將無法進行,而同一時間段內可能出現其他機構的資源使用量遠低於預先分配的資源,故現有的流控系統中不能實現執行緒資源的複用,導致執行緒資源利用率低。 At present, UnionPay has business cooperation with more and more institutions, and the nature of the institutions is diverse, including banks, third-party payment institutions, mobile phone manufacturers, operators, merchants, etc. Each organization is in a different industry, has different technical capabilities, and has different operation and maintenance objectives. Therefore, the flow control system connected to it should flexibly allocate the application resources of this system to ensure the maximum availability of the business. In the existing flow control system, the system pre-allocates the total thread resources to each institution according to the historical transaction volume, and each institution can only use the pre-allocated resources when conducting transactions. When an agency's transaction volume increases due to marketing or other reasons within a certain period of time, and the pre-allocated resources cannot meet the transaction needs, the agency's transaction will not be able to proceed, and the resource usage of other agencies may be far lower in the same period of time Due to the pre-allocated resources, the existing flow control system cannot realize the reuse of thread resources, resulting in a low utilization rate of thread resources.

本發明實施例提供一種資源配置方法和裝置,用於解決現有 流控系統中不能實現執行緒資源複用而導致執行緒資源利用率低的問題。本發明實施例提供了一種資源配置方法,包括:獲取待處理交易並確定該待處理交易對應的目的機構;根據該目的機構在設定時間段內的交易資料確定該目的機構當前的資源使用情況;確定該目的機構當前的資源使用情況是否超過該目的機構的預設資源使用情況,該預設資源使用情況為根據預先分配給該目的機構的資源與預先分配給所有機構的第一類資源確定的;若超過,則從第二類資源中為該待處理交易分配資源,該第二類資源為總資源中除該第一類資源之外的資源。 The embodiments of the present invention provide a resource configuration method and device, which are used to solve the problem that the thread resource utilization rate cannot be realized due to the inability to reuse thread resources in the existing flow control system. An embodiment of the present invention provides a resource allocation method, including: acquiring a pending transaction and determining a target institution corresponding to the pending transaction; determining the current resource usage of the target institution based on the transaction data of the target institution within a set time period; Determine whether the current resource usage of the destination institution exceeds the preset resource usage of the destination institution, which is determined based on the resources pre-allocated to the destination institution and the first type resources pre-allocated to all institutions ; If it exceeds, then allocate resources for the pending transaction from the second type of resources, and the second type of resources is the total resources except the first type of resources.

可選地,該從第二類資源中為該待處理交易分配資源,包括:確定該第二類資源的使用率是否大於第一閾值;若該第二類資源的使用率不大於該第一閾值,則從該第二類資源中為該待處理交易分配資源;或,若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源;該目的機構的平均交易時間是根據該目的機構在設定時間段內的交易資料確定的。 Optionally, allocating resources for the pending transaction from the second type of resources includes: determining whether the utilization rate of the second type of resources is greater than a first threshold; if the utilization rate of the second type of resources is not greater than the first Threshold, then allocate resources for the pending transaction from the second type of resource; or, if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, then Assign resources to the pending transaction from the second type of resources; the average transaction time of the target institution is determined according to the transaction data of the target institution within a set time period.

可選地,還包括:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源之後,還包括: 根據該目的機構在設定時間段內的交易資料確定該目的機構當前佔用的資源;在確定該目的機構當前佔用的資源大於第三閾值時,增加該目的機構的預設資源。 Optionally, it also includes: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, then the pending transaction is allocated from the second type of resource After the resources, it also includes: determining the resources currently occupied by the target institution according to the transaction data of the target institution within a set time period; when determining that the resources currently occupied by the target institution are greater than the third threshold, increasing the preset resources of the target institution .

可選地,還包括:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間不小於該第二閾值,停止為該待處理交易分配資源,同時減少該目的機構的預設資源。 Optionally, it also includes: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is not less than the second threshold, stop allocating resources for the pending transaction while reducing the The default resources of the target institution.

可選地,該從第二類資源中為該待處理交易分配資源之後,還包括:統計該目的機構利用該第二類資源進行交易的交易量;在確定該交易量大於第四閾值時,增加該目的機構的預設資源。 Optionally, after allocating resources for the transaction to be processed from the second type of resources, the method further includes: counting the transaction volume of the transaction performed by the target institution using the second type of resources; when it is determined that the transaction volume is greater than the fourth threshold, Increase the preset resources of the target institution.

相應地,本發明實施例還提供了一種資源配置裝置,包括:獲取模組,用於獲取待處理交易並確定該待處理交易對應的目的機構;處理模組,用於根據該目的機構在設定時間段內的交易資料確定該目的機構當前的資源使用情況;確定該目的機構當前的資源使用情況是否超過該目的機構的預設資源使用情況,該預設資源使用情況為根據預先分配給該目的機構的資源與預先分配給所有機構的第一類資源確定的;若超過,則從第二類資源中為該待處理交易分配資源,該第二類資源為總資源中除該第一類資源之外的資源。 Correspondingly, an embodiment of the present invention also provides a resource configuration device, including: an acquisition module for acquiring a pending transaction and determining a target institution corresponding to the pending transaction; a processing module for setting according to the target institution The transaction data within the time period determines the current resource usage of the target institution; determines whether the current resource usage of the target institution exceeds the preset resource usage of the target institution, the preset resource usage is based on pre-assigned to the purpose The resources of the organization are determined from the first type of resources pre-allocated to all organizations; if it exceeds, the resources of the pending transaction are allocated from the second type of resources, and the second type of resources is the total resources divided by the first type of resources Outside resources.

可選地,該處理模組具體用於: 確定該第二類資源的使用率是否大於第一閾值;若該第二類資源的使用率不大於該第一閾值,則從該第二類資源中為該待處理交易分配資源;或,若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源;該目的機構的平均交易時間是根據該目的機構在設定時間段內的交易資料確定的。 Optionally, the processing module is specifically configured to: determine whether the utilization rate of the second type of resource is greater than the first threshold; if the utilization rate of the second type of resource is not greater than the first threshold, then select the second type of resource Allocate resources for the pending transaction; or, if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, the second type of resource is assigned to the transaction Resources are allocated for pending transactions; the average transaction time of the target institution is determined based on the transaction data of the target institution within a set time period.

可選地,該處理模組還用於:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源之後,還包括:根據該目的機構在設定時間段內的交易資料確定該目的機構當前佔用的資源;在確定該目的機構當前佔用的資源大於第三閾值時,增加該目的機構的預設資源。 Optionally, the processing module is also used to: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, then from the second type of resource is After allocating resources for the pending transaction, the method further includes: determining the resources currently occupied by the target institution according to the transaction data of the target institution within a set time period; when determining that the resources currently occupied by the target institution are greater than the third threshold, increasing the purpose Institutional resources.

可選地,該處理模組還用於:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間不小於該第二閾值,停止為該待處理交易分配資源,同時減少該目的機構的預設資源。 Optionally, the processing module is also used to: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is not less than the second threshold, stop allocating the pending transaction Resources, while reducing the preset resources of the target institution.

可選地,該處理模組還用於:從第二類資源中為該待處理交易分配資源之後,統計該目的機構利用該第二類資源進行交易的交易量; 在確定該交易量大於第四閾值時,增加該目的機構的預設資源。 Optionally, the processing module is further used to: after allocating resources for the transaction to be processed from the second type of resources, count the transaction volume of the target organization using the second type of resources for the transaction; When the threshold is four, increase the preset resources of the target institution.

本發明實施例還提供了一種計算設備,包括收發器、記憶體和處理器;其中:收發器,用於獲取待處理交易並確定該待處理交易對應的目的機構;記憶體,用於存儲程式指令;處理器,用於調用該記憶體中存儲的程式指令,按照獲得的程式執行第一方面或第一方面的任意可能的實現方式中的方法。 An embodiment of the present invention also provides a computing device, including a transceiver, a memory, and a processor; wherein: the transceiver is used to obtain a pending transaction and determine a target mechanism corresponding to the pending transaction; the memory is used to store a program Instruction; processor, used to call the program instructions stored in the memory, and execute the method in the first aspect or any possible implementation manner of the first aspect according to the obtained program.

本發明實施例還提供了一種電腦可讀存儲介質,該電腦可讀存儲介質用於儲存為上述計算設備所用的電腦程式指令,其包含用於執行上述資源配置方法的程式。 An embodiment of the present invention also provides a computer-readable storage medium for storing computer program instructions used by the above-mentioned computing device, which includes a program for executing the above-mentioned resource allocation method.

本發明實施例還提供一種電腦程式產品,該電腦程式產品包括存儲在非暫態電腦可讀存儲介質上的計算程式,該電腦程式包括程式指令,當該程式指令被電腦執行時,使該電腦執行第一方面或第一方面的任意可能的實現方式中的方法。 An embodiment of the present invention also provides a computer program product, the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by the computer, the computer Perform the method in the first aspect or any possible implementation of the first aspect.

本發明實施例表明,獲取待處理交易並確定該待處理交易對應的目的機構;然後根據該目的機構在設定時間段內的交易資料確定該目的機構當前的資源使用情況;確定該目的機構當前的資源使用情況是否超過該目的機構的預設資源使用情況,該預設資源使用情況為根據預先分配給該目的機構的資源與預先分配給所有機構的第一類資源確定的;若超過,則從第二類資源中為該待處理交易分配資源,該第二類資源為總資源中除該第一類資源之外的資源。本發明實施例中,將總資源分為第一類資源和第二類資源,第一類資源用於預先分配給所有機構,第二類資源為複用資 源,當目的機構當前的資源使用情況超過目的機構的預設資源使用情況時,利用第二類資源為目的機構的待處理交易分配資源,故目的機構的待處理交易不會因為預先分配給目的機構的資源不足導致業務無法進行,既提高了交易的穩定性,又實現了資源的複用。 The embodiment of the present invention shows that acquiring the pending transaction and determining the target institution corresponding to the pending transaction; then determining the current resource usage of the target institution based on the transaction data of the target institution within a set time period; determining the current resource of the target institution Whether the resource usage exceeds the target institution’s preset resource usage, which is determined based on the resources pre-allocated to the destination institution and the first type of resources pre-allocated to all institutions; if it exceeds, then from A resource of the second type is allocated for the transaction to be processed, and the second type of resource is a resource other than the first type of resource among the total resources. In the embodiment of the present invention, the total resources are divided into the first type of resources and the second type of resources. The first type of resources is used for pre-allocation to all organizations, and the second type of resources is multiplexed resources. When the target organization's current resource usage is When the target institution’s preset resource usage is exceeded, the second type of resources is used to allocate resources for the target institution’s pending transactions, so the target institution’s pending transactions will not be unable to conduct business due to insufficient resources allocated to the target institution in advance. The stability of the transaction is improved, and the reuse of resources is realized.

S101~S104、S301~S312‧‧‧步驟 S101~S104, S301~S312

401‧‧‧獲取模組 401‧‧‧ Get Module

402‧‧‧處理模組 402‧‧‧Processing module

500‧‧‧計算設備 500‧‧‧computing equipment

501‧‧‧收發器 501‧‧‧Transceiver

502‧‧‧處理器 502‧‧‧ processor

503‧‧‧記憶體 503‧‧‧Memory

504‧‧‧通信介面 504‧‧‧Communication interface

505‧‧‧匯流排 505‧‧‧Bus

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

圖1為本發明實施例提供的一種資源配置方法的流程示意圖;圖2為本發明實施例提供的一種觀察視窗的示意圖;圖3為本發明實施例提供的另一種資源配置方法的流程示意圖;圖4為本發明實施例提供的一種資源配置裝置的結構示意圖;圖5為本發明實施例提供的一種計算設備的結構示意圖。 1 is a schematic flowchart of a resource configuration method provided by an embodiment of the present invention; FIG. 2 is a schematic diagram of an observation window provided by an embodiment of the present invention; FIG. 3 is a schematic flowchart of another resource configuration method provided by an embodiment of the present invention; FIG. 4 is a schematic structural diagram of a resource configuration apparatus according to an embodiment of the present invention; FIG. 5 is a schematic structural diagram of a computing device according to an embodiment of the present invention.

為了使本發明的目的、技術方案及有益效果更加清楚明白,以下結合附圖及實施例,對本發明進行進一步詳細說明。應當理解,此處所描述的具體實施例僅僅用以解釋本發明,並不用於限定本發明。 In order to make the objectives, technical solutions and beneficial effects of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not intended to limit the present invention.

圖1示例性示出了本發明實施例提供的一種資源配置方法 的流程,該流程可以由資源配置裝置執行。 FIG. 1 exemplarily shows a flow of a resource configuration method provided by an embodiment of the present invention, and the flow may be executed by a resource configuration apparatus.

如圖1所示,該流程的具體步驟包括:步驟S101,獲取待處理交易並確定待處理交易對應的目的機構;步驟S102,根據目的機構在設定時間段內的交易資料確定目的機構當前的資源使用情況;步驟S103,確定目的機構當前的資源使用情況是否超過目的機構的預設資源使用情況;步驟S104,若超過,則從第二類資源中為待處理交易分配資源。 As shown in FIG. 1, the specific steps of the process include: step S101, obtaining pending transactions and determining the target institution corresponding to the pending transaction; step S102, determining the current resources of the target institution based on the transaction data of the target institution within a set time period Usage; Step S103, determine whether the current resource usage of the destination institution exceeds the preset resource usage of the destination institution; Step S104, if it exceeds, then allocate resources for the pending transaction from the second type of resources.

具體地,在步驟S101中,待處理交易可以是轉帳、消費等。機構可以是銀行、第三方支付機構、手機廠商、運營商、商戶等。各個機構的交易通過特定的標識進行區分,在獲取待處理交易後,根據待處理交易的標識即可確定待處理交易所屬的目的機構。 Specifically, in step S101, the transaction to be processed may be transfer, consumption, or the like. Institutions can be banks, third-party payment institutions, mobile phone manufacturers, operators, merchants, etc. The transactions of each institution are distinguished by a specific identifier. After obtaining the pending transaction, the target institution to which the pending transaction belongs can be determined according to the identifier of the pending transaction.

在步驟S102中,設定時間段為獲取待處理交易之前的一個時間段,時長可以根據具體情況確定,比如10秒、20秒等。可以將設定時間段作為一個觀察視窗,用於觀察並統計設定時間段內各個機構的交易資料,交易資料包括交易量、平均交易時間,交易開始時間、交易結束時間等。觀察視窗可隔一段時間移動一次,以每隔1秒移動一次為例進行說明,如圖2所示,比如當前的觀察視窗為0到20秒,則統計0到20秒中各個機構的交易資料,1秒後,觀察視窗移動,下一個觀察視窗為1到21秒,則統計1到21秒中各個機構的交易資料,當前的資源使用情況可以是當前的資源占比,即目的機構當前佔用的資源與第一類資源的比值;當前的資源使用情況也可以是目的機構當前佔用的資源。 In step S102, the set time period is a time period before acquiring the transaction to be processed, and the duration may be determined according to specific circumstances, such as 10 seconds, 20 seconds, and so on. The set time period can be used as an observation window for observing and counting the transaction data of various institutions within the set time period. The transaction data includes the transaction volume, average transaction time, transaction start time, and transaction end time. The observation window can be moved once in a certain period of time, taking the example of moving once every second as an example, as shown in Figure 2, for example, the current observation window is 0 to 20 seconds, then the transaction data of each institution in 0 to 20 seconds is counted After 1 second, the observation window moves, and the next observation window is 1 to 21 seconds, then the transaction data of each institution in 1 to 21 seconds is counted. The current resource usage can be the current resource ratio, that is, the target institution is currently occupied The ratio of the resources of the first type of resources; the current resource usage can also be the resources currently occupied by the destination organization.

在步驟S103中,預設資源使用情況為根據預先分配給目的機構的資源與預先分配給所有機構的第一類資源確定的。具體實施中,預設資源使用情況可以是預設資源占比,即預先分配給目的機構的資源與第一類資源的比值。預設資源使用情況也可以是預先分配給目的機構的資源,本發明實施例不對預設資源使用情況做具體限定。第一類資源為預先分配給所有機構的資源總和,也指設定時間段內允許的交易總時長。第一類資源可按照權重預先分配給各個機構,其中權重是根據各個機構的歷史交易資料確定的,第一類資源也可以直接均分給各個機構,第一類資源具體符合公式(1):A=M*S………………………………………(1) In step S103, the preset resource usage is determined based on the resources pre-allocated to the destination institution and the first type resources pre-allocated to all institutions. In specific implementation, the preset resource usage may be the ratio of preset resources, that is, the ratio of the resources allocated to the target institution in advance to the first type of resources. The preset resource usage situation may also be a resource allocated to the target institution in advance, and the embodiment of the present invention does not specifically limit the preset resource usage situation. The first type of resources is the sum of resources allocated to all institutions in advance, and also refers to the total length of transactions allowed within a set time period. The first type of resources can be pre-allocated to each institution according to the weight. The weight is determined according to the historical transaction data of each institution. The first type of resources can also be directly divided among the institutions. The first type of resources specifically conforms to formula (1): A=M*S…………………………………………(1)

其中,A為第一類資源,M為預先分配給所有機構的總執行緒數,S為設定時間段的時長。 Among them, A is the first type of resource, M is the total number of threads allocated to all institutions in advance, and S is the duration of the set time period.

在步驟S104中,當目的機構當前的資源使用情況沒有超過目的機構的預設資源使用情況時,說明預先分配給目的機構的資源還有剩餘,可以利用剩餘的資源完成待處理交易。當目的機構當前的資源使用情況超過目的機構的預設資源使用情況時,說明預先分配給目的機構的資源已經用完,不能再為待處理交易提供資源,此時就需要利用第二類資源完成待處理交易。第二類資源為總資源中除第一類資源之外的資源。 In step S104, when the current resource usage of the target institution does not exceed the preset resource usage of the target institution, it indicates that there are remaining resources pre-allocated to the target institution, and the remaining resources can be used to complete the pending transaction. When the current resource usage of the target institution exceeds the preset resource usage of the target institution, it means that the resources allocated to the target institution in advance have been used up and can no longer provide resources for the pending transaction. In this case, the second type of resource needs to be used to complete Pending transactions. The second type of resources is the total resources except the first type of resources.

本發明實施例中,將總資源分為第一類資源和第二類資源,第一類資源用於預先分配給所有機構,第二類資源為複用資源,當目的機構當前的資源使用情況超過目的機構的預設資源使用情況時,利用第二類資源為目的機構的待處理交易分配資源,故目的機構的待處理交易不會因 為預先分配給目的機構的資源不足導致業務無法進行,既提高了交易的穩定性,又實現了資源的複用。 In the embodiment of the present invention, the total resources are divided into the first type of resources and the second type of resources. The first type of resources is used for pre-allocation to all organizations, and the second type of resources is multiplexed resources. When the target organization's current resource usage is When the target institution’s preset resource usage is exceeded, the second type of resources is used to allocate resources for the target institution’s pending transactions, so the target institution’s pending transactions will not be unable to conduct business due to insufficient resources allocated to the target institution in advance. The stability of the transaction is improved, and the reuse of resources is realized.

下面介紹確定目的機構當前的資源使用情況的過程。 The following describes the process of determining the current resource usage of the target organization.

以目的機構當前佔用的資源作為目的機構當前的資源使用情況時,根據目的機構在設定時間段內的交易資料確定目的機構當前佔用的資源,具體包括以下兩種方法,分別為:方法一、通過觀察視窗統計目的機構在設定時間段的交易量和平均交易時間,通過計算設定時間段內目的機構的交易量和平均交易時間的乘積確定目的機構當前佔用的資源,比如設定時間段為獲取待處理交易之前的20秒,通過統計得到該20秒內目的機構的交易量為1000次,平均交易時間為10毫秒,則目的機構當前佔用的資源為10000線程秒;方法二、通過觀察視窗統計設定時間段內目的機構所有交易的開始時間和結束時間,然後根據每次交易的開始時間和結束時間確定每次交易的時長,最後將所有交易的時長相加得到目的機構當前佔用的資源。 When the resources currently occupied by the target institution are used as the current resource usage of the target institution, the resources currently occupied by the target institution are determined according to the transaction data of the target institution within a set period of time, which specifically includes the following two methods, respectively: Method 1: Observe the statistics of the transaction volume and average transaction time of the target institution in the set time period, and determine the resources currently occupied by the target institution by calculating the product of the target institution's transaction volume and average transaction time in the set time period, for example, the set time period is obtained for processing In the 20 seconds before the transaction, through statistics, the transaction volume of the target institution in the 20 seconds is 1000 times, and the average transaction time is 10 milliseconds, then the resource currently occupied by the target institution is 10,000 thread seconds; method two, set the time by observing the window statistics The start time and end time of all transactions of the target institution in the segment, then determine the duration of each transaction according to the start time and end time of each transaction, and finally add the duration of all transactions to obtain the resources currently occupied by the target institution.

以目的機構當前的資源占比作為目的機構當前的資源使用情況時,根據上述方法確定目的機構當前佔用的資源之後,需進一步通過計算目的機構當前佔用的資源與第一類資源的比值確定目的機構當前的資源占比。本發明實施例中,通過統計設定時間段內目的機構的交易總時長確定目的機構當前佔用的資源,並根據當前佔用的資源與第一類資源確定當前的資源占比,而不是根據目的機構佔用的執行緒個數確定目的機構當前佔用的資源以及目的機構當前的資源占比,確定當前的資源占比的細微性更細,進而提高了確定目的機構當前的資源使用情況的精度。 When using the current resource ratio of the target institution as the current resource usage of the target institution, after determining the resources currently occupied by the target institution according to the above method, it is necessary to further determine the target institution by calculating the ratio of the resources currently occupied by the target institution and the first type of resources Current resource ratio. In the embodiment of the present invention, the current transaction resources of the target institution are determined by statistically determining the total transaction duration of the target institution, and the current resource ratio is determined according to the currently occupied resources and the first type of resources, rather than according to the target institution The number of threads occupied determines the resource currently occupied by the target organization and the current resource ratio of the target organization, and determines the subtlety of the current resource ratio, thereby improving the accuracy of determining the current resource usage of the target organization.

當目的機構當前的資源使用情況超過目的機構的預設資源使用情況時,從第二類資源中為待處理交易分配資源,具體包括以下四種情況:情況一、確定第二類資源的使用率不大於第一閾值時,說明第二類資源充足,則從第二類資源中為待處理交易分配資源;情況二、確定第二類資源的使用率大於第一閾值時,且,目的機構的平均交易時間小於第二閾值,說明第二類資源緊張且目的機構的交易處理速度正常,則從第二類資源中為待處理交易分配資源。其中,目的機構的平均交易時間是根據目的機構在設定時間段內的交易資料確定的,第二閾值根據具體情況確定;情況三、確定第二類資源的使用率大於第一閾值,且,目的機構的平均交易時間不小於第二閾值,說明第二類資源緊張且目的機構的交易處理速度異常,則停止為待處理交易分配資源;情況四、確定第二類資源的使用率大於第一閾值,目的機構的平均交易時間不小於第二閾值,目的機構當前佔用的資源不小於第三閾值時,說明第二類資源緊張,目的機構的交易處理速度異常且佔用大量的資源,則停止為待處理交易分配資源,其中目的機構當前佔用的資源是根據目的機構在設定時間段內的交易資料確定的。 When the current resource usage of the target institution exceeds the preset resource usage of the target institution, allocate resources for the pending transaction from the second type of resources, including the following four situations: Case 1: Determine the utilization rate of the second type of resources When it is not greater than the first threshold, it means that the second type of resources is sufficient, then allocate resources from the second type of resources for the transaction to be processed; Case 2, when it is determined that the utilization rate of the second type of resources is greater than the first threshold, and The average transaction time is less than the second threshold, indicating that the second type of resources is tight and the transaction processing speed of the destination institution is normal, then resources are allocated from the second type of resources for pending transactions. Among them, the average transaction time of the target institution is determined based on the transaction data of the target institution within the set time period, and the second threshold is determined according to the specific situation; case three, the utilization rate of the second type of resource is determined to be greater than the first threshold, and, the purpose The average transaction time of the institution is not less than the second threshold, indicating that the second type of resources is tight and the target institution's transaction processing speed is abnormal, then stop allocating resources for the pending transactions; Case four, determine that the utilization rate of the second type of resources is greater than the first threshold , The average transaction time of the destination institution is not less than the second threshold, and the resources currently occupied by the destination institution are not less than the third threshold, indicating that the second type of resources is tight, the transaction speed of the destination institution is abnormal and takes up a lot of resources, then stop waiting Allocate resources for processing transactions, in which the resources currently occupied by the target institution are determined according to the transaction data of the target institution within a set time period.

本發明實施例中,通過即時監測第二類資源的使用率,當第二類資源充足時,直接將第二類資源配置給待處理交易,當第二類資源不足時,對目的機構的狀態進行判斷,並根據目的機構的狀態為待處理交易分配資源,從而一方面將使第二類資源得到充分利用,另一方面避免了異 常機構大量地佔用資源導致系統擁堵。 In the embodiment of the present invention, by monitoring the utilization rate of the second type resources in real time, when the second type resources are sufficient, the second type resources are directly allocated to the pending transaction, and when the second type resources are insufficient, the status of the target institution Make judgments and allocate resources for pending transactions according to the status of the target institution, so that on the one hand, the second type of resources will be fully utilized, and on the other hand, it will avoid system congestion caused by abnormal institutions occupying a lot of resources.

進一步地,當第二類資源的使用率大於第一閾值時,除上述實施例中介紹的根據目的機構的狀態分配資源之外,還需對應調整第一類資源的分配情況以緩解第二資源的使用壓力,具體包括以下五種情況:情況一、若第二類資源的使用率大於第一閾值,且,目的機構的平均交易時間小於第二閾值,則從第二類資源中為待處理交易分配資源之後,根據目的機構在設定時間段內的交易資料確定目的機構當前佔用的資源,在確定目的機構當前佔用的資源大於第三閾值時,說明目的機構正處於行銷狀態,需要大量的資源進行交易,則增加目的機構的預設資源,其中預設資源為第一類資源中預先分配給目的機構的資源,可通過調整權重的方法調整目的機構的預設資源,也可以通過調整第一類資源的總資源來調整目的機構的預設資源;情況二、若第二類資源的使用率大於第一閾值,且,目的機構的平均交易時間小於第二閾值,則從第二類資源中為待處理交易分配資源之後,根據目的機構在設定時間段內的交易資料確定目的機構當前佔用的資源,在確定目的機構當前佔用的資源不大於第三閾值時,則不調整目的機構的預設資源;情況三、若第二類資源的使用率大於第一閾值,且,目的機構的平均交易時間不小於第二閾值,說明第二類資源緊張,而此時目的機構處於異常狀態,則減少目的機構的預設資源;情況四、若第二類資源的使用率大於第一閾值,目的機構的平均交易時間不小於第二閾值,目的機構當前佔用的資源不小於第三閾值時,說明 第二類資源緊張,而此時目的機構處於異常狀態,且佔用了大量的資源,則減少目的機構的預設資源;情況五、從第二類資源中為待處理交易分配資源之後,統計目的機構利用第二類資源進行交易的交易量,在確定交易量大於第四閾值時,說明第一類資源中預先分配給目的機構的資源已經不能滿足目的機構的交易需求,則增加目的機構的預設資源。 Further, when the utilization rate of the second type of resource is greater than the first threshold, in addition to allocating resources according to the status of the destination institution described in the above embodiment, the allocation of the first type of resource needs to be adjusted accordingly to alleviate the second resource The usage pressure includes the following five situations: Case 1. If the utilization rate of the second type of resources is greater than the first threshold, and the average transaction time of the target institution is less than the second threshold, then the second type of resources is pending After the transaction allocates resources, determine the resources currently occupied by the target institution based on the transaction data of the target institution within the set time period. When it is determined that the resources currently occupied by the target institution are greater than the third threshold, it indicates that the target institution is in a marketing state and requires a large amount of resources For transactions, the preset resources of the target institution are added, where the preset resources are the resources of the first type of resources pre-allocated to the target institution. The preset resources of the target institution can be adjusted by adjusting the weight, or by adjusting the first The total resources of the type of resources are used to adjust the preset resources of the target institution; Case 2: If the utilization rate of the second type of resources is greater than the first threshold, and the average transaction time of the target institution is less than the second threshold, then from the second type of resources After allocating resources for the transaction to be processed, determine the resources currently occupied by the target institution based on the transaction data of the target institution within the set time period. When it is determined that the resources currently occupied by the target institution are not greater than the third threshold, the preset of the target institution is not adjusted Resources; Case 3. If the utilization rate of the second type of resources is greater than the first threshold, and the average transaction time of the target institution is not less than the second threshold, it means that the second type of resources is tight, and the target institution is in an abnormal state at this time, it is reduced The preset resources of the destination institution; Case 4. If the utilization rate of the second type of resources is greater than the first threshold, the average transaction time of the destination institution is not less than the second threshold, and the resources currently occupied by the destination institution are not less than the third threshold, the The second type of resources is tight, and the target institution is in an abnormal state at this time, and it takes up a lot of resources, then the preset resources of the target institution are reduced; case five, after allocating resources for the transaction to be processed from the second type of resources, the target institution The transaction volume of the second type of resources is used to determine the transaction volume is greater than the fourth threshold, indicating that the resources of the first type of resources allocated to the target institution in advance can no longer meet the target institution's transaction needs, then increase the target institution's preset Resources.

本發明實施例中,即時監測第二類資源的使用率以及目的機構當前佔用的資源,同時統計目的機構利用第二類資源進行交易的次數,然後根據第二類資源的使用率、目的機構當前佔用的資源以及利用第二類資源進行交易的次數即時調整目的機構的預設資源,有利於目的機構的交易順利進行,同時也可減小第二類資源的使用壓力。 In the embodiment of the present invention, the utilization rate of the second type of resources and the resources currently occupied by the target institution are monitored in real time, and the number of transactions performed by the target institution using the second type of resources is counted. The occupied resources and the number of transactions using the second type of resources can adjust the preset resources of the target institution in real time, which is conducive to the smooth progress of the transaction of the target institution and can also reduce the pressure on the use of the second type of resources.

為了更好的解釋本發明實施例,下面通過具體的實施場景描述本發明實施例提供的一種資源配置方法的流程,如圖3所示:步驟S301,獲取目的機構的待處理交易;步驟S302,確定目的機構當前佔用的資源;步驟S303,確定目的機構當前的資源占比;步驟S304,判斷目的機構當前的資源占比是否小於目的機構的預設資源占比,若是則執行步驟S305,否則執行步驟S306;步驟S305,將預先分配給目的機構的資源配置給待處理交易;步驟S306,判斷第二類資源的使用率是否大於第一閾值,若是則執行步驟S307,否則執行步驟S312;步驟S307,判斷目的機構的平均交易時間是否小於第二閾值,若是則 執行步驟S308,否則執行步驟S311;步驟S308,判斷目的機構當前佔用的資源是否大於第三閾值,若是則執行步驟S309,否則執行步驟S310;步驟S309,將第二類資源配置給待處理交易並提高目的機構的預設資源占比;步驟S310,將第二類資源配置給待處理交易;步驟S311,停止向待處理交易分配資源並降低目的機構的預設資源占比;步驟S312,將第二類資源配置給待處理交易。 In order to better explain the embodiments of the present invention, the following describes the flow of a resource configuration method provided by the embodiments of the present invention through specific implementation scenarios, as shown in FIG. 3: Step S301, obtaining pending transactions of the target institution; Step S302, Determine the resources currently occupied by the destination institution; Step S303, determine the current resource ratio of the destination institution; Step S304, determine whether the current resource ratio of the destination institution is less than the preset resource ratio of the destination institution, if yes, perform step S305, otherwise execute Step S306; Step S305, allocate resources pre-allocated to the target institution to the transaction to be processed; Step S306, determine whether the utilization rate of the second type of resource is greater than the first threshold, if yes, perform Step S307, otherwise execute Step S312; Step S307 , Determine whether the average transaction time of the target institution is less than the second threshold, if so, perform step S308, otherwise perform step S311; step S308, determine whether the resource currently occupied by the target institution is greater than the third threshold, if yes, execute step S309, otherwise perform step S310; Step S309, allocate the second type of resources to the pending transaction and increase the target organization's preset resource ratio; Step S310, allocate the second type of resources to the pending transaction; Step S311, stop allocating resources to the pending transaction And reduce the proportion of the preset resources of the target institution; Step S312, allocate the second type of resources to the pending transaction.

除上述實施例中介紹的資源配置方法之外,本發明還提供了另一種資源配置方法的實施例,即將目的機構的平均交易時間和目的機構當前佔用的資源結合判斷目的機構的狀態,根據目的機構的狀態進行資源配置。下面以具體的例子進行介紹,設定執行緒池中的總執行緒數為150,設定時間段時長為20秒,其中100×20=2000線程秒為第一類資源、50×20=1000線程秒為第二類資源,設定第一閾值為80%,假設共有5個機構,機構號分別為A1、A2、A3、A4、A5,這5個機構預先分配資源的情況如表1所示: In addition to the resource allocation method described in the above embodiments, the present invention also provides another embodiment of the resource allocation method, which combines the average transaction time of the target institution and the resources currently occupied by the target institution to determine the status of the target institution, according to the purpose Resource allocation based on the status of the organization. The following is a specific example to introduce, set the total number of threads in the thread pool to 150, set the time period to 20 seconds, of which 100 × 20 = 2000 thread seconds for the first type of resources, 50 × 20 = 1000 threads Second is the second type of resource, and the first threshold is set to 80%. Suppose there are 5 institutions with institution numbers of A1, A2, A3, A4, and A5. The situation of these 5 institutions pre-allocating resources is shown in Table 1:

如表1所示,按照這5個機構的歷史交易資料確定預先分配給各個機構的資源的權重,進一步計算對應得到各個機構的預設資源占比。 As shown in Table 1, according to the historical transaction data of these five institutions, the weights of resources allocated to each institution in advance are determined, and the proportion of preset resources corresponding to each institution is further calculated.

然後確定各機構當前的資源占比,設定機構A1在設定時間段內共有10000次交易,平均交易時間為10毫秒,那麼機構A1當前佔用的資源為10000×10/1000=100線程秒,機構A1當前的資源占比為100/(20×100)=0.05。 Then determine the current resource ratio of each institution. Set institution A1 to have a total of 10,000 transactions in the set time period. The average transaction time is 10 milliseconds, then the resources currently occupied by institution A1 are 10000×10/1000=100 thread seconds, institution A1 The current resource ratio is 100/(20×100)=0.05.

設定機構A2在設定時間段內共有20000次交易,平均交易時間為30毫秒,那麼機構A2當前佔用的資源為20000×30/1000=600線程秒,機構A2當前的資源占比為600/(20×100)=0.3。 Set institution A2 to have a total of 20,000 transactions in the set time period, the average transaction time is 30 milliseconds, then the resources currently occupied by institution A2 are 20000×30/1000=600 thread seconds, and the current resource ratio of institution A2 is 600/(20 ×100)=0.3.

設定機構A3在設定時間段內共有20000次交易,平均交易時間為15毫秒,那麼機構A3當前佔用的資源為20000×15/1000=300線程秒,機構A3當前的資源占比為300/(20×100)=0.15。 Set institution A3 to have a total of 20,000 transactions in the set time period, the average transaction time is 15 milliseconds, then the resources currently occupied by institution A3 are 20000×15/1000=300 thread seconds, and the current resource ratio of institution A3 is 300/(20 ×100)=0.15.

設定機構A4在設定時間段內共有80000次交易,平均交易時間為10毫秒,那麼機構A4當前佔用的資源為8000×10/1000=800線程秒,機構A4當前的資源占比為800/(20×100)=0.4。 Set institution A4 to have a total of 80,000 transactions in the set time period, the average transaction time is 10 milliseconds, then the resources currently occupied by institution A4 are 8000×10/1000=800 thread seconds, and the current resource ratio of institution A4 is 800/(20 ×100)=0.4.

設定機構A5在設定時間段內共有20000次交易,平均交易時間為10毫秒,那麼機構A5當前佔用的資源為20000×10/1000=200線程秒,機構A4當前的資源占比為200/(20×100)=0.1。根據機構當前的資源占比和機構的預設資源比確定資源配置方式,具體如表2所示: Set institution A5 to have a total of 20,000 transactions in the set time period, the average transaction time is 10 milliseconds, then the resources currently occupied by institution A5 are 20000×10/1000=200 thread seconds, and the current resource ratio of institution A4 is 200/(20 ×100)=0.1. Determine the resource allocation method according to the organization's current resource ratio and the organization's preset resource ratio, as shown in Table 2:

由表2可知,機構A1、A5當前的交易可直接使用預先分配的資源,即第一類資源,機構A2、A3和A4當前的交易均需要利用第二類資源,下面具體介紹第二類資源的分配規則,若機構A2、A3和A4在利用第二類資源進行交易時,第二類資源的使用率均小於80%,則機構A2、A3和A4直接利用第二類資源處理交易。若機構A2、A3和A4在利用第二類資源進行處理交易時,第二類資源的使用率均大於80%,則需根據機構A2、A3和A4的在設定時間段內的交易資料確定資源配置規則,具體為:設定第二閾值為20毫秒,第三閾值為500線程秒,機構A2在設定時間段的平均交易時間為30毫秒,故機構A2在設定時間段的平均交易時間大於第二閾值,機構A2當前佔用的資源為600線程秒,故機構A2當前佔用的資源大於第三閾值,從而判斷機構A2處於異常狀態,則停止向機構A2的交易分配第二類資源,同時降低機構A2的預設資源占比。基於同樣的方法對機構A3和A4進行判斷,判斷結果為:機構A3當前佔用的資源小於第三閾值,則向機構A3的交易分配第二類資源;機構A4在設定時間段的平均交易時間小於第二閾值,機構A4當前佔用的資源大於第三閾值,從而判斷機構A4處於行銷狀態,則向機構A4的交易分配第二類資源,同時提高機構A4的預設資源占比。 As can be seen from Table 2, the current transactions of institutions A1 and A5 can directly use the pre-allocated resources, that is, the first type of resources. The current transactions of institutions A2, A3, and A4 all need to use the second type of resources. The second type of resources is specifically introduced below If the institutions A2, A3 and A4 use the second type of resources for transactions, the utilization rate of the second type of resources is less than 80%, then the institutions A2, A3 and A4 directly use the second type of resources to process the transactions. If institutions A2, A3 and A4 use the second type of resources to process transactions, the utilization rate of the second type of resources is greater than 80%, then the resources need to be determined according to the transaction data of institutions A2, A3 and A4 within the set time period Configuration rules, specifically: set the second threshold to 20 milliseconds, the third threshold to 500 thread seconds, and the average transaction time of institution A2 in the set time period is 30 milliseconds, so the average transaction time of institution A2 in the set time period is greater than the second Threshold, the resource currently occupied by institution A2 is 600 thread seconds, so the resource currently occupied by institution A2 is greater than the third threshold, so as to determine that institution A2 is in an abnormal state, then stop allocating the second type of resources to institution A2's transactions, while reducing institution A2 Of the default resource. Judging institutions A3 and A4 based on the same method, the judgment result is: the resources currently occupied by institution A3 are less than the third threshold, then the second type of resources is allocated to the transaction of institution A3; the average transaction time of institution A4 in the set time period is less than In the second threshold, the resource currently occupied by the institution A4 is greater than the third threshold, so as to determine that the institution A4 is in the marketing state, then the second type of resource is allocated to the transaction of the institution A4, and at the same time the proportion of the preset resource of the institution A4 is increased.

本發明實施例表明,獲取待處理交易並確定該待處理交易對應的目的機構;根據該目的機構在設定時間段內的交易資料確定該目的機 構當前的資源使用情況;確定該目的機構當前的資源使用情況是否超過該目的機構的預設資源使用情況,該預設資源使用情況為根據預先分配給該目的機構的資源與預先分配給所有機構的第一類資源確定的;若超過,則從第二類資源中為該待處理交易分配資源,該第二類資源為總資源中除該第一類資源之外的資源。本發明實施例中,將總資源分為第一類資源和第二類資源,第一類資源用於預先分配給所有機構,第二類資源為複用資源,當目的機構當前的資源使用情況超過目的機構的預設資源使用情況時,利用第二類資源為目的機構的待處理交易分配資源,故目的機構的待處理交易不會因為預先分配給目的機構的資源不足導致業務無法進行,既提高了交易的穩定性,又實現了資源的複用。 The embodiment of the present invention shows that obtaining the pending transaction and determining the target institution corresponding to the pending transaction; determining the current resource usage of the target institution based on the transaction data of the target institution within a set time period; determining the current resource of the target institution Whether the usage exceeds the target institution’s preset resource usage, which is determined based on the resources pre-allocated to the destination institution and the first type of resources pre-allocated to all institutions; The second type of resources is allocated resources for the pending transaction, and the second type of resources is resources other than the first type of resources in the total resources. In the embodiment of the present invention, the total resources are divided into the first type of resources and the second type of resources. The first type of resources is used for pre-allocation to all organizations, and the second type of resources is multiplexed resources. When the target organization's current resource usage is When the target institution’s preset resource usage is exceeded, the second type of resources is used to allocate resources for the target institution’s pending transactions, so the target institution’s pending transactions will not be unable to conduct business due to insufficient resources allocated to the target institution in advance. The stability of the transaction is improved, and the reuse of resources is realized.

基於相同構思,圖4示例性的示出了本發明實施例提供的一種資源配置裝置的結構,該裝置可以執行資源配置方法的流程。 Based on the same concept, FIG. 4 exemplarily shows the structure of a resource configuration apparatus provided by an embodiment of the present invention, and the apparatus can execute the flow of the resource configuration method.

如圖4所示,該裝置包括:獲取模組401,用於獲取待處理交易並確定該待處理交易對應的目的機構;處理模組402,用於根據該目的機構在設定時間段內的交易資料確定該目的機構當前的資源使用情況;確定該目的機構當前的資源使用情況是否超過該目的機構的預設資源使用情況,該預設資源使用情況為根據預先分配給該目的機構的資源與預先分配給所有機構的第一類資源確定的;若超過,則從第二類資源中為該待處理交易分配資源,該第二類資源為總資源中除該第一類資源之外的資源。 As shown in FIG. 4, the device includes: an acquisition module 401 for acquiring pending transactions and determining a target institution corresponding to the pending transaction; a processing module 402 for performing transactions within a set time period according to the target institution The information determines the current resource usage of the target institution; determines whether the current resource usage of the target institution exceeds the preset resource usage of the target institution. The preset resource usage is based on the resources and advances allocated to the target institution in advance. The first type of resources allocated to all institutions is determined; if it exceeds, then the resources to be processed are allocated from the second type of resources, and the second type of resources is the total resources except the first type of resources.

可選地,該處理模組402具體用於: 確定該第二類資源的使用率是否大於第一閾值;若該第二類資源的使用率不大於該第一閾值,則從該第二類資源中為該待處理交易分配資源;或,若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源;該目的機構的平均交易時間是根據該目的機構在設定時間段內的交易資料確定的。 Optionally, the processing module 402 is specifically configured to: determine whether the utilization rate of the second type of resource is greater than the first threshold; if the utilization rate of the second type of resource is not greater than the first threshold, then select from the second type Resources are allocated for the pending transaction; or, if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, then from the second type of resource is The pending transaction allocates resources; the average transaction time of the target institution is determined based on the transaction data of the target institution within a set time period.

可選地,該處理模組402還用於:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源之後,還包括:根據該目的機構在設定時間段內的交易資料確定該目的機構當前佔用的資源;在確定該目的機構當前佔用的資源大於第三閾值時,增加該目的機構的預設資源。 Optionally, the processing module 402 is also used to: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, then from the second type of resource After allocating resources for the pending transaction, it also includes: determining the resources currently occupied by the target institution according to the transaction data of the target institution within a set time period; when determining that the resources currently occupied by the target institution are greater than the third threshold, increase the The default resources of the target institution.

可選地,該處理模組402還用於:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間不小於該第二閾值,停止為該待處理交易分配資源,同時減少該目的機構的預設資源。 Optionally, the processing module 402 is further configured to: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is not less than the second threshold, stop the pending transaction Allocate resources while reducing the preset resources of the target institution.

可選地,該處理模組402還用於:從第二類資源中為該待處理交易分配資源之後,統計該目的機構利用該第二類資源進行交易的交易量; 在確定該交易量大於第四閾值時,增加該目的機構的預設資源。 Optionally, the processing module 402 is further configured to: after allocating resources for the transaction to be processed from the second type of resources, count the transaction volume of the target organization using the second type of resources for the transaction; when it is determined that the transaction volume is greater than At the fourth threshold, increase the preset resources of the target institution.

基於相同的發明構思,本發明實施例提供了一種計算設備,可用於執行上述資源配置方法流程。圖5為本發明實施例提供的一種計算設備的結構示意圖。該計算設備500包括收發器501、處理器502、記憶體503和通信介面504;其中,收發器501、處理器502、記憶體503和通信介面504通過匯流排505相互連接。 Based on the same inventive concept, an embodiment of the present invention provides a computing device, which can be used to execute the above resource configuration method flow. FIG. 5 is a schematic structural diagram of a computing device according to an embodiment of the present invention. The computing device 500 includes a transceiver 501, a processor 502, a memory 503, and a communication interface 504; wherein, the transceiver 501, processor 502, memory 503, and communication interface 504 are connected to each other through a bus 505.

其中,記憶體503用於存儲程式。具體地,程式可以包括程式碼,程式碼包括電腦操作指令。記憶體503可以為易失性記憶體(volatile memory),例如隨機存取記憶體(random-access memory,簡稱RAM);也可以為非易失性記憶體(non-volatile memory),例如快閃記憶體(flash memory),硬碟(hard disk drive,簡稱HDD)或固態硬碟(solid-state drive,簡稱SSD);還可以為上述任一種或任多種易失性記憶體和非易失性記憶體的組合。 Among them, the memory 503 is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory 503 may be a volatile memory (volatile memory), such as random-access memory (RAM for short); or a non-volatile memory (non-volatile memory), such as flash Memory (flash memory), hard disk drive (HDD) or solid-state drive (SSD); it can also be any one or more of the volatile memory and non-volatile Combination of memory.

記憶體503存儲了如下的元素,可執行模組或者資料結構,或者它們的子集,或者它們的擴展集:操作指令:包括各種操作指令,用於實現各種操作;作業系統:包括各種系統程式,用於實現各種基礎業務以及處理基於硬體的任務。 The memory 503 stores the following elements, executable modules or data structures, or their subsets, or their extended sets: operation instructions: including various operation instructions for implementing various operations; operating system: including various system programs , Used to implement various basic services and handle hardware-based tasks.

匯流排505可以是外設部件互連標準(peripheral component interconnect,簡稱PCI)匯流排或延伸工業標準架構(extended industry standard architecture,簡稱EISA)匯流排等。匯流排可以分為位址匯流排、資料匯流排、控制匯流排等。為便於表示,圖5中僅用一條粗線表示,但並不表示僅有一根匯流排或一種類型的匯流排。 The bus 505 may be a peripheral component interconnect (peripheral component interconnect, PCI for short) bus or an extended industry standard architecture (extended industry standard architecture, EISA for short) bus, or the like. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only a thick line is used in FIG. 5, but it does not mean that there is only one bus bar or one type of bus bar.

通信介面504可以為有線通信接入口,無線通訊介面或其組合,其中,有線通信介面例如可以為乙太網介面。乙太網介面可以是光介面,電介面或其組合。無線通訊介面可以為WLAN介面。 The communication interface 504 may be a wired communication access port, a wireless communication interface, or a combination thereof, wherein the wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a WLAN interface.

處理器502可以是中央處理器(central processing unit,簡稱CPU),網路處理器(network processor,簡稱NP)或者CPU和NP的組合。還可以是硬體晶片。上述硬體晶片可以是專用積體電路(application-specific integrated circuit,簡稱ASIC),可程式設計邏輯器件(programmable logic device,簡稱PLD)或其組合。上述PLD可以是複雜可程式設計邏輯器件(complex programmable logic device,簡稱CPLD),現場可程式設計邏輯閘陣列(field-programmable gate array,簡稱FPGA),通用陣列邏輯(generic array logic,簡稱GAL)或其任意組合。 The processor 502 may be a central processing unit (central processing unit, CPU for short), a network processor (NP for short), or a combination of CPU and NP. It can also be a hardware wafer. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or Any combination.

收發器501,用於獲取待處理交易並確定該待處理交易對應的目的機構;記憶體503,用於存儲程式指令;處理器502,用於根據該目的機構在設定時間段內的交易資料確定該目的機構當前的資源使用情況;確定該目的機構當前的資源使用情況是否超過該目的機構的預設資源使用情況,該預設資源使用情況為根據預先分配給該目的機構的資源與預先分配給所有機構的第一類資源確定的;若超過,則從第二類資源中為該待處理交易分配資源,該第二類資源為總資源中除該第一類資源之外的資源。 The transceiver 501 is used to obtain the pending transaction and determine the target institution corresponding to the pending transaction; the memory 503 is used to store program instructions; the processor 502 is used to determine the transaction data of the target institution within a set time period The current resource usage of the target institution; determine whether the current resource usage of the target institution exceeds the preset resource usage of the target institution. The preset resource usage is based on the resources pre-allocated to the target institution and pre-allocated to The first type of resources of all institutions is determined; if it exceeds, then the resources to be processed are allocated from the second type of resources, and the second type of resources is the total resources except the first type of resources.

可選地,該處理器502,具體用於:確定該第二類資源的使用率是否大於第一閾值;若該第二類資源的使用率不大於該第一閾值,則 從該第二類資源中為該待處理交易分配資源;或,若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源;該目的機構的平均交易時間是根據該目的機構在設定時間段內的交易資料確定的。 Optionally, the processor 502 is specifically configured to: determine whether the utilization rate of the second type of resource is greater than the first threshold; if the utilization rate of the second type of resource is not greater than the first threshold, then select from the second type Resources are allocated for the pending transaction; or, if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, then from the second type of resource is The pending transaction allocates resources; the average transaction time of the target institution is determined based on the transaction data of the target institution within a set time period.

可選地,該處理器502,還用於:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源之後,還包括:根據該目的機構在設定時間段內的交易資料確定該目的機構當前佔用的資源;在確定該目的機構當前佔用的資源大於第三閾值時,增加該目的機構的預設資源。 Optionally, the processor 502 is also used to: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, then from the second type of resource After allocating resources for the pending transaction, it also includes: determining the resources currently occupied by the target institution according to the transaction data of the target institution within a set time period; when determining that the resources currently occupied by the target institution are greater than the third threshold, increase the The default resources of the target institution.

可選地,該處理器502,還用於:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間不小於該第二閾值,停止為該待處理交易分配資源,同時減少該目的機構的預設資源。 Optionally, the processor 502 is further configured to: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is not less than the second threshold, stop the pending transaction Allocate resources while reducing the preset resources of the target institution.

可選地,該處理器502,還用於:從第二類資源中為該待處理交易分配資源之後,統計該目的機構利用該第二類資源進行交易的交易量;在確定該交易量大於第四閾值時,增加該目的機構的預設資源。 Optionally, the processor 502 is further configured to: after allocating resources for the transaction to be processed from the second type of resources, count the transaction volume of the transaction performed by the destination institution using the second type of resources; when it is determined that the transaction volume is greater than At the fourth threshold, increase the preset resources of the target institution.

基於相同的發明構思,本發明實施例提供了一種電腦可讀存儲介質,用於儲存為上述計算設備所用的電腦程式指令,其包含用於執行上述資源配置方法的程式。 Based on the same inventive concept, embodiments of the present invention provide a computer-readable storage medium for storing computer program instructions used by the above computing device, which includes programs for executing the above resource allocation method.

該電腦存儲介質可以是電腦能夠存取的任何可用介質或資料存放裝置,包括但不限於磁性記憶體(例如,軟碟、硬碟、磁帶、磁光碟(MO)等)、光學記憶體(例如CD、DVD、BD、HVD等)、以及半導體 記憶體(例如ROM、EPROM、EEPROM、非易失性記憶體(NAND FLASH)、固態硬碟(SSD))等。 The computer storage medium may be any available medium or data storage device that can be accessed by the computer, including but not limited to magnetic memory (for example, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical memory (for example CD, DVD, BD, HVD, etc.), and semiconductor memory (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid state drive (SSD)), etc.

基於相同的發明構思,本發明實施例提供一種電腦程式產品,該電腦程式產品包括存儲在非暫態電腦可讀存儲介質上的計算程式,該電腦程式包括程式指令,當該程式指令被電腦執行時,使該電腦執行第上述資源配置方法。 Based on the same inventive concept, embodiments of the present invention provide a computer program product, the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by the computer At this time, make the computer execute the first resource allocation method.

由上述內容可以看出:本發明實施例表明,獲取待處理交易並確定該待處理交易對應的目的機構;然後根據該目的機構在設定時間段內的交易資料確定該目的機構當前的資源使用情況;確定該目的機構當前的資源使用情況是否超過該目的機構的預設資源使用情況,該預設資源使用情況為根據預先分配給該目的機構的資源與預先分配給所有機構的第一類資源確定的;若超過,則從第二類資源中為該待處理交易分配資源,該第二類資源為總資源中除該第一類資源之外的資源。本發明實施例中,將總資源分為第一類資源和第二類資源,第一類資源用於預先分配給所有機構,第二類資源為複用資源,當目的機構當前的資源使用情況超過目的機構的預設資源使用情況時,利用第二類資源為目的機構的待處理交易分配資源,故目的機構的待處理交易不會因為預先分配給目的機構的資源不足導致業務無法進行,既提高了交易的穩定性,又實現了資源的複用。 It can be seen from the above: the embodiment of the present invention shows that obtaining the pending transaction and determining the target institution corresponding to the pending transaction; and then determining the current resource usage of the target institution based on the transaction data of the target institution within a set time period ; Determine whether the current resource usage of the target institution exceeds the preset resource usage of the target institution, which is determined based on the resources pre-allocated to the target institution and the first type of resources pre-allocated to all institutions If it exceeds, then allocate resources for the pending transaction from the second type of resources, and the second type of resources is the total resources except the first type of resources. In the embodiment of the present invention, the total resources are divided into the first type of resources and the second type of resources. The first type of resources is used for pre-allocation to all organizations, and the second type of resources is multiplexed resources. When the target organization's current resource usage is When the target institution’s preset resource usage is exceeded, the second type of resources is used to allocate resources for the target institution’s pending transactions, so the target institution’s pending transactions will not be unable to conduct business due to insufficient resources allocated to the target institution in advance. The stability of the transaction is improved, and the reuse of resources is realized.

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

本發明是參照根據本發明實施例的方法、設備(系統)、和電腦程式產品的流程圖和/或方框圖來描述的。應理解可由電腦程式指令實現流程圖和/或方框圖中的每一流程和/或方框、以及流程圖和/或方框圖中的流程和/或方框的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式設計資料處理設備的處理器以產生一個機器,使得通過電腦或其他可程式設計資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能的裝置。 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 may be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine that allows instructions executed by the processor of the computer or other programmable data processing device Means for generating the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.

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

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

儘管已描述了本發明的優選實施例,但本領域內的技術人員一旦得知了基本進步性概念,則可對這些實施例作出另外的變更和修改。所以,所附申請專利範圍意欲解釋為包括優選實施例以及落入本發明範圍 的所有變更和修改。 Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic progressive concept. Therefore, the scope of the attached patent application is intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present 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 of the present invention and the scope of its equivalent technology, the present invention is also intended to include these modifications and variations.

Claims (13)

一種資源配置方法,其特徵在於,包括:獲取待處理交易並確定該待處理交易對應的目的機構;根據該目的機構在設定時間段內的交易資料確定該目的機構當前的資源使用情況;確定該目的機構當前的資源使用情況是否超過該目的機構的預設資源使用情況,該預設資源使用情況為根據預先分配給該目的機構的資源與預先分配給所有機構的第一類資源確定的;若超過,則從第二類資源中為該待處理交易分配資源,該第二類資源為總資源中除該第一類資源之外的資源。 A resource allocation method, comprising: obtaining a pending transaction and determining a target institution corresponding to the pending transaction; determining the current resource usage of the target institution according to the transaction data of the target institution within a set time period; determining the Whether the current resource usage of the target institution exceeds the preset resource usage of the target institution, which is determined based on the resources pre-allocated to the target institution and the first type resources pre-allocated to all institutions; if If it exceeds, then resources are allocated for the transaction to be processed from the second type of resources, and the second type of resources is resources other than the first type of resources among the total resources. 如請求項1所述的資源配置方法,其中,該從第二類資源中為該待處理交易分配資源,包括:確定該第二類資源的使用率是否大於第一閾值;若該第二類資源的使用率不大於該第一閾值,則從該第二類資源中為該待處理交易分配資源;或,若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源;該目的機構的平均交易時間是根據該目的機構在設定時間段內的交易資料確定的。 The resource configuration method according to claim 1, wherein the allocating resources for the pending transaction from the second type of resources includes: determining whether the utilization rate of the second type of resources is greater than a first threshold; if the second type If the utilization rate of the resource is not greater than the first threshold, then allocate resources for the pending transaction from the second type of resource; or, if the utilization rate of the second type of resource is greater than the first threshold, and the target institution’s If the average transaction time is less than the second threshold, the second type of resource is allocated resources for the pending transaction; the average transaction time of the target institution is determined based on the transaction data of the target institution within a set time period. 如請求項2所述的資源配置方法,其中,還包括:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源之後,還包括:根據該目的機構在設定時間段內的交易資料確定該目的機構當前佔用的資源;在確定該目的機構當前佔用的資源大於第三閾值時,增加該目的機構的 預設資源。 The resource allocation method according to claim 2, further comprising: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, then from the second After allocating resources for the pending transaction in the category of resources, it also includes: determining the resources currently occupied by the target institution according to the transaction data of the target institution within a set time period; when determining that the resources currently occupied by the target institution are greater than the third threshold , Increase the preset resources of the target institution. 如請求項2所述的資源配置方法,其中,還包括:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間不小於該第二閾值,停止為該待處理交易分配資源,同時減少該目的機構的預設資源。 The resource allocation method according to claim 2, further comprising: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the target institution is not less than the second threshold, stop Pending transactions allocate resources while reducing the preset resources of the target institution. 如請求項1至4中任一項所述的資源配置方法,其中,該從第二類資源中為該待處理交易分配資源之後,還包括:統計該目的機構利用該第二類資源進行交易的交易量;在確定該交易量大於第四閾值時,增加該目的機構的預設資源。 The resource allocation method according to any one of claims 1 to 4, wherein after allocating resources for the transaction to be processed from the second type of resources, the method further includes: counting that the target institution uses the second type of resources for transactions When the transaction volume is determined to be greater than the fourth threshold, increase the preset resources of the target institution. 一種資源配置裝置,其特徵在於,包括:獲取模組,用於獲取待處理交易並確定該待處理交易對應的目的機構;處理模組,用於根據該目的機構在設定時間段內的交易資料確定該目的機構當前的資源使用情況;確定該目的機構當前的資源使用情況是否超過該目的機構的預設資源使用情況,該預設資源使用情況為根據預先分配給該目的機構的資源與預先分配給所有機構的第一類資源確定的;若超過,則從第二類資源中為該待處理交易分配資源,該第二類資源為總資源中除該第一類資源之外的資源。 A resource allocation device is characterized by comprising: an acquisition module for acquiring a pending transaction and determining a target institution corresponding to the pending transaction; a processing module for determining the transaction data of the target institution within a set time period Determine the current resource usage of the target institution; determine whether the current resource usage of the target institution exceeds the preset resource usage of the target institution, the preset resource usage is based on the pre-allocated resources and pre-allocation of the target institution Determined for the first type of resources of all institutions; if it exceeds, then allocate resources for the pending transaction from the second type of resources, and the second type of resources is the total resources except the first type of resources. 如請求項6所述的資源配置裝置,其中,該處理模組具體用於:確定該第二類資源的使用率是否大於第一閾值;若該第二類資源的使用率不大於該第一閾值,則從該第二類資源中為該待處理交易分配資源;或,若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源;該目的機構的平均交易時間是根據該目的機構在設定時間段內的交易資料確定的。 The resource configuration device according to claim 6, wherein the processing module is specifically configured to: determine whether the utilization rate of the second type resource is greater than the first threshold; if the utilization rate of the second type resource is not greater than the first Threshold, then allocate resources for the pending transaction from the second type of resource; or, if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, then Assign resources to the pending transaction from the second type of resources; the average transaction time of the target institution is determined according to the transaction data of the target institution within a set time period. 如請求項7所述的資源配置裝置,其中,該處理模組還用於:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易 時間小於第二閾值,則從該第二類資源中為該待處理交易分配資源之後,還包括:根據該目的機構在設定時間段內的交易資料確定該目的機構當前佔用的資源;在確定該目的機構當前佔用的資源大於第三閾值時,增加該目的機構的預設資源。 The resource allocation device according to claim 7, wherein the processing module is further configured to: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is less than the second threshold, Then, after allocating resources for the pending transaction from the second type of resources, it also includes: determining the resources currently occupied by the destination institution based on the transaction data of the destination institution within a set time period; determining the resources currently occupied by the destination institution When it is greater than the third threshold, the preset resources of the target institution are increased. 如請求項7所述的資源配置裝置,其中,該處理模組還用於:若該第二類資源的使用率大於該第一閾值,且,該目的機構的平均交易時間不小於該第二閾值,停止為該待處理交易分配資源,同時減少該目的機構的預設資源。 The resource allocation device according to claim 7, wherein the processing module is further configured to: if the utilization rate of the second type of resource is greater than the first threshold, and the average transaction time of the destination institution is not less than the second Threshold, stop allocating resources for the pending transaction, and reduce the preset resources of the target institution. 如請求項6至9中任一項所述的資源配置裝置,其中,該處理模組還用於:從第二類資源中為該待處理交易分配資源之後,統計該目的機構利用該第二類資源進行交易的交易量;在確定該交易量大於第四閾值時,增加該目的機構的預設資源。 The resource configuration device according to any one of claims 6 to 9, wherein the processing module is further configured to: after allocating resources for the transaction to be processed from the second type of resources, count the use of the second The transaction volume of such resources; when it is determined that the transaction volume is greater than the fourth threshold, increase the preset resources of the target institution. 一種計算設備,其特徵在於,該電腦設備包括:收發器,用於獲取待處理交易並確定該待處理交易對應的目的機構;記憶體,用於存儲程式指令;處理器,用於調用該記憶體中存儲的程式指令,按照獲得的程式執行請求項1至5中任一項所述的方法。 A computing device, characterized in that the computer device includes: a transceiver for acquiring a pending transaction and determining a target mechanism corresponding to the pending transaction; a memory for storing program instructions; a processor for calling the memory The program instructions stored in the body execute the method described in any one of the request items 1 to 5 according to the obtained program. 一種電腦存儲介質,其特徵在於,該電腦可讀存儲介質存儲有電腦可執行指令,該電腦可執行指令用於使該電腦執行請求項1至5中任一項所述的方法。 A computer storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions for causing the computer to execute the method according to any one of request items 1 to 5. 一種電腦程式產品,其特徵在於,該電腦程式產品包括存儲在非暫態電腦可讀存儲介質上的計算程式,該電腦程式包括程式指令,當該程式指令被電腦執行時,使該電腦執行請求項1~5任一項該方法。 A computer program product, characterized in that the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by the computer, the computer is caused to execute a request Item 1~5 any of this method.
TW107125302A 2017-07-24 2018-07-23 Resource configuration method and device TWI688905B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201710606745.6A CN107292741B (en) 2017-07-24 2017-07-24 Resource allocation method and device
??201710606745.6 2017-07-24
CN201710606745.6 2017-07-24

Publications (2)

Publication Number Publication Date
TW201909048A true TW201909048A (en) 2019-03-01
TWI688905B TWI688905B (en) 2020-03-21

Family

ID=60102965

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107125302A TWI688905B (en) 2017-07-24 2018-07-23 Resource configuration method and device

Country Status (3)

Country Link
CN (1) CN107292741B (en)
TW (1) TWI688905B (en)
WO (1) WO2019019807A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107292741B (en) * 2017-07-24 2023-09-01 中国银联股份有限公司 Resource allocation method and device
CN111736981A (en) * 2019-08-01 2020-10-02 北京京东尚科信息技术有限公司 Container resource allocation method, device, equipment and storage medium
CN112130997B (en) * 2020-09-22 2022-09-20 新华三大数据技术有限公司 Resource allocation method and device
CN112529435A (en) * 2020-12-17 2021-03-19 中国农业银行股份有限公司 Resource allocation method and device
CN112596503B (en) * 2020-12-18 2022-04-22 浙江中控技术股份有限公司 Configuration method for scanning period of control system and related equipment
CN112783907B (en) * 2020-12-31 2024-06-07 深圳云天励飞技术股份有限公司 Data updating method, application end data updating method and related products
CN114722278B (en) * 2022-03-31 2024-03-08 北京金堤科技有限公司 Information pushing method and device, storage medium and electronic equipment
CN114844834B (en) * 2022-04-29 2024-04-26 中国建设银行股份有限公司 Method and device for adjusting flow control threshold, electronic equipment, medium and product
CN114980333B (en) * 2022-05-20 2024-05-14 中国联合网络通信集团有限公司 Verification method and device of resource allocation result, electronic equipment and storage medium
CN117236903B (en) * 2023-11-09 2024-05-10 浙江浙商互联信息科技有限公司 Intelligent management method and system for high-speed service area

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6546402B1 (en) * 2000-06-05 2003-04-08 International Business Machines Corporation System and method for asynchronous view maintenance
CN102811154B (en) * 2011-05-31 2015-01-07 阿里巴巴集团控股有限公司 Resource acquisition method and network server system
US20130031327A1 (en) * 2011-07-28 2013-01-31 Yung Chang System and method for allocating cache memory
CN103426040A (en) * 2012-05-14 2013-12-04 中国银联股份有限公司 Research and development management system
TW201435609A (en) * 2013-03-11 2014-09-16 Chunghwa Telecom Co Ltd Method for asynchronously monitoring data change among multiple devices
CN103559093B (en) * 2013-11-15 2016-11-16 北京中指实证数据信息技术有限公司 The collocation method of a kind of server resource and device
KR101491572B1 (en) * 2013-12-09 2015-02-10 삼성증권주식회사 Trading system performing dynamic resource management and providing method thereof
US20160027112A1 (en) * 2014-07-24 2016-01-28 Rivada Networks, Llc Broadband Orthogonal Resource Grouping
CN105988858A (en) * 2015-05-15 2016-10-05 中国银联股份有限公司 Virtual machine resource scheduling method, device and system
CN105678620A (en) * 2016-01-07 2016-06-15 深圳市金证科技股份有限公司 Resource scheduling method and system for transaction system
CN107292741B (en) * 2017-07-24 2023-09-01 中国银联股份有限公司 Resource allocation method and device

Also Published As

Publication number Publication date
CN107292741B (en) 2023-09-01
WO2019019807A1 (en) 2019-01-31
CN107292741A (en) 2017-10-24
TWI688905B (en) 2020-03-21

Similar Documents

Publication Publication Date Title
TWI688905B (en) Resource configuration method and device
CN106095590B (en) A kind of method for allocating tasks and device based on thread pool
US20190087090A1 (en) Method and device for scheduling virtual disk input and output ports
CN107239336B (en) Method and device for realizing task scheduling
WO2018177012A1 (en) Method, apparatus and device for controlling bandwidth
CN108989238A (en) Method for distributing service bandwidth and related equipment
WO2015101091A1 (en) Distributed resource scheduling method and device
CN107241281A (en) A kind of data processing method and its device
JP2012243325A5 (en)
CN103744808B (en) A kind of method and apparatus for being used to control I/O to ask
WO2020224531A1 (en) Method and device for assigning tokens in storage system
CN110599315A (en) Resource allocation method, device and equipment for multi-level account
WO2017000645A1 (en) Method and apparatus for allocating host resource
CN105892955A (en) Method and equipment for managing storage system
CN111190739A (en) Resource allocation method and device, electronic equipment and storage medium
US9063668B1 (en) Distributed memory allocation in multi-threaded programs
CN103703830B (en) A kind of physical resource adjustment, device and controller
CN115658311A (en) Resource scheduling method, device, equipment and medium
CN106550010A (en) A kind of real-time control distributed system calls external system to service the method and system of the frequency
CN113191546A (en) Resource allocation prediction method, resource management device and storage medium
CN104184685B (en) Data center resource distribution method, apparatus and system
WO2020233252A1 (en) Method and apparatus for diagnosing spark application
CN106933673A (en) Adjust the method and device of component logic number of threads
CN109697117A (en) Terminal control method, device and computer readable storage medium
CN107888517A (en) A kind of method and apparatus that domain is drawn for main frame