CN111367667B - Scheduling device, resource allocation method executed by scheduling device and distributed processing system - Google Patents

Scheduling device, resource allocation method executed by scheduling device and distributed processing system Download PDF

Info

Publication number
CN111367667B
CN111367667B CN202010133528.1A CN202010133528A CN111367667B CN 111367667 B CN111367667 B CN 111367667B CN 202010133528 A CN202010133528 A CN 202010133528A CN 111367667 B CN111367667 B CN 111367667B
Authority
CN
China
Prior art keywords
resource
server
secondary accounts
value
accounts
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010133528.1A
Other languages
Chinese (zh)
Other versions
CN111367667A (en
Inventor
卢翔
张鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NetsUnion Clearing Corp
Original Assignee
NetsUnion Clearing Corp
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 NetsUnion Clearing Corp filed Critical NetsUnion Clearing Corp
Priority to CN202010133528.1A priority Critical patent/CN111367667B/en
Priority to PCT/CN2020/098151 priority patent/WO2020259598A1/en
Priority to US17/620,482 priority patent/US20220270067A1/en
Publication of CN111367667A publication Critical patent/CN111367667A/en
Application granted granted Critical
Publication of CN111367667B publication Critical patent/CN111367667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Hardware Redundancy (AREA)

Abstract

A scheduling apparatus, a resource allocation method performed by the scheduling apparatus, and a distributed processing system are provided. The scheduling device is interacted with a first server and a second server, the first server is provided with a primary account, the second server is provided with m secondary accounts, and the primary account corresponds to the m secondary accounts. The resource allocation method comprises the following steps: determining resource reference values for the m secondary accounts according to m residual resource values of the m secondary accounts; transmitting a resource reference value to a second server so that the second server determines whether to transmit redundant resource values of each secondary account; receiving redundant resource values of n secondary accounts sent by a second server, and obtaining n redundant resource values; pushing n redundant resource values to the first server so that the first server determines allocated resource values allocated to k secondary accounts in the m secondary accounts; and sending the allocated resource value to the second server so that the second server updates the residual resource values of the k secondary accounts according to the allocated resource value.

Description

Scheduling device, resource allocation method executed by scheduling device and distributed processing system
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a scheduling apparatus, a resource allocation method performed by the scheduling apparatus, and a distributed processing system.
Background
To support the processing of highly concurrent real-time traffic, a distributed architecture is often used. In order to improve service continuity as much as possible, callable resources among the accounts stored by the data servers in the distributed system need to be equally divided.
In implementing the concepts of the present disclosure, the inventors found that at least the following problems exist in the prior art: when scheduling and balancing the callable resources of each account in the distributed system, the data servers stored in each account are often connected with each other, and each data server respectively reads the remaining resources of each account stored in other data servers except the data server to allocate the resources among each account. However, this method requires that each data server is connected to each other (for a distributed system composed of N data servers, the number of connections required is at least N |/2), so that the complexity of resource scheduling is high, and uniform allocation of resources cannot be achieved.
Disclosure of Invention
In view of this, the present disclosure provides a scheduling apparatus capable of effectively reducing scheduling complexity, a resource allocation method performed by the scheduling apparatus, and a distributed processing system.
One aspect of the present disclosure provides a resource allocation method performed by a scheduling apparatus, wherein the scheduling apparatus interacts with a first server and a second server, the first server is provided with a primary account, the second server is provided with m secondary accounts, and the primary account corresponds to the m secondary accounts. The resource allocation method comprises the following steps: determining resource reference values for the m secondary accounts according to m residual resource values of the m secondary accounts; transmitting a resource reference value to a second server to instruct the second server to determine whether to transmit the set redundant resource value of each secondary account; receiving redundant resource values of n secondary accounts sent by a second server, and obtaining n redundant resource values; pushing n redundant resource values to the first server to instruct the first server to determine allocated resource values allocated to k secondary accounts in the m secondary accounts; and sending the allocated resource value to the second server to instruct the second server to update the remaining resource values of the k secondary accounts according to the allocated resource value. Wherein m, n and k are positive integers, n is smaller than m, and k is smaller than or equal to m.
According to an embodiment of the present disclosure, the above-described resource allocation method further includes, before determining the resource reference values for the m secondary accounts: determining whether m residual resource values meet preset conditions; and determining resource reference values for the m secondary accounts under the condition that the m residual resource values meet preset conditions.
According to an embodiment of the present disclosure, determining whether the m remaining resource values satisfy the preset condition includes: determining the actual deviation degree and the actual deviation value of m residual resource values; and under the condition that the actual deviation degree is larger than the preset deviation degree and the actual deviation value is larger than the preset deviation value, determining that m residual resource values meet preset conditions.
According to an embodiment of the present disclosure, the above-mentioned resource allocation method further includes instructing the second server: under the condition that the redundant resource values of the n secondary accounts are determined to be sent, the redundant resource values of the n secondary accounts are updated; instruct the first server to: and updating the total value of the redundant resources of the primary account according to the n redundant resource values to obtain a first total value of the redundant resources. The determining the allocated resource value allocated to k secondary accounts in the m secondary accounts includes: determining l secondary accounts needing to be allocated with resources and l allocated resource values allocated to the l secondary accounts according to the first redundant resource total value and the residual resource values of the m secondary accounts; sequentially deducting l allocated resource values from the first redundant resource total value to obtain l deduction results for l secondary accounts; and determining the secondary accounts for which the deduction results represent successful deduction results in the l deduction results, and obtaining k secondary accounts. Wherein l is a positive integer, l is greater than or equal to k and l is less than or equal to m.
According to an embodiment of the present disclosure, determining l secondary accounts that require allocation of resources includes: the following operations are circularly executed by taking m as an initial value of p until the residual resource values of the p secondary accounts are smaller than the average value obtained by dividing the sum of the resource values by p: calculating the sum of the first redundant resource total value and the residual resource values of p secondary accounts to obtain a resource value sum; and determining an average value obtained by dividing the sum of the resource values by p; and determining secondary accounts with residual resource values smaller than the average value in the p secondary accounts to obtain q secondary accounts, and enabling p=q. And under the condition that the residual resource values of the p secondary accounts are smaller than the average value, determining the p secondary accounts as l secondary accounts, and q is a positive integer smaller than p.
According to an embodiment of the present disclosure, determining the l allocated resource values allocated to the l secondary accounts includes: and under the condition that the average value obtained by dividing the sum of the resource values and the l is an integer, determining that the allocated resource values respectively allocated to the l secondary accounts are as follows: the difference between the average value and the remaining resource value of each of the l secondary accounts; or under the condition that the average value obtained by dividing the sum of the resource values and the l is not an integer, determining that the allocated resource values allocated to the l secondary accounts are: the difference between the integer value rounded down from the average and the remaining resource value of each of the l secondary accounts.
According to an embodiment of the present disclosure, after instructing the first server to update the total value of the redundant resources of the primary account, the above-mentioned resource allocation method further includes: the first server is instructed to generate first running water data corresponding to the first total value of redundant resources.
According to an embodiment of the present disclosure, the subtracting the l allocated resource values from the first total redundant resource value sequentially includes: the following operations are performed successively until l subtraction results are obtained: deducting the ith allocated resource value from the first redundant resource total value to obtain a second redundant resource total value and an ith deduction result; and generating second pipeline data corresponding to the second total value of the redundant resources. The ith deduction result is used for representing whether the ith allocated resource value is successfully deducted, and i is a positive integer belonging to [1, l ].
According to an embodiment of the present disclosure, the above-mentioned resource allocation method further includes, after instructing the second server to send the redundant resource values of each of the n secondary accounts, performing the following operations: updating the residual resource values of the n secondary accounts and generating third water data, wherein the third water data corresponds to the updated residual resource values of the n secondary accounts; and/or the resource allocation method further comprises generating fourth running water data after the second server is instructed to update the residual resource values of the k secondary accounts, wherein the fourth running water data corresponds to the updated residual resource values of the k secondary accounts.
According to an embodiment of the present disclosure, determining the resource reference values for the m secondary accounts includes: the resource reference value of each secondary account in the m secondary accounts is determined as follows: average of m remaining resource values.
Another aspect of the present disclosure provides a scheduling apparatus that interacts with a first server provided with primary accounts and a second server provided with m secondary accounts, the primary accounts corresponding to the m secondary accounts. The scheduling device comprises: the resource reference value determining module is used for determining resource reference values for m secondary accounts according to m residual resource values of the m secondary accounts; the first indication module is used for sending the resource reference value to the second server so as to indicate the second server to determine whether to send the set redundant resource value of each secondary account; the redundant resource value receiving module is used for receiving the redundant resource values of the n secondary accounts sent by the second server to obtain n redundant resource values; and the second indicating module is used for pushing n redundant resource values to the first server so as to indicate the first server to determine the allocated resource values allocated to k secondary accounts in the m secondary accounts. The first indication module is further used for sending the allocated resource value to the second server so as to indicate the second server to update the residual resource values of the k secondary accounts according to the allocated resource value. Wherein m, n and k are positive integers, n is smaller than m, and k is smaller than or equal to m.
Another aspect of the present disclosure provides a distributed processing system including a scheduling apparatus, a server cluster, and a first server. The scheduling device is interacted with a first server and a second server, the first server is provided with a primary account, the second server is provided with m secondary accounts, and the primary account corresponds to the m secondary accounts. The server cluster comprises a second server for storing resources of m secondary accounts of the third party institution. The first server is used for storing resources of the primary account.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are configured to implement a resource allocation method performed by a scheduling apparatus as described above.
Another aspect of the present disclosure provides an electronic device comprising one or more processors; and a storage device for storing one or more programs. Wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the resource allocation method performed by the scheduling device as described above.
Another aspect of the present disclosure provides a computer program comprising computer executable instructions which, when executed, are for implementing a resource allocation method performed by a scheduling apparatus as described above.
According to the embodiment of the disclosure, the technical problems that the resource scheduling complexity is high and the resource cannot be uniformly dispersed can be at least partially solved. By adding the primary account and through interaction between the scheduling device and the first server and the second server, uniform allocation of resources of the plurality of secondary accounts can be achieved without interconnection between the second servers stored by the plurality of secondary accounts. Namely, each second server can finish the resource balance of the cross machine room and the cross servers only by carrying out the assembly of the resources of the second servers, and the technical effect of reducing the resource allocation difficulty is achieved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1A schematically illustrates a scheduling apparatus and a resource allocation method performed by the scheduling apparatus, and a system architecture of a distributed processing system, according to an embodiment of the present disclosure;
FIG. 1B schematically illustrates an account hierarchy diagram according to an embodiment of the present disclosure;
fig. 2 schematically illustrates a flowchart of a resource allocation method performed by a scheduling apparatus according to a first embodiment of the present disclosure;
Fig. 3A schematically illustrates a flowchart of a resource allocation method performed by a scheduling apparatus according to a second embodiment of the present disclosure;
FIG. 3B schematically illustrates a flowchart of determining whether a remaining resource value meets a preset condition, according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flowchart of a scheduler instructing a first server to perform operations according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart of determining l secondary accounts that require allocation of resources according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow chart for sequentially subtracting l allocated resource values from a first total value of excess resources, in accordance with an embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of a scheduling apparatus according to an embodiment of the disclosure;
FIG. 8 schematically illustrates a block diagram of a distributed processing system according to an embodiment of the present disclosure;
fig. 9 schematically illustrates a block diagram of a computer system adapted to implement a resource allocation method in accordance with an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Fig. 1A schematically illustrates a scheduling apparatus and a resource allocation method performed by the scheduling apparatus, and a system architecture 100 of a distributed processing system according to an embodiment of the present disclosure. FIG. 1B schematically illustrates an account hierarchy diagram according to an embodiment of the present disclosure. It should be noted that fig. 1A illustrates only an example of a system architecture in which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1A, a system architecture 100 of an embodiment of the present disclosure includes a first server 110, a scheduler 120, and a plurality of second servers 130. The scheduler 120 interacts with the first server 110 and the plurality of second servers 130 via a network. The network may include various connection types, such as wired, wireless communication links, and the like, among others.
Wherein the first server 110 may be a host process computer cluster (as master). The method is used for setting a platform-level primary account so as to store redundant resources paid on a plurality of secondary accounts, and determining the distributed resources distributed to each secondary account set by the same third party institution according to the redundant resources and the number of the secondary accounts set by the same third party institution. Wherein the secondary account may be set for a plurality of second servers 130. According to an embodiment of the present disclosure, the primary account corresponds to a plurality of secondary accounts set by the same third party authority. When the plurality of third party institutions set the secondary accounts through the second server, the plurality of primary accounts set in the first server are correspondingly arranged, so that the primary accounts are in one-to-one correspondence with the third party institutions set the secondary accounts, and the balanced distribution of resources among the plurality of secondary accounts set by the third party institutions is realized.
Each of the plurality of second servers 130 may be a sub-process computer cluster (as a worker), and each of the second servers may correspondingly set one or more IDC (Internet Data Center ) accounts, which are the secondary accounts described above. According to embodiments of the present disclosure, each second server may be connected to a third party authority, and provide the third party authority with one or more IDC accounts to process real-time access gold services of the third party authority. Wherein the same third party authority may connect to multiple second servers 130 simultaneously, for example, to use multiple IDC accounts. In order to improve service continuity as much as possible, it is necessary to ensure balanced allocation of multiple IDC account resources set to the third party authority.
In one embodiment, as shown in fig. 1B, the plurality of second servers 130 may provide six IDC accounts, for example, a first IDC account, a second IDC account, … …, and a sixth IDC account to a third party authority. The six IDC accounts correspond to the same platform-level primary account (i.e., the primary account set by the first service two described above). Each IDC account, for example, may include a plurality of tertiary accounts, which may include a plurality (e.g., n) of gold sub-accounts and a plurality (e.g., n) of gold sub-accounts. The remaining resource value of each IDC account may be, for example, the total amount of credits of the plurality of credit sub-accounts included in each IDC account minus the total amount of credits of the plurality of credit sub-accounts. Wherein n is a natural number greater than 1. It will be appreciated that the account hierarchy in fig. 1B is merely exemplary to facilitate an understanding of the present disclosure, and the present disclosure is not limited to the number of IDC accounts corresponding to each platform-level primary account, and the number of tertiary accounts each IDC account includes. The system architecture of FIG. 1A may provide an account hierarchy similar to that shown in FIG. 1B for any legitimate third party authority.
The dispatcher 120 may be, for example, various electronic devices with processing capabilities including, but not limited to, smartphones, tablets, laptop portable computers, desktop computers, servers, and the like. The scheduling device 120 is specifically configured to monitor the current available amounts of the IDC accounts, that is, the remaining resource values of the secondary accounts, stored in the second servers 130, so as to determine whether to allocate the resources of the secondary accounts set by the same third party institution according to the current available amounts of the secondary accounts. The scheduling device 120 is further configured to perform resource allocation by interacting with the second server and the first server stored in the plurality of secondary accounts when resources of the plurality of secondary accounts set by the same third party mechanism need to be allocated.
In accordance with embodiments of the present disclosure, where a plurality of second servers 130 access at least two third party institutions, the first server 120 may be a server cluster to store at least two primary accounts. In this case, in order to improve the scheduling efficiency, the scheduling apparatus 120 may be, for example, a computer cluster, so as to allocate resources in parallel. According to an embodiment of the present disclosure, the scheduling apparatus 120 may be integrated in any one of the plurality of second servers 130, or the scheduling apparatus 120 may be integrated in the first server 110, for example, or the scheduling apparatus 120 may be integrated in a server other than the first server 110 and the third server 130. Each primary account corresponds to a plurality of secondary accounts set for one third party authority.
It should be noted that, the resource allocation method provided by the embodiments of the present disclosure may be generally performed by the scheduling apparatus 120. Accordingly, the scheduling device provided in the embodiment of the present disclosure may be the scheduling device 120, and the distributed processing system provided in the embodiment of the present disclosure includes a server cluster formed by a first server 110, the scheduling device 120, and a second server connected by the same third party mechanism among a plurality of second servers 130.
It should be understood that the number and types of first server, scheduler, and second server in fig. 1A are merely illustrative. There may be any number and type of first servers, scheduling means and second servers, as desired for implementation.
Fig. 2 schematically shows a flowchart of a resource allocation method performed by the scheduling apparatus 120 according to a first embodiment of the present disclosure.
As shown in fig. 2, the resource allocation method includes operations S201, S203, S205, S207, and S209 to ensure balanced allocation of resources of m secondary accounts set by the same third party authority. The dispatcher 120 interacts with a first server 110 that sets a primary account and a second server 130 that stores the m secondary accounts, where the primary account corresponds to the m secondary accounts.
In operation S201, a resource reference value for m secondary accounts is determined according to m remaining resource values of the m secondary accounts.
The remaining resource value may be, for example, a current available credit for each IDC account of the plurality of IDC accounts set for the second server. Operation S201 is specifically configured to determine a reference available credit of the m IDC accounts according to the current available credit of the m IDC accounts. Wherein m is a positive integer.
The resource reference value is a reference value of the redundant resource value of the second server determining whether the m secondary accounts need to be transmitted to the scheduling apparatus in operation S203. In order to avoid the related interference of the resources between the IDC accounts, processing logic for average value pays may be used to instruct the second data server to determine whether to send the redundant resource value of each IDC account of the m IDC accounts with the average value of the remaining resource values of the m IDC accounts as a reference. Thus, in particular, in operation S201, the resource reference value of each secondary account of the m secondary accounts is determined to be an average value of m remaining resource values. I.e. the reference available amount is determined as an average of the current available amounts of the m IDC accounts.
It will be appreciated that the above description of the resource reference value being an average of m remaining resource values is merely an example to facilitate understanding of the present disclosure, and the specific value of the resource reference value is not limited by the present disclosure. The resource reference value may also be, for example, greater or less than the average of the m remaining resource values.
According to an embodiment of the present disclosure, each of the m secondary accounts may include, for example, a plurality of tertiary accounts, which may include a plurality of fund sub-accounts and a plurality of fund sub-accounts. The remaining resource value of each secondary account may be, for example, the total amount of funds included in the plurality of fund sub-accounts of each secondary account minus the total amount of funds included in the plurality of fund sub-accounts. It is to be understood that the above description of the secondary account and the remaining resource values of the secondary account is merely an example to facilitate an understanding of the present disclosure, which is not limited thereto.
In operation S203, the resource reference value is sent to the second data server to instruct the second server to determine whether to send the set redundant resource value of each secondary account.
According to an embodiment of the present disclosure, the operation S203 instructing the second server to perform may include, for example: firstly, determining whether redundant resource values of each secondary account in m secondary accounts are transmitted or not according to the resource reference value; and then updating the residual resource values of each of the n secondary accounts under the condition that the residual resource values of each of the n secondary accounts in the m secondary accounts are determined to be transmitted.
According to an embodiment of the present disclosure, the operation S203 may include, for example: the resource reference value determined in operation S201 is transmitted to each of one or more second servers storing m IDC accounts, and each second server is instructed to determine whether to transmit the excess resource value of its stored IDC account. The redundant resource value may be a difference between the redundant resource value and the reference resource value, and may specifically be a redundant value obtained by subtracting the reference available value from the current available value of the IDC account.
When the residual resource value is larger than the reference resource value, the current available quota of the IDC account stored by the second server is larger, and when the residual resource value is smaller than the reference resource value, the current available quota of the IDC account stored by the second server is smaller, and then the resources of the IDC account with larger residual resource value need to be allocated to the IDC account with smaller residual resource value. Thus, the operation of instructing the second server to determine whether to send the excess resource value for each of the m secondary accounts may comprise: indicating a second server to determine whether the redundant resource value of each secondary account is greater than 0, and if the redundant resource value is greater than 0, transmitting the redundant resource value of the secondary account; if the redundant resource value is less than or equal to 0, the redundant resource value of the secondary account does not need to be sent.
According to an embodiment of the disclosure, if it is determined that the redundant resource value of n secondary accounts of the m secondary accounts is greater than 0, it is determined to transmit the respective redundant resource values of the n secondary accounts. After the redundant resource values of the n secondary accounts are sent, in order to facilitate tracking and checking accounts, the second server may be instructed to update the redundant resource values of the n secondary accounts according to the sent redundant resource values of the n secondary accounts, and generate third flow data corresponding to the updated redundant resource values of the n secondary accounts.
The sending the redundant resource value may specifically be: and deducting the redundant line on the basis of the current available line of the IDC account set by the second server. Generating third flow data may include, for example: the second server stored in the IDC account indicating the deduction of the redundant line records the transfer flow after deducting the redundant line. Wherein n is a positive integer and n is less than m.
In operation S205, the redundant resource values of each of the n secondary accounts sent by the second server are received, so as to obtain n redundant resource values.
According to an embodiment of the present disclosure, the redundant resource values received in operation S205 may include, for example: and determining the redundant resource value transmitted by the second server which transmits the stored redundant resource value of the IDC account. Specifically, the method may include receiving a deduction amount fed back by the second server and stored in the IDC account after the deduction of the excess amount.
In operation S207, n redundant resource values are pushed to the first server to instruct the first server to determine the allocated resource values allocated to k secondary accounts in each of the m secondary accounts.
To facilitate determination of the resource values assigned to each secondary account, all of the excess resource values received in operation S207 may be aggregated. Therefore, a primary account corresponding to the m IDC accounts may be established, where the primary account is an account stored by the first server 110, and is used as a summary account of the redundant resource values.
According to an embodiment of the present disclosure, the above operation S207 may be, for example: the n redundant resource values are pushed to the first server 110, the first data server 110 is instructed to collect the n redundant resource values, and the redundant resource total value of the primary account is updated according to the collected result, so that a first redundant resource total value is obtained. An assigned resource value is then determined based on the first aggregate excess resource value. In order to further facilitate the tracking check of the accounts, the above-mentioned resource allocation method may further instruct the first server to generate the first running water data corresponding to the first surplus resource total value after obtaining the first surplus resource total value. For example, in the process of summarizing n redundant resource values, a flow record corresponding to the first redundant resource total value may be generated in real time.
In order to facilitate averaging the resources of each IDC account, the resource allocation process may be to average the updated first excess resource total value to m secondary accounts according to an embodiment of the present disclosure. Specifically, considering that the total value of the first redundant resources is not necessarily an integer multiple of m, in order to further ensure the averaging of the resources of each IDC account, determining the allocated resource values allocated to the m secondary accounts specifically includes: under the condition that a value obtained by dividing the first redundant resource total value by m is an integer, determining that the value of the distributed resource distributed to each secondary account in the m secondary accounts is a value obtained by dividing the first redundant resource total value by m; and under the condition that the value obtained by dividing the first redundant resource total value by m is not an integer, determining that the allocated resource value allocated to each secondary account in the m secondary accounts is an integer value obtained by dividing the first redundant resource total value by m and rounding down.
According to an embodiment of the present disclosure, the allocated resource value may specifically be an issue credit allocated to the m secondary accounts, which is determined according to the total value of the first redundant resource relative to the average value of the m secondary accounts.
According to the embodiment of the disclosure, considering that the total value of the redundant resources of the primary account stored by the first data server before summarizing n redundant resource values may not be 0, summarizing the n redundant resource values may specifically be to superimpose the n redundant resource values on the basis of the total value of the redundant resources of the primary account, so as to obtain the first redundant resource total value, so as to determine the allocated resource value allocated to the m secondary accounts according to the first redundant resource total value.
According to an embodiment of the present disclosure, after determining the allocated resource value allocated to the m secondary accounts, the allocated resource value may be transmitted to the second server. In order to ensure the flow balance, before sending the allocated resource value allocated to the ith secondary account in the m secondary accounts to the second server, the amount issued to the ith secondary account needs to be deducted from the primary account stored by the first server, and the allocated resource value allocated to the ith secondary account is sent to the second data server only if the primary account is deducted successfully. Wherein, the value of i is a positive integer of 1-m.
Therefore, the resource allocation method performed by the scheduling means should also instruct the first server to deduct the amount of the issue before sending the allocated resource value to the second server. The operation of instructing the first server to perform in operation S207 may include, for example, the following operations: and deducting the allocated resource value allocated to each secondary account in the m secondary accounts from the first redundant resource total value until m deduction results for the m secondary accounts are obtained, so as to determine k secondary accounts which can send the allocated resource value in the m secondary accounts according to the m deduction results. Wherein the deduction result for each of the k secondary accounts characterizes the successful deduction of the credit.
The operation S207 instructing the first server to perform may include, for example, operations S410, S430, S450, and S470 described in fig. 4, according to an embodiment of the present disclosure, which will not be described in detail herein.
In operation S209, the assigned resource value is transmitted to the second server to instruct the second server to update the remaining resource values of the k secondary accounts according to the assigned resource value.
According to an embodiment of the present disclosure, the operation S209 may be to send an allocated resource value to the second server provided with the k secondary accounts, and then instruct the second server provided with the k secondary accounts to increase the allocated resource value based on the current remaining resource values of the k secondary accounts, to obtain updated remaining resource values of the k secondary accounts. The allocation resource value may be specifically a credit, and the updating of the remaining resource value may be specifically: the credit is increased based on the current available credit for each IDC account.
According to an embodiment of the present disclosure, for convenience, the resource allocation method may further instruct the second server to generate fourth flowing data corresponding to the updated remaining resource values of the k secondary accounts after instructing the second server to update the remaining resource values of the k secondary accounts according to the check account. The method comprises the following steps: the second data server, which is instructed to receive the allocated credit, records the warehousing pipeline after updating the current available credit of its stored IDC account.
In summary, it can be seen that, in the resource allocation method performed by the scheduling device according to the embodiment of the present disclosure, when performing balanced allocation of resources to m IDC accounts connected to a third party mechanism, it is not necessary to set interconnection among a plurality of second servers of the m IDC accounts. The resource equilibrium allocation can be realized only by the scheduling of the scheduling device and the control of the scheduling device to the first server and the second server. Therefore, the number of connections between the second servers stored by the m IDC accounts can be greatly reduced, and the difficulty of transferring resources across the servers is reduced. Therefore, each second server can realize the resource balance of the cross-region and the cross-server only by carrying out the assembly of the residual resources of the IDC account stored by the second server without knowing the current residual resource conditions of the IDC accounts stored by other second servers.
In an embodiment, the scheduling means may be provided in the first server, for example. At this time, pushing n redundant resource values to the first server in operation S207 may include, for example: the first processing module integrated with the scheduling device in the first server pushes the n redundant resource values to the second processing module provided with the primary account.
In an embodiment, the scheduling means may be provided in any one of the plurality of second servers, for example. At this time, the operation of transmitting the resource reference value to the second server in operation S203 may include, for example: and sending the resource reference value to a processing module of the secondary account which is provided with m secondary accounts in a second server where the scheduling device is located, and sending the resource reference value to other second servers which are provided with the secondary accounts which are provided with m secondary accounts. The operation of transmitting the allocation resource value to the second server in operation S209 may include, for example: and sending the allocated resource value to a processing module of the secondary account which is provided with m secondary accounts in a second server where the scheduling device is located, and sending the allocated resource value to other second servers which are provided with the secondary accounts which are provided with m secondary accounts.
Fig. 3A schematically illustrates a flowchart of a resource allocation method performed by a scheduling apparatus according to a second embodiment of the present disclosure, and fig. 3B schematically illustrates a flowchart of determining whether a remaining resource value satisfies a preset condition according to an embodiment of the present disclosure.
In the case where the difference in the remaining resource values between each of the m secondary accounts used by the third party institution is small, if the m secondary accounts are divided into resources, unnecessary consumption of resources may be caused. Therefore, as shown in fig. 3A, the resource allocation method according to the embodiment of the present disclosure needs to determine whether to average the resources of the m secondary accounts through operation S311 before operation S201.
In operation S311, it is determined whether the m remaining resource values satisfy a preset condition.
According to an embodiment of the present disclosure, this operation S311 may be, for example: and determining whether the difference value between the m remaining resource values is greater than a preset difference value. If the difference value is larger than the preset difference value, the difference value among the m residual resource values is larger, and the m secondary accounts are required to be subjected to resource division. If the difference value is smaller than the preset difference value, the difference value among the m residual resource values is smaller, and the m secondary accounts do not need to be subjected to resource division. Therefore, operation S201 is performed only if the m remaining resource values satisfy a preset condition to determine resource reference values for the m secondary accounts.
According to an embodiment of the present disclosure, as shown in fig. 3B, operation S311 may specifically include operations S3111 to S3113. In operation S3111, an actual bias degree and an actual bias value of the m remaining resource values are determined. In operation S3113, in case the actual deviation degree is greater than the predetermined deviation degree and the actual deviation value is greater than the predetermined deviation value, it is determined that the m remaining resource values satisfy the preset condition.
The operation S3111 may specifically be: the maximum value m_max and the minimum value m_min of the M remaining resource values are determined first, and then the actual deviation value d=m_max-m_min and the actual deviation degree l=d/m_max= (m_max-m_min)/m_max are determined. The predetermined deviation degree and the predetermined deviation value in operation S326 may be specifically set according to actual requirements, which is not limited in the present disclosure.
As is clear from the above, the resource allocation method performed by the scheduling device according to the embodiment of the present disclosure performs resource allocation only when the deviation of m remaining resource values of m secondary accounts is large. Therefore, unnecessary resource allocation operations can be avoided to a certain extent, and resource consumption can be reduced.
According to the embodiment of the disclosure, considering that after the redundant resource values are deducted, the values of the redundant resource values of the n secondary accounts are the same as the resource reference values, if the summarized redundant resource total value is divided into m secondary accounts, resource imbalance still exists among the m secondary accounts. Therefore, in order to equalize the resources among the m secondary accounts as much as possible, operation S207 may exclude the secondary accounts with the remaining higher remaining resource values after deducting the remaining resource values according to the remaining resource values of the m secondary accounts and the first total value of the remaining resources of the primary accounts, and allocate the resources to only the l secondary accounts with the lower remaining resource values. Wherein l is a positive integer, and considering that l secondary accounts are screened from m secondary accounts, l should be less than or equal to m.
Fig. 4 schematically illustrates a flowchart of a scheduler instructing a first data server to perform operations according to an embodiment of the present disclosure.
As shown in fig. 4, the operation instructing the first server to perform in operation S207 may include, for example, operations S410 to S470. The operation of determining the allocation resource value allocated to k secondary accounts of the m secondary accounts may include operations S430, S450 and S470, among others, for example.
In operation S410, the total value of the redundant resources of the primary account is updated according to the n redundant resource values, so as to obtain a first total value of the redundant resources. The first total value of redundant resources obtained in the operation S410 is the same as the aforementioned first total value of redundant resources, and will not be described herein.
In operation S430, according to the total value of the first redundant resources and the remaining resource values of the m secondary accounts, l secondary accounts needing to allocate resources and l allocated resource values allocated to the l secondary accounts are determined.
According to an embodiment of the present disclosure, the determining in operation S430 that the l secondary accounts need to allocate resources may include, for example, cyclically excluding secondary accounts with higher remaining resource values in the m secondary accounts until the remaining resource value of each of the remaining secondary accounts is smaller than the average resource value for the remaining secondary accounts, to obtain the l secondary accounts. Operation S430 may determine an allocated resource value allocated to each of the l secondary accounts, for example, from the average resource value for the l secondary accounts. The average resource value for the l secondary accounts is: the sum of the first total value of remaining resources and the remaining resource value of the/secondary accounts is relative to the average value of the/secondary accounts. The operation of determining the l secondary accounts requiring allocation of resources in operation S430 may be implemented by, for example, operation S501, operation S503, operation S505, operation S507, operation S509, and operation S511 described in fig. 5, according to an embodiment of the present disclosure, which will not be described in detail herein.
According to an embodiment of the present disclosure, in a case where the average resource value for the l secondary accounts is an integer, the allocated resource value allocated to each of the l secondary accounts may be determined as a difference between the average resource value and the remaining resource value of each secondary account. When the average resource value for the l secondary accounts is not an integer, a difference between the integer value, which is the downward integer of the average resource value, and the remaining resource value of each secondary account may be determined as the allocated resource value allocated to each secondary account of the l secondary accounts.
In operation S450, the l allocated resource values are subtracted from the first total redundant resource value in sequence, so as to obtain l deduction results for the l secondary accounts.
This operation S450 may obtain, for example, one deduction result by sequentially performing operations S601 and S603 described in fig. 6, according to an embodiment of the present disclosure. Specifically, the operation S450 may include the operations S601 and S603 described in fig. 6, which are not described in detail herein.
In operation S470, the secondary accounts for which the deduction results are indicated to be successful are determined, and k secondary accounts are obtained.
According to the embodiment of the disclosure, after the first server is instructed to obtain the l deduction results, k secondary accounts for allocating resources can be determined according to the l deduction results. The operation S470 may specifically include, for example: and determining the secondary account corresponding to the deduction value successfully deducted by the primary account as one of k secondary accounts. According to an embodiment of the disclosure, in order to facilitate determining a correspondence between the deduction result and the secondary account, the deduction result obtained by the first data server may be indicated, for example, by indicating that the corresponding secondary account is also indicated, in addition to being able to indicate whether the ith deduction value was successfully deducted. Specifically, the deduction result carries an identifier for identifying the corresponding secondary account, so that the scheduling device sends the allocated resource value to the second server provided with the corresponding secondary account according to the identifier. Where k is a positive integer, and considering that k secondary accounts are screened from l secondary accounts, k should be less than or equal to l.
Fig. 5 schematically illustrates a flow chart of determining l secondary accounts that require allocation of resources according to an embodiment of the present disclosure.
In order to facilitate the first server determining that the l accounts need to be allocated resources according to the embodiments of the present disclosure, as shown in fig. 5, operation S207, after pushing n redundant resource values to the first server, may include, for example: with m as an initial value of p, operations S501, S503, S505, S507, S509 and S511 are circularly performed until the remaining resource values of the p secondary accounts are smaller than the average value obtained by dividing the sum of the resources by p.
In operation S501, a sum of the total value of the first redundant resource and the remaining resource values of the p secondary accounts is determined, and a sum of the resource values is obtained. In operation S503, an average value obtained by dividing the sum of the resource values by p is determined. In operation S505, it is determined whether there is a secondary account having a remaining resource value equal to or greater than the average value among the p secondary accounts. The average value is similar to the average resource value for the first secondary account, and will not be described herein.
If the operation S505 determines that the remaining resource values of the p secondary accounts are smaller than the average value, it is indicated that the p secondary accounts are all accounts needing to be allocated resources, and then operation S507 is executed to determine that the p secondary accounts are l secondary accounts.
In operation S505, if it is determined that only q secondary accounts (q is a positive integer less than p) of the p secondary accounts have residual resource values less than the average value, it is indicated that secondary accounts having residual resource values greater than or equal to the average value exist in the p secondary accounts. At this time, operations S509 and S511 are performed.
In operation S509, the secondary accounts with the remaining resource values equal to or greater than the average value are excluded from the p secondary accounts, and q secondary accounts are obtained. In operation S511, let p=q, to take q secondary accounts as p secondary accounts, the loop execution operation S501, operation S503, operation S505, operation S507, and operation S509 are returned.
According to an embodiment of the present disclosure, the determining the l secondary accounts that need to allocate the resources may include: first, a first sum of the residual amounts of the primary account and all the secondary accounts is calculated. And then dividing the first sum by the number of the secondary accounts, and calculating to obtain a first average value. And comparing the residual amount of each secondary account in the plurality of secondary accounts with the first average value, and if the residual amount is greater than or equal to the first average value, planing the secondary account, so that the secondary account does not participate in fund distribution. And after all the secondary accounts with the residual amount larger than the first average value are planed, calculating a second sum of the residual amount of the primary account and the residual amount of the secondary account after the planed, dividing the second sum by the number of the secondary accounts after the planed, and calculating to obtain the average value serving as the second average value. And then, the secondary accounts with the residual amount larger than or equal to the second average value in the residual secondary accounts are planed again. And so on until the residual amount of all the residual secondary accounts is smaller than the average value obtained by recalculation. The assigned resource value for the final remaining secondary account may be, for example: and (3) calculating the difference value between the obtained average value and the residual amount of the final residual secondary account again. Specifically, in the case where the average value is an integer, determining the allocated resource value allocated to each of the l secondary accounts is: the difference between the average and the remaining resource value of each of the l secondary accounts. And under the condition that the average value is not an integer, determining the value of the allocated resource allocated to each of the l secondary accounts as follows: the difference between the integer value rounded down from the average and the remaining resource value of each of the l secondary accounts.
For example, if there are 6 secondary accounts, the remaining amounts of the 6 secondary accounts are 1, 2, 3, 4, 5, 15, respectively, and the remaining amount of the primary account is 30. The calculated first average value is (30+1+2+3+4+5+15)/6=10. The secondary account with the residual amount of 15 is the secondary account which needs to be planed. And then the residual amount of the secondary accounts and the residual amount of the primary accounts of which the residual obtained residual amounts are 1, 2, 3, 4 and 5 respectively, and the calculated second average value is (30+1+2+3+4+ten 5)/5=9. At this time, it may be determined that the secondary accounts with residual amounts of 1, 2, 3, 4, and 5, respectively, are all accounts that need to participate in the funds distribution. The allocation resource values allocated to the five secondary accounts with the residual amounts of 1, 2, 3, 4 and 5 are respectively: 8. 7, 6, 5, 4.
According to an embodiment of the present disclosure, after determining the allocated resource value allocated to the l secondary accounts, the allocated resource value may be transmitted to the second server. In order to ensure the flow balance, before sending the allocated resource value allocated to the ith secondary account to the second server, the amount issued to the ith secondary account needs to be deducted from the primary account stored in the first server, and the allocated resource value allocated to the ith secondary account is sent to the second server only if the primary account is deducted successfully. Wherein i is a positive integer from 1 to m
Fig. 6 schematically illustrates a flowchart of sequentially subtracting l allocated resource values from a first total value of excess resources, according to an embodiment of the present disclosure.
As shown in fig. 6, the resource allocation method performed by the scheduling device should also instruct the first data server to deduct the credit before sending the allocated resource value to the second server. The operation in operation S207 indicated to be performed by the first server includes, in addition to operation S501, operation S503, operation S505, operation S507, operation S509, and operation S511, operation S601, operation S603, operation S605, and operation S607 until l deduction results are obtained, so as to determine, according to the l deduction results, k secondary accounts in which the allocated resource value can be transmitted from the l secondary accounts. Specifically, the operation instructing the first server to execute may include, for example, operation S601, operation S603, operation S605, and operation S607, which are successively executed until l deduction results are obtained.
In operation S601, the i-th allocated resource value is subtracted from the first total value of redundant resources to obtain a second total value of redundant resources and an i-th deduction result. The i-th allocated resource value is, for example, an allocated resource value allocated to the i-th secondary account in the l secondary accounts.
In operation S603, second pipeline data corresponding to a second excess resource total value is generated. The i-th deduction result is used for indicating whether the i-th allocated resource value is successfully deducted, and the second stream data is the allocated stream recorded after the i-th allocated resource value is deducted from the primary account.
According to the embodiment of the disclosure, in order to avoid the occurrence of confusion when a plurality of allocated resource values exist, l allocated resource values can be numbered to obtain the allocated resource values with the numbers of 1-l. The specific process of obtaining the l deduction results is as follows: taking 1 as the initial value of i, deducting the ith allocated resource value with the number of i by circularly executing operation S601, operation S603, operation S605 and operation S607 until l deduction results are obtained. In the operation S605, if l deduction results are obtained, the deduction of the total value of the redundant resources is ended, if l deduction results are not obtained, the operation S607 is executed, i is set to i+1, and then the operation S601 is executed.
In accordance with an embodiment of the present disclosure, the above-mentioned operation S605 may specifically also be executed if i is less than i, if i is less than m; if i is not less than l, the deduction of the total value of the redundant resources is ended.
Fig. 7 schematically shows a block diagram of a scheduling apparatus according to an embodiment of the present disclosure.
As shown in fig. 7, the scheduling apparatus 700 of the embodiment of the present disclosure includes a resource reference value determining module 701, a first indicating module 703, an excess resource value receiving module 705, and a second indicating module 707. The scheduler 700 may be, for example, the scheduler 120 in fig. 1A, and the scheduler 700 may interact with a first server 110 with primary accounts and a second server 130 with m secondary accounts, where the m secondary accounts set by the second server 130 are m IDC accounts set to the same third party institution. The primary account corresponds to the m secondary accounts.
The resource reference value determining module 701 is configured to determine resource reference values for m secondary accounts according to m remaining resource values of the m secondary accounts (operation S201), where m is a positive integer.
The first indication module 703 is configured to send a resource reference value to the second server, so as to instruct the second server to determine whether to send the set redundant resource value of each secondary account (operation S203).
The redundant resource value receiving module 705 is configured to receive the redundant resource values of each of the n secondary accounts sent by the second server, and obtain n redundant resource values (operation S205), where n is a positive integer, and n is less than m.
The second indication module 707 is configured to push n redundant resource values to the first server to indicate that the first server determines an allocated resource allocated to k secondary accounts of the m secondary accounts (operation S207). Wherein k is a positive integer, and k is less than or equal to m.
The first indication module 703 is further configured to send an allocated resource value to the second server, so as to instruct the second service to update the remaining resource values of the k secondary accounts according to the allocated resource value (operation S209). Wherein k is a positive integer.
According to an embodiment of the present disclosure, the scheduling apparatus 700 further includes a preprocessing module 709 for determining whether the m remaining resource values satisfy a preset condition (operation S311). The resource reference value determining module 701 is specifically configured to determine resource reference values for m secondary accounts when m remaining resource values satisfy a preset condition.
The preprocessing module 709 described above includes a processing sub-module 719 and a determination sub-module 739, according to an embodiment of the present disclosure. The processing sub-module 719 is for determining an actual degree of deviation and an actual value of deviation of the m remaining resource values (operation S3111). The determination submodule 739 is configured to determine that m remaining resource values satisfy a preset condition in a case where the actual deviation degree is greater than the predetermined deviation degree and the actual deviation value is greater than the predetermined deviation value (operation S3113).
According to an embodiment of the present disclosure, the first indication module 703 is further configured to instruct the second server to update the remaining resource values of each of the n secondary accounts if it is determined to send the remaining resource values of each of the n secondary accounts. The second indication module 707 is further configured to instruct the first server to update the total value of the redundant resources of the primary account according to the n redundant resource values, so as to obtain a first total value of the redundant resources (operation S410). The second indication module 707 may be used, for example, to instruct the first server to determine an allocated resource value to be allocated to k secondary accounts of the m secondary accounts by: determining l secondary accounts needing to be allocated with resources and l allocated resource values allocated to the l secondary accounts according to the first redundant resource total value and the remaining resource values of the m secondary accounts (operation S430); sequentially subtracting l allocated resource values from the first redundant resource total value to obtain l deduction results for l secondary accounts (operation S450); determining the secondary account for which the deduction result indicates successful deduction result, and obtaining k secondary accounts (operation S470). Wherein l is a positive integer, l is greater than or equal to k and l is less than or equal to m.
According to an embodiment of the present disclosure, the determining the l secondary accounts that need to allocate the resources includes: the following operations are circularly executed by taking m as an initial value of p until the residual resource values of the p secondary accounts are smaller than the average value obtained by dividing the sum of the resource values by p: determining the sum of the first redundant resource total value and the remaining resource values of the p secondary accounts to obtain a resource value sum (operation S501); determining an average value obtained by dividing the sum of the resource values by p (operation S503); and determining secondary accounts with residual resource values smaller than the average value in the p secondary accounts to obtain q secondary accounts (operation S505 and operation S509), and enabling p=q (operation S511). Wherein, in the case where the remaining resource values of the p secondary accounts are smaller than the average value, the p secondary accounts are determined to be the l secondary accounts (operation S507).
The second indication module 707 is specifically configured to instruct the first data server according to an embodiment of the present disclosure: and under the condition that the average value obtained by dividing the sum of the resource values and the l is an integer, determining that the allocated resource values respectively allocated to the l secondary accounts are as follows: the difference between the average value and the remaining resource value of each of the l secondary accounts; or, if the average value obtained by dividing the sum of the resource values by l is not an integer, determining that the allocated resource values allocated to the l secondary accounts are: the difference between the integer value rounded down from the average and the respective remaining resource value in the l secondary accounts.
The second indication module 707 is further configured to generate first flow data corresponding to the first total value of redundant resources after the first server is instructed to update the redundant resource value of the primary account according to an embodiment of the present disclosure.
According to an embodiment of the present disclosure, the subtracting the l allocated resource values from the first total redundant resource value sequentially includes: the following operations are performed successively until l subtraction results are obtained: subtracting the ith allocated resource value from the first total value of the redundant resources to obtain a second total value of the redundant resources and an ith deduction result (operation S601); and generating second pipeline data corresponding to the second surplus resource total value (operation S603). The ith deduction result is used for representing whether the ith allocated resource value is successfully deducted, and i is a positive integer belonging to [1, l ].
The second indication module 707 is further configured to, after instructing the second server to send the redundant resource values of each of the n secondary accounts, perform the following operations according to an embodiment of the present disclosure: updating the residual resource values of the n secondary accounts and generating third water data, wherein the third water data corresponds to the updated residual resource values of the n secondary accounts; and/or, the second indication module 707 is further configured to generate fourth running water data after indicating the second server to update the remaining resource values of the k secondary accounts, where the fourth running water data corresponds to the updated remaining resource values of the k secondary accounts.
According to an embodiment of the present disclosure, the above-mentioned resource reference value determining module 701 is specifically configured to determine that the resource reference value of each secondary account of the m secondary accounts is an average value of m remaining resource values.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, any of the resource reference value determination module 701, the first indication module 703, the excess resource value receiving module 705, the second indication module 707, the preprocessing module 709, the processing sub-module 719, and the determination sub-module 739 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the resource reference value determination module 701, the first indication module 703, the excess resource value receiving module 705, the second indication module 707, the preprocessing module 709, the processing sub-module 719, and the determination sub-module 739 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging a circuit, or in any one of or a suitable combination of any of the three implementations of software, hardware, and firmware. Alternatively, at least one of the resource reference value determination module 701, the first indication module 703, the excess resource value receiving module 705, the second indication module 707, the preprocessing module 709, the processing sub-module 719, and the determination sub-module 739 may be at least partially implemented as a computer program module, which, when executed, may perform the corresponding functions.
Fig. 8 schematically illustrates a block diagram of a distributed processing system according to an embodiment of the present disclosure.
As depicted in fig. 8, a distributed processing system 800 of an embodiment of the present disclosure includes a scheduler 810, a server cluster 830, and a first server 850. The server cluster 830 includes a second server, where m secondary accounts are set in the plurality of second servers 130 depicted in fig. 1A, and is configured to store resources of m secondary accounts of the same third party mechanism. The scheduler 810 interacts with a first server 850 and a second server that sets m secondary accounts. The first server is used for storing redundant resource values of the primary account.
According to an embodiment of the present disclosure, the scheduling apparatus 810 may be the scheduling apparatus 120 described in fig. 1A, and the first server 850 may be the first server 110 described in fig. 1A. The scheduler 810 is configured to: the operations described in fig. 2 to 6 are performed by interaction with the second server and the first server 850 that set m secondary accounts.
Fig. 9 schematically illustrates a block diagram of a computer system adapted to implement a resource allocation method in accordance with an embodiment of the present disclosure. The computer system illustrated in fig. 9 is merely an example, and should not be construed as limiting the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 9, a computer system 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. The processor 901 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 901 may also include on-board memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM 903, various programs and data necessary for the operation of the system 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. The processor 901 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the program may be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the system 900 may also include an input/output (I/O) interface 905, the input/output (I/O) interface 905 also being connected to the bus 904. The system 900 may also include one or more of the following components connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 901. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 902 and/or RAM 903 and/or one or more memories other than ROM 902 and RAM 903 described above.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (12)

1. A resource allocation method performed by a scheduling device, wherein the scheduling device interacts with a first server and a second server, the first server is provided with a primary account, and the second server is provided with m secondary accounts; the primary account corresponds to the m secondary accounts; the method comprises the following steps:
determining resource reference values for the m secondary accounts according to m residual resource values of the m secondary accounts;
transmitting the resource reference value to the second server to instruct the second server to determine whether to transmit the set redundant resource value of each secondary account;
Receiving the redundant resource values of each of the n secondary accounts sent by the second server, and obtaining n redundant resource values;
pushing the n redundant resource values to the first server to instruct the first server to determine allocated resource values allocated to k secondary accounts of the m secondary accounts; and
sending the allocated resource value to the second server to instruct the second server to update the remaining resource values of the k secondary accounts according to the allocated resource value,
wherein m, n and k are positive integers, n is smaller than m, and k is smaller than or equal to m.
2. The method of claim 1, wherein the method further comprises, prior to determining the resource reference value for the m secondary accounts:
determining whether the m residual resource values meet a preset condition;
and determining resource reference values for the m secondary accounts under the condition that the m residual resource values meet the preset conditions.
3. The method of claim 2, wherein determining whether the m remaining resource values satisfy a preset condition comprises:
determining the actual deviation degree and the actual deviation value of the m residual resource values;
in the case where the actual deviation degree is greater than a predetermined deviation degree and the actual deviation value is greater than a predetermined deviation value: and determining that the m residual resource values meet a preset condition.
4. The method according to claim 1, wherein:
the method further includes instructing the second server to: under the condition that the redundant resource values of the n secondary accounts are determined to be sent, updating the redundant resource values of the n secondary accounts;
the method further includes instructing the first server to: updating the total value of the redundant resources of the primary account according to the n redundant resource values to obtain a first total value of the redundant resources;
determining the assigned resource values assigned to k secondary accounts of the m secondary accounts comprises:
determining l secondary accounts needing to be allocated with resources and l allocated resource values allocated to the l secondary accounts according to the first redundant resource total value and the respective residual resource values of the m secondary accounts;
sequentially deducting the l allocated resource values from the first redundant resource total value to obtain l deduction results for the l secondary accounts; and
determining a secondary account for which the deduction result representing successful deduction is aimed in the l deduction results to obtain k secondary accounts,
wherein l is a positive integer, l is greater than or equal to k and l is less than or equal to m.
5. The method of claim 4, wherein determining l secondary accounts that require allocation of resources comprises: the following operations are circularly executed by taking m as an initial value of p until the residual resource values of the p secondary accounts are smaller than the average value obtained by dividing the sum of the resource values by p:
Determining the sum of the first redundant resource total value and the residual resource values of the p secondary accounts to obtain the sum of the resource values;
determining an average value obtained by dividing the sum of the resource values by the p; and
determining secondary accounts with residual resource values smaller than the average value in the p secondary accounts to obtain q secondary accounts, and enabling p=q,
and under the condition that the residual resource values of the p secondary accounts are smaller than the average value, determining that the p secondary accounts are the l secondary accounts, and q is a positive integer smaller than p.
6. The method of claim 5, wherein determining the l allocated resource values allocated to the l secondary accounts comprises:
and under the condition that the average value obtained by dividing the sum of the resource values and the l is an integer, determining that the allocated resource values respectively allocated to the l secondary accounts are as follows: a difference between the average value and the remaining resource value of each of the l secondary accounts; or alternatively
And under the condition that the average value obtained by dividing the sum of the resource values and the l is not an integer, determining that the allocated resource values respectively allocated to the l secondary accounts are as follows: and the difference value between the integer value rounded down by the average value and the residual resource value of each secondary account.
7. The method of claim 4, further comprising generating first flowing data corresponding to the first excess resource total value after instructing the first server to update the excess resource total value of the primary account.
8. The method of claim 7, wherein sequentially subtracting the l allocated resource values from the first excess resource total value comprises: the following operations are performed successively until l subtraction results are obtained:
deducting an ith allocated resource value from the first redundant resource total value to obtain a second redundant resource total value and an ith deduction result; and
generating second pipeline data corresponding to the second surplus resource total value,
the ith deduction result is used for representing whether the ith allocated resource value is successfully deducted, and i is a positive integer belonging to [1, l ].
9. The method according to claim 1, wherein:
the method further includes, after instructing the second server to send the respective excess resource values for the n secondary accounts, performing the following operations: updating the residual resource values of the n secondary accounts and generating third water data, wherein the third water data corresponds to the updated residual resource values of the n secondary accounts; and/or
The method further includes generating fourth streaming data after the second server is instructed to update the remaining resource values of the k secondary accounts, the fourth streaming data corresponding to the updated remaining resource values of the k secondary accounts.
10. The method of claim 1, wherein determining a resource reference value for the m secondary accounts comprises:
the resource reference value of each secondary account in the m secondary accounts is determined as follows: and an average value of the m remaining resource values.
11. A scheduling device, wherein the scheduling device interacts with a first server and a second server, the first server is provided with a primary account, and the second server is provided with m secondary accounts; the primary account corresponds to the m secondary accounts, and the device comprises:
the resource reference value determining module is used for determining resource reference values for the m secondary accounts according to m residual resource values of the m secondary accounts;
the first indication module is used for sending the resource reference value to the second server so as to indicate the second server to determine whether to send the set redundant resource value of each secondary account;
the redundant resource value receiving module is used for receiving the redundant resource values of the n secondary accounts sent by the second server to obtain n redundant resource values;
A second indication module, configured to push the n redundant resource values to the first server, so as to indicate the first server to determine an allocated resource value allocated to k secondary accounts in the m secondary accounts,
wherein the first indication module is further configured to send the allocated resource value to the second server, so as to indicate the second server to update the remaining resource values of the k secondary accounts according to the allocated resource value,
wherein m, n and k are positive integers, n is smaller than m, and k is smaller than or equal to m.
12. A distributed processing system, comprising:
the scheduling device is interacted with a first server and a second server, the first server is provided with a primary account, and the second server is provided with m secondary accounts; the primary account corresponding to the m secondary accounts, the scheduling device being configured to perform the method of any one of claims 1-10;
a server cluster comprising the second server for storing resources of the m secondary accounts of a third party authority; and
the first server is used for storing the resources of the primary account.
CN202010133528.1A 2019-06-27 2020-02-28 Scheduling device, resource allocation method executed by scheduling device and distributed processing system Active CN111367667B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202010133528.1A CN111367667B (en) 2020-02-28 2020-02-28 Scheduling device, resource allocation method executed by scheduling device and distributed processing system
PCT/CN2020/098151 WO2020259598A1 (en) 2019-06-27 2020-06-24 Transaction data processing method, device, apparatus and system
US17/620,482 US20220270067A1 (en) 2019-06-27 2020-06-24 Transaction data processing method, device, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010133528.1A CN111367667B (en) 2020-02-28 2020-02-28 Scheduling device, resource allocation method executed by scheduling device and distributed processing system

Publications (2)

Publication Number Publication Date
CN111367667A CN111367667A (en) 2020-07-03
CN111367667B true CN111367667B (en) 2023-06-20

Family

ID=71210193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010133528.1A Active CN111367667B (en) 2019-06-27 2020-02-28 Scheduling device, resource allocation method executed by scheduling device and distributed processing system

Country Status (1)

Country Link
CN (1) CN111367667B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112085486B (en) * 2020-08-24 2024-01-30 宝付网络科技(上海)有限公司 Method and system for improving funds distribution capacity
CN112764676B (en) * 2020-12-31 2022-11-04 北京三快在线科技有限公司 Resource allocation system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110223179A (en) * 2019-06-10 2019-09-10 网联清算有限公司 The data processing method of fund, device, system, medium
CN110414988A (en) * 2019-07-25 2019-11-05 中国工商银行股份有限公司 Method of payment, payment mechanism, equipment, storage medium and system
CN110442608A (en) * 2019-07-31 2019-11-12 中国工商银行股份有限公司 Information processing method, device, electronic equipment, medium and system
CN110599315A (en) * 2019-08-05 2019-12-20 网联清算有限公司 Resource allocation method, device and equipment for multi-level account

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060074701A1 (en) * 2004-09-30 2006-04-06 Win-Harn Liu System and method of multi-account dynamic resource allocation via portable equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110223179A (en) * 2019-06-10 2019-09-10 网联清算有限公司 The data processing method of fund, device, system, medium
CN110414988A (en) * 2019-07-25 2019-11-05 中国工商银行股份有限公司 Method of payment, payment mechanism, equipment, storage medium and system
CN110442608A (en) * 2019-07-31 2019-11-12 中国工商银行股份有限公司 Information processing method, device, electronic equipment, medium and system
CN110599315A (en) * 2019-08-05 2019-12-20 网联清算有限公司 Resource allocation method, device and equipment for multi-level account

Also Published As

Publication number Publication date
CN111367667A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
US11552880B2 (en) Systems and methods for managing resources in a serverless workload
CN109858915B (en) Transaction system and service processing method
US20130054808A1 (en) Management of storage cluster performance with hybrid workloads
US20220121467A1 (en) A method and a system for managing the computing resources of a cloud computing platform
CN111367667B (en) Scheduling device, resource allocation method executed by scheduling device and distributed processing system
CN109285069B (en) Resource transfer method, device and server
CN110443593B (en) Transaction processing method and device, transaction processing system and computer system
US9887930B1 (en) Aggregating resource requests
US11943285B2 (en) Metering computing resources in cloud computing environments
US20220405133A1 (en) Dynamic renewable runtime resource management
CN107147610B (en) Resource processing method and device
US8548881B1 (en) Credit optimization to minimize latency
US20210217083A1 (en) Method and system for optimizing resource redistribution
KR20160139082A (en) Method and System for Allocation of Resource and Reverse Auction Resource Allocation in hybrid Cloud Server
CN109842665B (en) Task processing method and device for task allocation server
US20220270067A1 (en) Transaction data processing method, device, apparatus and system
CN113992593B (en) Service resource calling method and device, electronic equipment and storage medium
CN110633142B (en) Block chain consensus method, management node, electronic device, and storage medium
CN114090247A (en) Method, device, equipment and storage medium for processing data
US11307889B2 (en) Schedule virtual machines
US11256552B1 (en) Systems and methods for managing resources in a serverless workload
CN113377539A (en) Processing method and device for realizing load balance
CN110827009B (en) Fund transfer method and device based on account balance limit
CN111415263A (en) Data matching method and device
CN112446754A (en) Method and device for processing orders

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant