CN111367667A - 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
CN111367667A
CN111367667A CN202010133528.1A CN202010133528A CN111367667A CN 111367667 A CN111367667 A CN 111367667A CN 202010133528 A CN202010133528 A CN 202010133528A CN 111367667 A CN111367667 A CN 111367667A
Authority
CN
China
Prior art keywords
resource
server
value
secondary accounts
values
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.)
Granted
Application number
CN202010133528.1A
Other languages
Chinese (zh)
Other versions
CN111367667B (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)
  • Hardware Redundancy (AREA)
  • Computer And Data Communications (AREA)

Abstract

A scheduling apparatus, a resource allocation method executed by the scheduling apparatus, and a distributed processing system are provided. The scheduling device 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 the m remaining resource values of the m secondary accounts; sending the resource reference value to a second server so that the second server determines whether to send the redundant resource value of each secondary account; receiving respective redundant resource values of the n secondary accounts sent by the second server to obtain n redundant resource values; pushing n redundant resource values to the first server so that the first server determines allocation resource values allocated to k secondary accounts of the m secondary accounts; and sending the allocated resource value to the second server, so that the second server updates the remaining 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 executed 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, the callable resources among the accounts stored by the data servers in the distributed system need to be shared.
In the course of implementing the disclosed concept, the inventors found that there are at least the following problems in the prior art: when the scheduling of the resources that can be called is performed on each account in the distributed system, the data servers stored in each account are often connected with each other, and each data server reads the remaining resources of each account stored in other data servers except for the data server to perform resource allocation among each account. However, this method requires that all data servers are connected to each other (for a distributed system consisting 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 is often not achieved.
Disclosure of Invention
In view of the above, the present disclosure provides a scheduling apparatus capable of effectively reducing scheduling complexity, a resource allocation method executed 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 the m remaining resource values of the m secondary accounts; sending the resource reference value to a second server to instruct the second server to determine whether to send the set redundant resource value of each secondary account; receiving respective redundant resource values of the n secondary accounts sent by the second server to obtain n redundant resource values; pushing n redundant resource values to the first server to indicate that the first server determines 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 less than m, and k is less than or equal to m.
According to an embodiment of the present disclosure, the resource allocation method further includes, before determining the resource reference values for the m secondary accounts: determining whether the m residual resource values meet preset conditions; and under the condition that the m residual resource values meet the preset condition, determining resource reference values aiming at the m secondary accounts.
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 the m residual resource values; and under the condition that the actual deviation degree is greater than the preset deviation degree and the actual deviation value is greater than the preset deviation value, determining that the m residual resource values meet the preset condition.
According to an embodiment of the present disclosure, the resource allocation method further includes instructing the second server to: under the condition that the respective redundant resource values of the n secondary accounts are determined to be sent, updating the respective residual resource values of the n secondary accounts; and instructing the first server to: and updating the total value of the redundant resources of the primary account according to the n values of the redundant resources to obtain a first total value of the redundant resources. The determining allocated resource values allocated to k secondary accounts of 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 total redundant resource value and the respective residual resource values of the m secondary accounts; sequentially deducting l distributed resource values from the first redundant resource total value to obtain l deduction results aiming at l secondary accounts; and determining secondary accounts aiming at the deduction result which is successfully deducted from the I 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.
According to an embodiment of the present disclosure, determining the l secondary accounts that need to allocate resources includes: and circularly executing the following operations with the initial value m as p until the residual resource values of the p secondary accounts are all smaller than the average value obtained by dividing the sum of the resource values by p: calculating the sum of the first total redundant resource value and the residual resource values of the p secondary accounts to obtain a total resource value; and determining an average value obtained by dividing the sum of the resource values by p; and determining the secondary accounts of which the residual resource values are smaller than the average value in the p secondary accounts to obtain q secondary accounts, and enabling p to be q. And determining that the p secondary accounts are l secondary accounts and q is a positive integer smaller than p under the condition that the residual resource values of the p secondary accounts are smaller than the average value.
According to an embodiment of the present disclosure, the determining l allocated resource values allocated to l secondary accounts includes: and under the condition that the average value obtained by dividing the sum of the resource values by l is an integer, determining that the allocated resource values allocated to the l secondary accounts are as follows: the difference between the average value and the respective residual resource values of the l secondary accounts; or under the condition that 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 as follows: the difference between the integer value of the average value rounded down and the respective remaining resource value 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 resource allocation method further includes: and instructing the first server to generate first flow data corresponding to the first redundant resource total value.
According to an embodiment of the present disclosure, the sequentially deducting l allocated resource values from the first excess resource total value includes: the following operations are performed in succession until l subtraction results are obtained: deducting the ith distributed 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 streaming water data corresponding to the second surplus resource total value. Wherein, the ith deduction result is used for representing whether the ith allocation resource value is successfully deducted, and i is a positive integer belonging to [1, l ].
According to an embodiment of the present disclosure, the resource allocation method further includes, after instructing the second server to send the respective redundant resource values of the n secondary accounts, performing the following operations: updating the residual resource values of the n secondary accounts and generating third running water data, wherein the third running water data correspond to the updated residual resource values of the n secondary accounts; and/or the resource allocation method further comprises the step of generating fourth running water data after the second server is instructed to update the remaining resource values of the k secondary accounts, wherein 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 determining the resource reference values for the m secondary accounts includes: determining the resource reference value of each secondary account in the m secondary accounts as follows: average of m remaining resource values.
Another aspect of the present disclosure provides a scheduling apparatus, where the scheduling apparatus interacts with a first server and a second data 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 scheduling device includes: the resource reference value determining module is used for determining resource reference values aiming at the m secondary accounts according to the m residual resource values of the m secondary accounts; the first indicating 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 respective redundant resource values of the n secondary accounts sent by the second server to obtain n redundant resource values; a second indicating module, configured to push the n redundant resource values to the first server to indicate that the first server determines allocated resource values allocated to k secondary accounts of the m secondary accounts. The first indication module is further configured to send the allocated resource value to the second server 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 less than m, and k is less 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 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. And the server cluster comprises a second server, and the second server is used 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 for implementing the resource allocation method performed by a scheduling apparatus as described above when executed.
Another aspect of the 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 apparatus as described above.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the resource allocation method performed by the scheduling apparatus as described above when executed.
According to the embodiment of the disclosure, the technical problems that the resource scheduling complexity is high and the resources cannot be uniformly dispersed can be at least partially solved. By adding the primary accounts and the interaction between the scheduling device and the first server and the second server, the uniform distribution of the resources of the plurality of secondary accounts can be realized without the mutual connection between the second servers stored by the plurality of secondary accounts. Namely, each second server only needs to remit the resource of itself, so that the resource balance of the cross-machine room and the cross-server can be completed, 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 apparent from the following description of embodiments of the disclosure, which proceeds 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 shows an account hierarchy diagram according to an embodiment of the present disclosure;
fig. 2 schematically shows a flow chart of a resource allocation method performed by a scheduling apparatus according to a first embodiment of the present disclosure;
fig. 3A schematically shows a flow chart of a resource allocation method performed by a scheduling apparatus according to a second embodiment of the present disclosure;
FIG. 3B schematically illustrates a flow chart for determining whether a remaining resource value satisfies a preset condition according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a scheduling apparatus instructing a first server to perform an operation according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow diagram for determining l secondary accounts that need to be allocated resources according to an embodiment of the disclosure;
FIG. 6 schematically illustrates a flow chart of sequentially deducting l allocated resource values from a first total excess resource value, in accordance with an embodiment of the present disclosure;
fig. 7 schematically shows a block diagram of a scheduling apparatus according to an embodiment of the present 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 suitable for implementing a resource allocation method according to 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 illustrative only 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 disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not 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 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 is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have 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 convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have 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 shows an account hierarchy diagram according to an embodiment of the disclosure. It should be noted that fig. 1A is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1A, the system architecture 100 of the embodiment of the present disclosure includes a first server 110, a scheduling device 120, and a plurality of second servers 130. The scheduling means 120 interacts with the first server 110 and the plurality of second servers 130 over a network. The network may include various connection types, such as wired, wireless communication links, and so forth.
The first server 110 may be a computer cluster (as a master) of a main process. The system is used for setting platform-level primary accounts 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 organization according to the redundant resources and the number of the secondary accounts set by the same third-party organization. Wherein the secondary accounts 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 a plurality of third-party mechanisms set secondary accounts through the second server, a plurality of primary accounts are correspondingly set in the first server, so that the primary accounts correspond to the third-party mechanisms set the secondary accounts one by one, and the balanced distribution of resources among the plurality of secondary accounts set by the third-party mechanisms is realized.
Each of the second servers 130 may be a sub-process computer cluster (as a worker), and each of the second servers may be correspondingly provided with one or more IDC (Internet Data Center) accounts, where the IDC account is the secondary account. According to an embodiment of the disclosure, each second server may be connected to a third party organization, and one or more IDC accounts may be provided for the third party organization to process real-time deposit and withdrawal services of the third party organization. Wherein the same third party authority may, for example, connect to multiple second servers 130 simultaneously to use multiple IDC accounts. In order to improve service continuity as much as possible, balanced allocation of a plurality of IDC account resources set to a third party organization needs to be ensured.
In one embodiment, as shown in fig. 1B, the plurality of second servers 130 may, for example, provide a third party authority with six IDC accounts, a first IDC account, a second IDC account, … …, and a sixth IDC account. The six IDC accounts correspond to the same platform level primary account (i.e., the primary account set by the first service two). Each of the six IDC accounts may include, for example, a plurality of tertiary accounts, which may include a plurality (e.g., n) of deposit sub-accounts and a plurality (e.g., n) of payout sub-accounts. The remaining resource value of each IDC account may be, for example, the total deposit amount of the plurality of deposit sub-accounts included in each IDC account minus the total withdrawal amount of the plurality of withdrawal sub-accounts. Wherein n is a natural number greater than 1. It is to be understood that the account hierarchy in fig. 1B is merely an example to facilitate understanding of the present disclosure, and the present disclosure does not limit the number of IDC accounts corresponding to each platform-level primary account, and the number of tertiary accounts included in each IDC account. The system architecture of FIG. 1A may provide an account hierarchy similar to that shown in FIG. 1B for any legitimate third party organization.
The scheduling device 120 may be, for example, various electronic devices with processing capabilities, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, a server, and the like. The scheduling device 120 is specifically configured to monitor currently available credit lines of a plurality of IDC accounts stored by a plurality of second servers 130, that is, remaining resource values of a plurality of secondary accounts, so as to determine whether to allocate resources of the plurality of secondary accounts set by the same third-party organization according to the currently available credit lines of the secondary accounts. The scheduling device 120 is further configured to, when resources of multiple secondary accounts set by the same third-party organization need to be allocated, perform resource allocation through interaction with the first server and the second server stored in the multiple secondary accounts.
In accordance with an embodiment of the present disclosure, in the case where the 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 scheduling efficiency, the scheduling device 120 may be a single computer cluster, for example, to allocate resources in parallel. According to an embodiment of the present disclosure, the scheduling device 120 may also be integrated in any one of the plurality of second servers 130, or the scheduling device 120 may be integrated in the first server 110, for example, or the scheduling device 120 may be integrated in another server independent from the first server 110 and the third server 130. Each primary account corresponds to a plurality of secondary accounts set for a third party institution.
It should be noted that the resource allocation method provided by the embodiment of the present disclosure may be generally executed by the scheduling apparatus 120. Accordingly, the scheduling apparatus provided by the embodiment of the present disclosure may be the scheduling apparatus 120, and the distributed processing system provided by the embodiment of the present disclosure includes a server cluster formed by the first server 110, the scheduling apparatus 120, and a second server connected by the same third-party organization in the plurality of second servers 130.
It should be understood that the number and type of the first server, the scheduling means and the second server in fig. 1A are only illustrative. There may be any number and type of first servers, scheduling devices, and second servers, as desired for the 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 operation S201, operation S203, operation S205, operation S207, and operation S209, so as to ensure balanced allocation of resources of m secondary accounts set by the same third-party organization. The scheduling device 120 interacts with the first server 110 for setting the primary account and the second server 130 for storing the m secondary accounts, where the primary account corresponds to the m secondary accounts.
In operation S201, resource reference values for m secondary accounts are determined according to m remaining resource values of the m secondary accounts.
Wherein the remaining resource value may be, for example, a current available quota of each IDC account of the plurality of IDC accounts set by the second server. Operation S201 is specifically configured to determine the reference available quota of the m IDC accounts according to the current available quota of the m IDC accounts. Wherein m is a positive integer.
Wherein the resource reference value is a reference value for the second server to determine whether the redundant resource values of m secondary accounts need to be transmitted to the scheduling device in operation S203. In order to avoid the relevant interference of resources between the IDC accounts, processing logic for paying on average may be adopted, and the average of the remaining resource values of the m IDC accounts is used as a reference to instruct the second data server to determine whether to send the excess resource values of each of the m IDC accounts. Therefore, in operation S201, it may be specifically determined that the resource reference value of each of the m secondary accounts is an average value of the m remaining resource values. I.e. the reference available credit is determined as the average of the current available credits of the m IDC accounts.
It is to be understood 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 present disclosure does not limit the specific values of the resource reference value. The resource reference value may for example also be larger or smaller 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, and the plurality of tertiary accounts may include a plurality of cash-in sub-accounts and a plurality of cash-out sub-accounts. The remaining resource value of each secondary account may be, for example, the sum of the funds of the plurality of fund-charging sub-accounts minus the sum of the funds of the plurality of fund-discharging sub-accounts included in each secondary account. It is to be understood that the above description of the secondary accounts and the remaining resource values of the secondary accounts are merely exemplary to facilitate understanding of the present disclosure, and the present disclosure 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 indicating that the second server performs the operation may include, for example: firstly, determining whether to send redundant resource values of each secondary account in m secondary accounts according to the resource reference value; and then under the condition of determining to send respective redundant resource values of n secondary accounts in the m secondary accounts, updating respective residual resource values of the n secondary accounts.
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 instructs each second server to determine whether to transmit the redundant resource value of its stored IDC account. The redundant resource value may be a difference between the remaining resource value and the reference resource value, and specifically may be a redundant quota obtained by subtracting the reference available quota from the current available quota of the IDC account.
When the remaining resource value is greater than the reference resource value, it indicates that the current available quota of the IDC account stored by the second server is larger, and when the remaining resource value is smaller than the reference resource value, it indicates that the current available quota of the IDC account stored by the second server is smaller, and then the resource of the IDC account with the larger remaining resource value needs to be allocated to the IDC account with the smaller remaining 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 include: instructing the 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, sending the redundant resource value of the secondary account; and 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 the embodiment of the disclosure, if it is determined that the redundant resource value of n secondary accounts of m secondary accounts is greater than 0, it is determined to send the respective redundant resource value of the n secondary accounts. After the respective redundant resource values of the n secondary accounts are sent, in order to facilitate tracking and checking of the financial affairs, the second server may be instructed to update the respective redundant resource values of the n secondary accounts according to the sent respective redundant resource values of the n secondary accounts and generate third running water data corresponding to the updated redundant resource values of the n secondary accounts.
The sending of the redundant resource value may specifically be: and deducting the redundant quota on the basis of the current available quota of the IDC account set by the second server. Generating the third stream data may include, for example: and indicating the second server stored in the IDC account with the surplus amount deducted to record the allocation flow after deducting the surplus amount. Wherein n is a positive integer and n is less than m.
Operation S205 receives the redundant resource values of the n secondary accounts sent by the second server, so as to obtain n redundant resource values.
According to an embodiment of the present disclosure, the redundant resource value received in operation S205 may include, for example: determining a value of the redundant resource sent by the second server sending the stored value of the redundant resource of the IDC account. Specifically, the method may include receiving a deduction amount, stored in the IDC account after deducting the surplus amount, fed back by the second server.
In operation S207, n redundant resource values are pushed to the first server to indicate that the first server determines allocated resource values allocated to k secondary accounts of the m secondary accounts.
To facilitate determining the resource value assigned to each secondary account, all of the excess resource values received in operation S207 may be aggregated. Thus, a primary account corresponding to the m IDC accounts may be established, which is the account stored by the first server 110 as a summary account of excess resource values.
According to an embodiment of the present disclosure, the 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, the total redundant resource value of the primary account is updated according to the collected result, and the first redundant resource value is obtained. An allocated resource value is then determined based on the first total excess resource value. In order to further facilitate tracking and checking of the account, the resource allocation method may further instruct the first server to generate the first flow data corresponding to the first total excess resource value after obtaining the first total excess resource value. For example, a running record corresponding to the first total excess resource value may be generated in real time during the process of aggregating the n excess resource values.
According to the embodiment of the disclosure, in order to facilitate averaging the resources of each IDC account, the resource allocation process may be to averagely allocate the updated first total redundant resource value to m secondary accounts. Specifically, considering that the first total redundant resource value 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 the value obtained by dividing the first total redundant resource value by m is an integer, determining the allocated resource value allocated to each secondary account in the m secondary accounts as the value obtained by dividing the first total redundant resource value by m; and under the condition that the value obtained by dividing the first total redundant resource value by m is not an integer, determining the allocated resource value allocated to each secondary account in the m secondary accounts to be an integer value obtained by dividing the first total redundant resource value by m and rounding down.
According to the embodiment of the disclosure, the allocated resource value may specifically be an allocated quota to 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 present disclosure, considering that the total value of the redundant resources of the primary account, which is stored by the first data server before summarizing the n redundant resource values, may not be 0, the summarizing the n redundant resource values may specifically be obtained by superimposing the n redundant resource values on the basis of the total value of the redundant resources of the primary account, to obtain the first redundant resource value, so as to determine the allocated resource value allocated to the m secondary accounts according to the first redundant resource value.
According to an embodiment of the present disclosure, after determining the allocated resource values allocated to the m secondary accounts, the allocated resource values may be sent to the second server. In order to ensure the flow balance, before sending the allocated resource value allocated to the ith secondary account of the m secondary accounts to the second server, the quota issued to the ith secondary account needs to be deducted from the primary account stored in the first server, and only under the condition that the deduction of the primary account is successful, the allocated resource value allocated to the ith secondary account is sent to the second data server. Wherein the value of i is a positive integer of 1-m.
Therefore, the resource allocation method executed by the scheduling device should also instruct the first server to deduct the issued credit before sending the allocated resource value to the second server. The operation instructed by the first server in operation S207 may include, for example, the following operations: and deducting the allocated resource value allocated to each of the m secondary accounts from the first redundant resource total value until m deduction results aiming at the m secondary accounts are obtained, and determining k secondary accounts capable of sending the allocated resource value from the m secondary accounts according to the m deduction results. And the deduction result of each secondary account of the k secondary accounts represents that the issued credit is successfully deducted.
According to an embodiment of the present disclosure, the operation S207 indicates that the operation performed by the first server may include, for example, the operations S410, S430, S450, and S470 described in fig. 4, which are not described in detail herein.
In operation S209, an allocation resource value is sent to the second server to instruct the second server to update the remaining resource values of the k secondary accounts according to the allocation resource value.
According to an embodiment of the present disclosure, the operation S209 may be to first send the allocated resource value to the second server with the k secondary accounts, and then instruct the second server with the k secondary accounts to increase the allocated resource value on the basis of the current remaining resource values of the k secondary accounts, so as to obtain updated remaining resource values of the k secondary accounts. The allocation resource value may be an issued quota, and the updating of the remaining resource value may be: and increasing the issued credit line on the basis of the current available credit line of each IDC account.
According to an embodiment of the present disclosure, in order to facilitate checking accounts according to the method, the resource allocation method may further instruct the second server to generate fourth flow data corresponding to the updated remaining resource values of the k secondary accounts after instructing the second data server to update the remaining resource values of the k secondary accounts. Specifically, the method comprises the following steps: and indicating the second data server receiving the distributed issued credit to record the warehousing flow after updating the current available credit of the IDC account stored by the second data server.
In summary, in the resource allocation method executed by the scheduling apparatus according to the embodiment of the present disclosure, when performing balanced allocation of resources to m IDC accounts connected to a third party entity, it is not necessary to set a plurality of second servers of the m IDC accounts to be connected to each other. The resource balanced distribution can be realized only by the scheduling of the scheduling device and the control of the scheduling device on the first server and the second server. Therefore, the number of connections between the second servers stored in the m IDC accounts can be greatly reduced, and the difficulty of cross-server resource allocation is reduced. Therefore, each second server does not need to know the current residual resource condition of the IDC accounts stored by other second servers, and can realize cross-region and cross-server resource balance only by remitting the residual resources of the IDC accounts stored by the second server.
In an embodiment, the scheduling means may be arranged in the first server, for example. At this time, pushing the n redundant resource values to the first server in operation S207 may include, for example: and a first processing module integrated with a scheduling device in the first server pushes the n redundant resource values to a second processing module provided with a 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 a second server in which the scheduling device is arranged, wherein the second server is provided with secondary accounts belonging to m secondary accounts, and sending the resource reference value to other second servers provided with the secondary accounts belonging to m secondary accounts. The operation of sending the allocated resource value to the second server in operation S209 may include, for example: and sending the allocated resource value to a processing module of a second server in which the scheduling device is arranged, wherein the processing module is provided with secondary accounts belonging to m secondary accounts, and sending the allocated resource value to other second servers provided with the secondary accounts belonging to m secondary accounts.
Fig. 3A schematically shows 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 shows a flowchart of determining whether a remaining resource value satisfies a preset condition according to an embodiment of the present disclosure.
In consideration of the situation that the remaining resource value difference value between each of the m secondary accounts used by the third-party institution is small, if the m secondary accounts are subjected to resource division, unnecessary resources are consumed. Therefore, as shown in fig. 3A, the resource allocation method of the embodiment of the present disclosure needs to determine whether to perform resource averaging on 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, the operation S311 may be, for example: 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 between the m residual resource values is larger, and the m secondary accounts need to be subjected to resource division. If the difference value is smaller than the preset difference value, the difference value between the m residual resource values is smaller, and resource division does not need to be carried out on the m secondary accounts. Therefore, operation S201 is performed only if the m remaining resource values satisfy the preset condition to determine the 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, actual deviation degrees and actual deviation values of the m remaining resource values are determined. In operation S3113, in the case that 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.
Wherein, operation S3111 may specifically be: the maximum value M _ max and the minimum value M _ min of the M remaining resource values are determined, and then the actual deviation value d-M _ max-M _ min and the actual deviation L/M _ max-M _ min/M _ max are determined. The predetermined deviation degree and the value of the predetermined deviation value in operation S326 may be specifically set according to actual requirements, which is not limited by the present disclosure.
In summary, in the resource allocation method executed by the scheduling device according to the embodiment of the present disclosure, resource allocation is performed only when the deviation of the m remaining resource values of the m secondary accounts is large. Therefore, unnecessary resource allocation operation can be avoided to a certain extent, and resource consumption is reduced.
According to the embodiment of the disclosure, considering that after the excess resource value is deducted, the values of the remaining resource values of the n secondary accounts are the same as the resource reference value, if the total value of the excess resources obtained after the aggregation is divided into m secondary accounts, the resource imbalance condition still exists between the m secondary accounts. Therefore, in order to balance the resources among the m secondary accounts as much as possible, operation S207 may first exclude the secondary account with the higher remaining resource value after deducting the excess resource value according to the remaining resource values of the m secondary accounts and the first total excess resource value of the primary account, and only allocate resources to the l secondary accounts with the lower remaining resource value. Wherein l is a positive integer, and l should be less than or equal to m considering that l secondary accounts are obtained by screening m secondary accounts.
Fig. 4 schematically shows a flow chart of a scheduling apparatus instructing a first data server to perform an operation according to an embodiment of the present disclosure.
As shown in fig. 4, the operations instructed to be performed by the first server in operation S207 may include, for example, operations S410 to S470. The operation of determining the allocated resource values allocated to k secondary accounts out of the m secondary accounts may include, for example, operation S430, operation S450, and operation S470, among others.
In operation S410, the total excess resource value of the primary account is updated according to the n excess resource values, so as to obtain a first total excess resource value. The first redundant resource total value obtained in the operation S410 is the same as the first redundant resource total value, and is not described herein again.
In operation S430, according to the first total redundant resource value and the remaining resource values of the m secondary accounts, l secondary accounts needing to be allocated with resources and l allocated resource values allocated to the l secondary accounts are determined.
According to an embodiment of the present disclosure, the operation of determining, in operation S430, l secondary accounts needing to be allocated with resources may include, for example, cyclically excluding the 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, so as to obtain l secondary accounts. Operation S430 may determine an allocated resource value to be allocated to each of the l secondary accounts, for example, according to the average resource value for the l secondary accounts. Wherein, the average resource value for the l secondary accounts is: the sum of the first total remaining resource value and the remaining resource values of the l secondary accounts is relative to the average of the l secondary accounts. According to an embodiment of the present disclosure, the operation of determining the l secondary accounts needing to be allocated 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, and details are not described here.
According to the embodiment of the disclosure, when 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 to be a difference value between the average resource value and the remaining resource value of each secondary account. When the average resource value for the second-level accounts is not an integer, the allocation resource value allocated to each second-level account in the second-level accounts may be determined to be a difference between a rounded-down integer value of the average resource value and the remaining resource value of each second-level account.
In operation S450, the allocated resource values are sequentially deducted from the first total redundant resource value to obtain deduction results for the secondary accounts.
According to an embodiment of the present disclosure, the operation S450 may obtain l subtraction results by successively performing the operations S601 and S603 described in fig. 6, for example. 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, to which the deduction result successfully deducted is referred, in the l deduction results are determined, so as to obtain k secondary accounts.
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 specifically may include, for example: and determining the secondary account corresponding to the deduction value successfully deducted from the primary account as one of k secondary accounts. According to the embodiment of the disclosure, in order to facilitate determining the correspondence between the deduction result and the secondary account, the deduction result obtained by the first data server may be indicated to represent the corresponding secondary account, for example, in addition to being capable of representing whether the ith deduction value is successfully deducted. Specifically, the deduction result carries an identifier 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. And k is a positive integer, and k is considered to be obtained by screening from l secondary accounts, so that k is less than or equal to l.
FIG. 5 schematically shows a flow diagram for determining l secondary accounts that need to be allocated resources according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, in order to facilitate the first server to determine the l accounts needing to allocate resources, as shown in fig. 5, the operation S207, after pushing the n redundant resource values to the first server, of instructing the first server to determine the l secondary accounts needing to allocate resources may include, for example: and with m as the initial value of p, circularly executing operation S501, operation S503, operation S505, operation S507, operation S509 and operation S511 until the residual resource values of the p secondary accounts are all smaller than the average value obtained by dividing the total resource sum by p.
In operation S501, the sum of the first total redundant resource value and the remaining resource values of the p secondary accounts is determined, so as to obtain a total resource value. In operation S503, an average value obtained by dividing the resource value sum by p is determined. In operation S505, it is determined whether there is a secondary account with a remaining resource value greater than or equal to the average value among the p secondary accounts. The average value is similar to the aforementioned average resource value for the l secondary accounts, and is not described herein again.
If the operation S505 determines that the remaining resource values of the p secondary accounts are all smaller than the average value, which indicates that the p secondary accounts are all the accounts needing resource allocation, then operation S507 is executed to determine that the p secondary accounts are l secondary accounts.
In operation S505, if it is determined that the remaining resource value of only q (q is a positive integer smaller than p) secondary accounts among the p secondary accounts is smaller than the average value, it indicates that there is a secondary account with a remaining resource value greater than or equal to the average value among the p secondary accounts. At this time, operations S509 and S511 are performed.
In operation S509, secondary accounts with remaining resource values greater than or equal to the average value are excluded from the p secondary accounts, so as to obtain q secondary accounts. In operation S511, let p be q to set q secondary accounts as p secondary accounts, and return to the loop execution operation S501, operation S503, operation S505, operation S507, and operation S509.
According to an embodiment of the present disclosure, the determining l secondary accounts needing to be allocated with resources may include: first, a first sum of remaining 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 to calculate a first average value. And then 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 larger than or equal to the first average value, removing the secondary account so that the secondary account does not participate in fund allocation. And after all secondary accounts with the residual amounts larger than the first average value are planed, calculating a second sum of the residual amounts of the primary accounts and the residual amounts of the secondary accounts remained after planing, dividing the second sum by the number of the secondary accounts remained after planing, and calculating to obtain an average value serving as the second average value. And then planing off the secondary accounts with the remaining amount larger than or equal to the second average value in the remaining secondary accounts again. And repeating the steps until the remaining quota of all the remaining secondary accounts is smaller than the recalculated average value. The allocated resource value allocated for the final remaining secondary account may be, for example: and recalculating the difference value between the obtained average value and the remaining amount of the final remaining secondary account. Specifically, in the case that the average value is an integer, it is determined that the allocated resource values allocated to the respective l secondary accounts are: the difference between the average and the respective remaining resource values of the l secondary accounts. In the case that the average value is not an integer, determining that the allocated resource values allocated to the respective l secondary accounts are: the difference between the integer value of the average value rounded down and the respective remaining resource value 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, and 15, respectively, and the remaining amount of the primary account is 30. The first mean value calculated was (30+1+2+3+4+5+15)/6 ═ 10. Wherein, the secondary account with the remaining amount of 15 is the secondary account needing to be planed. And then remaining the remaining amount of the secondary account and the remaining amount of the primary account, wherein the remaining amounts of the secondary account and the primary account are 1, 2, 3, 4 and 5 respectively, and the calculated second average value is (30+1+2+3+4+ 5)/5-9. At this time, it can be determined that the secondary accounts with the remaining amounts of 1, 2, 3, 4 and 5 are all accounts needing to participate in fund allocation. The allocated resource values allocated to the five secondary accounts with the remaining quota of 1, 2, 3, 4 and 5 are respectively as follows: 8. 7, 6, 5 and 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 sent 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, first, the amount issued to the ith secondary account needs to be deducted from the primary account stored in the first server, and only when the deduction of the primary account is successful, the allocated resource value allocated to the ith secondary account is sent to the second server. Wherein, the value of i is a positive integer from 1 to m
Fig. 6 schematically shows a flow chart of sequentially deducting l allocated resource values from the first total excess resource value according to an embodiment of the present disclosure.
As shown in fig. 6, the resource allocation method executed by the scheduling device should further instruct the first data server to deduct the issued credit before sending the allocated resource value to the second server. The operation S207 indicates that the first server performs operations including operation S601, operation S603, operation S605, and operation S607 in addition to operation S501, operation S503, operation S505, operation S507, operation S509, and operation S511, until l deduction results are obtained, so as to determine k secondary accounts that can send allocation resource values among the l secondary accounts according to the l deduction results. Specifically, the operation instructed to be performed by the first server may include, for example, operations S601, S603, S605, and S607 performed successively until l deduction results are obtained.
In operation S601, the ith allocated resource value is subtracted from the first total excess resource value to obtain a second total excess resource value and an ith subtraction result. Wherein, the ith allocation resource value is, for example, an allocation resource value allocated to the ith secondary account in the l secondary accounts.
In operation S603, second streaming data corresponding to the second excess resource total value is generated. And the second running water data is the allocation running water recorded after the ith allocation resource value is deducted from the primary account.
According to the embodiment of the disclosure, in order to avoid the occurrence of confusion of deduction when there are a plurality of allocation resource values, l allocation resource values may be numbered to obtain allocation resource values numbered 1 to l. The specific procedure for obtaining l subtraction results is as follows: with 1 as the initial value of i, the ith allocated resource value of i is deducted by performing operation S601, operation S603, operation S605 and operation S607 in a loop until l deduction results are obtained. In operation S605, it is determined whether to obtain l deduction results, if yes, the deduction of the total value of the redundant resource is ended, and if no, operation S607 is executed, i is set to i +1, and then operation S601 is executed.
According to an embodiment of the present disclosure, the operation S605 may specifically be determining whether i is less than l, and if i is less than m, performing operation S607; if i is not less than l, the deduction of the total value of the redundant resources is finished.
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, a redundant resource value receiving module 705, and a second indicating module 707. The scheduling apparatus 700 may be, for example, the scheduling apparatus 120 in fig. 1A, and the scheduling apparatus 700 may interact with a first server 110 provided with a primary account and a second server 130 provided with m secondary accounts, where the m secondary accounts provided by the second server 130 are m IDC accounts provided to the same third party organization. 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 indicating module 703 is configured to send the resource reference value to the second server 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 respective redundant resource values of n secondary accounts sent by the second server, to obtain n redundant resource values (operation S205), where n is a positive integer and is smaller than m.
The second indicating module 707 is configured to push n redundant resource values to the first server to indicate that the first server determines one of the allocated resources allocated to k secondary accounts of the m secondary accounts (operation S207). Wherein k is a positive integer and is less than or equal to m.
The first indicating module 703 is further configured to send the allocated resource value to the second server to indicate 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 the m remaining resource values satisfy a preset condition.
According to an embodiment of the present disclosure, the preprocessing module 709 includes a processing sub-module 719 and a determination sub-module 739. The processing sub-module 719 is used to determine the actual degree and actual deviation values for the m remaining resource values (operation S3111). The determining sub-module 739 is used for determining that m remaining resource values satisfy the preset condition (operation S3113) in case that the actual deviation degree is larger than the predetermined deviation degree and the actual deviation value is larger than the predetermined deviation value.
According to an embodiment of the present disclosure, the first indicating module 703 is further configured to instruct the second server to update the remaining resource value of each of the n secondary accounts when determining to send the redundant resource value of each of the n secondary accounts. The second indicating module 707 is further configured to instruct the first server to update the total redundant resource value of the primary account according to the n redundant resource values, so as to obtain a first total redundant resource value (operation S410). The second indicating module 707 may be used, for example, to instruct the first server to determine allocated resource values to k 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 total redundant resource value and the respective residual resource values of the m secondary accounts (operation S430); deducting l allocated resource values from the first total redundant resource value in sequence to obtain l deduction results for l secondary accounts (operation S450); and determining the secondary accounts aiming at the deduction result which is successfully deducted from the l deduction results, 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 l secondary accounts needing to allocate resources includes: and circularly executing the following operations with the initial value m as p until the residual resource values of the p secondary accounts are all smaller than the average value obtained by dividing the sum of the resource values by p: determining the sum of the first total redundant resource value and the remaining resource values of the p secondary accounts to obtain a total resource value (operation S501); determining an average value obtained by dividing the sum of the resource values by p (operation S503); determining the secondary accounts with the remaining resource value smaller than the average value from the p secondary accounts, obtaining q secondary accounts (operations S505 and S509), and making p equal to q (operation S511). Wherein, in the case that the remaining resource values of the p secondary accounts are all smaller than the average value, it is determined that the p secondary accounts are the l secondary accounts (operation S507).
According to an embodiment of the present disclosure, the second instruction module 707 is specifically configured to instruct the first data server to: and under the condition that the average value obtained by dividing the sum of the resource values by l is an integer, determining that the allocated resource values allocated to the l secondary accounts are as follows: the difference between the average value and the respective residual resource values of the l secondary accounts; or, under the condition that 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 of the average value rounded down and the respective remaining resource value in the l secondary accounts.
According to an embodiment of the present disclosure, the second indicating module 707 is further configured to instruct the first server to generate first streaming data corresponding to the first total excess resource value after the first server updates the excess resource value of the primary account.
According to an embodiment of the present disclosure, the sequentially deducting l allocated resource values from the first excess resource total value includes: the following operations are performed in succession until l subtraction results are obtained: deducting the ith allocated resource value from the first excess resource total value to obtain a second excess resource total value and an ith deduction result (operation S601); and generating second streaming water data corresponding to the second excess resource total value (operation S603). Wherein, the ith deduction result is used for representing whether the ith allocation resource value is successfully deducted, and i is a positive integer belonging to [1, l ].
According to an embodiment of the present disclosure, the second indicating module 707 is further configured to, after instructing the second server to send the respective redundant resource values of the n secondary accounts, perform the following operations: updating the residual resource values of the n secondary accounts and generating third running water data, wherein the third running water data correspond to the updated residual resource values of the n secondary accounts; and/or the second instruction module 707 is further configured to generate fourth running water data after instructing 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 resource reference value determining module 701 is specifically configured to determine that the resource reference value of each of the m secondary accounts is an average value of the m remaining resource values.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of 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 a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the resource reference value determining module 701, the first indicating module 703, the redundant resource value receiving module 705, the second indicating module 707, the preprocessing module 709, the processing sub-module 719 and the determining sub-module 739 may be combined into one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to the embodiment of the present disclosure, at least one of the resource reference value determining module 701, the first indicating module 703, the excess resource value receiving module 705, the second indicating module 707, the preprocessing module 709, the processing sub-module 719 and the determining sub-module 739 may be at least partially implemented as a hardware circuit, 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 by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware and firmware, or an appropriate combination of any of them. Alternatively, at least one of the resource reference value determining module 701, the first indicating module 703, the excess resource value receiving module 705, the second indicating module 707, the pre-processing module 709, the processing sub-module 719 and the determining sub-module 739 may be at least partially implemented as a computer program module which, when executed, may perform a corresponding function.
Fig. 8 schematically shows a block diagram of a distributed processing system according to an embodiment of the present disclosure.
As shown in fig. 8, the distributed processing system 800 of the disclosed embodiment includes a scheduling apparatus 810, a server cluster 830, and a first server 850. The server cluster 830 includes a second server with m secondary accounts in the plurality of second servers 130 described in fig. 1A, and is configured to store resources of the m secondary accounts of the same third-party organization. The scheduling device 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 disclosure, the scheduling device 810 may be the scheduling device 120 described in fig. 1A, and the first server 850 may be the first server 110 described in fig. 1A. The scheduling means 810 is configured to: the operations described in fig. 2-6 are performed through interaction with the first server 850 and the second server setting m secondary accounts.
FIG. 9 schematically illustrates a block diagram of a computer system suitable for implementing a resource allocation method according to an embodiment of the present disclosure. The computer system illustrated in FIG. 9 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the 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 section 908 into a Random Access Memory (RAM) 903. Processor 901 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The 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 different actions of the method flows according to embodiments of the present 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 through a bus 904. The processor 901 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the programs may also 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 flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
System 900 may also include an input/output (I/O) interface 905, input/output (I/O) interface 905 also connected to bus 904, according to an embodiment of the present disclosure. The system 900 may also include one or more of the following components connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and 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 necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. 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 containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The computer program, when executed by the processor 901, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the 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 present 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, a computer-readable storage medium may include the ROM 902 and/or the RAM 903 described above and/or one or more memories other than the ROM 902 and the RAM 903.
The flowchart 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 various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been 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 separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (12)

1. A resource allocation method executed 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 the m remaining resource values of the m secondary accounts;
sending the resource reference value to the second server to instruct the second server to determine whether to send the set redundant resource value of each secondary account;
receiving respective redundant resource values of the n secondary accounts sent by the second server to obtain n redundant resource values;
pushing the n excess resource values to the first server to instruct the first server to determine allocated resource values allocated to k of the m secondary accounts; and
sending the allocated resource value to the second server to instruct the second server to update remaining resource values of the k secondary accounts according to the allocated resource value,
wherein m, n and k are positive integers, n is less than m, and k is less than or equal to m.
2. The method of claim 1, wherein the method further comprises, prior to determining the resource reference values for the m secondary accounts:
determining whether the m remaining resource values satisfy a preset condition;
determining resource reference values for the m secondary accounts if the m remaining resource values satisfy the preset condition.
3. The method of claim 2, wherein determining whether the m remaining resource values satisfy a preset condition comprises:
determining actual deviation degrees and actual deviation values of the m residual resource values;
in the case that the actual degree of deviation is greater than a predetermined degree of deviation 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 of claim 1, wherein:
the method further comprises instructing the second server to: under the condition that the respective redundant resource values of the n secondary accounts are determined to be sent, updating the respective residual 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 values of the redundant resources to obtain a first total value of the redundant resources;
determining allocated resource values allocated to k 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 total redundant resource value and the respective residual resource values of the m secondary accounts;
sequentially deducting the l distributed resource values from the first redundant resource total value to obtain l deduction results aiming at the l secondary accounts; and
and determining a secondary account which is aimed at by the deduction result which represents the successful deduction in the I deduction results to obtain the k secondary accounts, wherein I is a positive integer, and is greater than or equal to k and less than or equal to m.
5. The method of claim 4, wherein determining l secondary accounts requiring allocation of resources comprises: and circularly executing the following operations with the initial value m as p until the residual resource values of the p secondary accounts are all smaller than the average value obtained by dividing the sum of the resource values by p:
determining the sum of the first total redundant resource value and the residual resource values of the p secondary accounts to obtain the total resource value;
determining an average value obtained by dividing the sum of the resource values by the p; and
determining the secondary accounts with the residual resource value smaller than the average value in the p secondary accounts to obtain q secondary accounts, and making p equal to q,
and determining that the p secondary accounts are the l secondary accounts and q is a positive integer smaller than p under the condition that the residual resource values of the p secondary accounts are smaller than the average value.
6. The method of claim 5, wherein determining the/allocated resource values allocated to the/secondary accounts comprises:
and under the condition that the average value obtained by dividing the total sum of the resource values by the value l is an integer, determining that the allocated resource values allocated to the secondary accounts are as follows: a difference between the average and the respective remaining resource value of the l secondary accounts; or
Determining the allocated resource values allocated to the l secondary accounts respectively to be: the difference between the integral value of the average value rounded down and the respective remaining resource value of the l secondary accounts.
7. The method of claim 4, further comprising generating first streaming data corresponding to the first total excess resource value after instructing the first server to update the total excess resource value for the primary account.
8. The method of claim 7, wherein subtracting the/allocated resource values in order from the first total excess resource value comprises: the following operations are performed in succession until l subtraction results are obtained:
deducting the ith distributed 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 streaming water data corresponding to the second excess resource total value,
wherein 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 of claim 1, wherein:
the method further comprises the following operations after instructing the second server to send the respective redundant resource values of the n secondary accounts: updating the residual resource values of the n secondary accounts and generating third running water data, wherein the third running water data correspond to the updated residual resource values of the n secondary accounts; and/or
The method also includes generating fourth pipelining data after instructing the second server to update the remaining resource values of the k secondary accounts, the fourth pipelining data corresponding to the updated remaining resource values of the k secondary accounts.
10. The method of claim 1, wherein determining resource reference values for the m secondary accounts comprises:
determining the resource reference value of each secondary account in the m secondary accounts as follows: average of the m remaining resource values.
11. A scheduling device, wherein the scheduling device interacts with a first server and a second data 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:
a resource reference value determining module, configured to determine resource reference values for the m secondary accounts according to m remaining resource values of the m secondary accounts;
a first indicating module, configured to send the resource reference value to the second server, so as to indicate the second server to determine whether to send a set redundant resource value of each secondary account;
the redundant resource value receiving module is used for receiving respective redundant resource values of the n secondary accounts sent by the second server to obtain n redundant resource values;
a second indicating module for pushing the n excess resource values to the first server to indicate to the first server to determine allocated resource values allocated to k of the m secondary accounts,
wherein the first indication module is further configured to send the allocated resource value to the second server 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 less than m, and k is less than or equal to m.
12. A distributed processing system, comprising:
the system comprises a scheduling device and a server, wherein 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 accounts correspond to the m secondary accounts, and the scheduling device is configured to execute the method according to any one of claims 1-10;
a server cluster comprising the second server, the second server for storing resources of the m secondary accounts of a third party institution; 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 true CN111367667A (en) 2020-07-03
CN111367667B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112085486A (en) * 2020-08-24 2020-12-15 宝付网络科技(上海)有限公司 Method and system for improving fund issuing capacity
CN112764676A (en) * 2020-12-31 2021-05-07 北京三快在线科技有限公司 Resource allocation system and method

Citations (5)

* 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
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

Patent Citations (5)

* 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
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

Cited By (4)

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

Also Published As

Publication number Publication date
CN111367667B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
CN109858915B (en) Transaction system and service processing method
CN108052615B (en) Access request processing method, device, medium and electronic equipment
WO2021109921A1 (en) Method, device and apparatus for allocating resources to multiple accounts
US20220121467A1 (en) A method and a system for managing the computing resources of a cloud computing platform
CN111367667A (en) Scheduling device, resource allocation method executed by scheduling device, and distributed processing system
CN110443593B (en) Transaction processing method and device, transaction processing system and computer system
WO2021104349A1 (en) Cloud resource management method and apparatus, and electronic device and computer readable storage medium
CN110838031A (en) Data operation method and device based on ABtest
CN110223179B (en) Data processing method, device, system and medium for fund
CN115170321A (en) Method and device for processing batch transaction data
US10127083B2 (en) System and method for managing workload performance on billed computer systems
CN114924745A (en) Operation method and device of deep learning compiler and electronic equipment
US10673983B2 (en) Processing a unit of work
US20170323234A1 (en) Systems and methods for risk management in a geographically distributed trading system
WO2021013179A1 (en) Reserve allocation method and apparatus, and computer device
CN109729110B (en) Method, apparatus and computer readable medium for managing dedicated processing resources
US20220270067A1 (en) Transaction data processing method, device, apparatus and system
CN112995307A (en) Log processing method, system, device, electronic equipment and storage medium
CN109842665B (en) Task processing method and device for task allocation server
CN112181376A (en) Code resource management method, device, electronic equipment and medium
CN111782626A (en) Task allocation method and device, distributed system, electronic device and medium
WO2023088462A1 (en) Method and apparatus for processing data, device, and storage medium
CN111008767A (en) Internet financial technology architecture evaluation method, device, electronic equipment and medium
CN114048010A (en) Method, device, equipment and storage medium for controlling service timeout time
CN109410050B (en) Ore digging time consumption correction method, device and storage medium

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