CN110648232A - Method and device for controlling limit of processing node, storage medium and terminal - Google Patents

Method and device for controlling limit of processing node, storage medium and terminal Download PDF

Info

Publication number
CN110648232A
CN110648232A CN201910768319.1A CN201910768319A CN110648232A CN 110648232 A CN110648232 A CN 110648232A CN 201910768319 A CN201910768319 A CN 201910768319A CN 110648232 A CN110648232 A CN 110648232A
Authority
CN
China
Prior art keywords
quota
sender
request
account
credit
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.)
Pending
Application number
CN201910768319.1A
Other languages
Chinese (zh)
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.)
Shanghai Data Trading Center Ltd
Original Assignee
Shanghai Data Trading Center Ltd
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 Shanghai Data Trading Center Ltd filed Critical Shanghai Data Trading Center Ltd
Priority to CN201910768319.1A priority Critical patent/CN110648232A/en
Publication of CN110648232A publication Critical patent/CN110648232A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models
    • G06Q20/227Payment schemes or models characterised in that multiple accounts are available, e.g. to the payer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence

Abstract

A method and a device for controlling the limit of a processing node, a storage medium and a terminal are provided, wherein the processing node is in a distributed processing system, and the method comprises the following steps: receiving a first quota applying request, wherein the first quota applying request comprises an identifier of a sender; judging whether a second quota application request related to the sender exists in the process to be executed according to the identifier of the sender; when the judgment result shows that the second limit application request does not exist, determining the priorities of a plurality of accounts associated with the sender; and sequentially evaluating the account quota of each account according to the sequence of the priority from high to low so as to determine the success or failure of the quota application associated with the first quota application request. The scheme provided by the invention can effectively avoid the competition phenomenon of multiple processes on the same quota data at the same time, solve the quota competition problem under the high concurrency of the multiple processes, and realize quota splitting, so that quota management is more refined.

Description

Method and device for controlling limit of processing node, storage medium and terminal
Technical Field
The invention relates to the technical field of data distribution, in particular to a method and a device for controlling the limit of a processing node, a storage medium and a terminal.
Background
In highly concurrent data distribution systems, data demanders need to pay to query data resources of data suppliers. Specifically, the data demander may obtain the amount through account recharging, credit granting, and the like. Therefore, the management of the credit to the data demander is an important part of the data transaction link. However, this mechanism has the following problems:
1. multiple processes compete for the same quota data at the same time
In a highly concurrent system, a large number of users frequently access and update certain data in a short period of time. When the operation of writing the data base of the current process is not completed, the subsequent process reads the data base, the actual credit is not enough and the transaction can be carried out if the reading state of the subsequent process is the same as the reading state of the previous process, namely the real cost exceeds the credit.
2. The credit and balance are unified and difficult to control
The current credit (including the credit of the supplier and the credit of the data transaction platform) and the balance are managed by the same amount. This is inconvenient in terms of deduction and reconciliation.
Disclosure of Invention
The invention solves the technical problem of high concurrent quota competition of multiple processes.
To solve the above technical problem, an embodiment of the present invention provides a method for controlling a quota of a processing node, where the processing node is in a distributed processing system, and the method includes: receiving a first quota applying request, wherein the first quota applying request comprises an identifier of a sender; judging whether a second quota application request related to the sender exists in the process to be executed according to the identifier of the sender; when the judgment result shows that the second limit application request does not exist, determining the priorities of a plurality of accounts associated with the sender; and sequentially evaluating the account quota of each account according to the sequence of the priority from high to low so as to determine the success or failure of the quota application associated with the first quota application request.
Optionally, the first quota applying request is from a sender corresponding to the processing node.
Optionally, the distributed system further includes at least one distribution node, where the distribution node is configured to perform hash calculation on the identifier of the sender to determine a processing node corresponding to the sender, and send an amount application request sent by the sender to the corresponding processing node.
Optionally, for a plurality of accounts associated with the sender, the account credit of different accounts is sourced differently.
Optionally, the method for controlling the quota further comprises: and when the judgment result shows that the second quota applying request exists, adding the first quota applying request to the process to be executed.
Optionally, the method for controlling the quota further comprises: and after the second quota applying request is executed, executing the first quota applying request.
Optionally, the sequentially evaluating the account quota of each account according to the order of the priority from high to low to determine that the quota application success or failure associated with the first quota application request includes: judging whether the account quota of the account meets the application quota of the first quota application request from the account with the highest priority; when the judgment result shows that the account quota of any account in the plurality of accounts meets the application quota of the first quota application request, determining that quota application related to the first quota application request is successful; otherwise, determining that the first quota applying request is associated with quota applying failure.
To solve the above technical problem, an embodiment of the present invention further provides a device for controlling a quota of a processing node, where the processing node is in a distributed processing system, and the device includes: the system comprises a receiving module, a sending module and a sending module, wherein the receiving module is used for receiving a first quota applying request which comprises an identifier of a sender; the judging module is used for judging whether a second limit application request related to the sender exists in the process to be executed according to the identifier of the sender; the determining module is used for determining the priorities of a plurality of accounts associated with the sender when the judging result shows that the second limit application request does not exist; and the evaluation module is used for sequentially evaluating the account quota of each account according to the sequence of the priority from high to low so as to determine success or failure of quota application associated with the first quota application request.
To solve the above technical problem, an embodiment of the present invention further provides a storage medium having stored thereon computer instructions, where the computer instructions execute the steps of the above method when executed.
In order to solve the above technical problem, an embodiment of the present invention further provides a terminal, including a memory and a processor, where the memory stores computer instructions capable of being executed on the processor, and the processor executes the computer instructions to perform the steps of the method.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a method for controlling the quota of a processing node, wherein the processing node is positioned in a distributed processing system and comprises the following steps: receiving a first quota applying request, wherein the first quota applying request comprises an identifier of a sender; judging whether a second quota application request related to the sender exists in the process to be executed according to the identifier of the sender; when the judgment result shows that the second limit application request does not exist, determining the priorities of a plurality of accounts associated with the sender; and sequentially evaluating the account quota of each account according to the sequence of the priority from high to low so as to determine the success or failure of the quota application associated with the first quota application request. By adopting the scheme of the embodiment, the competition phenomenon of the multiple processes on the same quota data at the same time can be effectively avoided, the quota competition problem under the high concurrency of the multiple processes is solved, and quota splitting is realized, so that quota management is more refined.
Further, the first quota applying request comes from a sender corresponding to the processing node. Therefore, the requests of the same sender in the distributed processing system can all fall on the same processing node to be executed in a more efficient mode, and the possible quota competition situation when a plurality of processing nodes process different requests of the same sender at the same time is avoided.
Further, the distributed system also comprises at least one distribution node, wherein the distribution node is used for carrying out Hash calculation on the identification of the sender to determine a processing node corresponding to the sender and sending the quota application request sent by the sender to the corresponding processing node. Therefore, load balancing can be achieved through nginx, and meanwhile the requests of the same sender are guaranteed to fall on the same processing node to be executed in a mode with higher execution efficiency, and therefore the problem of quota competition under multi-process high concurrence is effectively solved.
Drawings
FIG. 1 is a flowchart of a method for controlling the quota of a processing node according to an embodiment of the present invention;
FIG. 2 is a flowchart of one embodiment of step S104 of FIG. 1;
FIG. 3 is a schematic structural diagram of a credit control device of a processing node according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an exemplary application scenario of the embodiment of the present invention.
Detailed Description
As mentioned in the background art, the credit management mechanism in the existing data distribution system has many defects, and cannot solve the problem of credit competition under multi-process high concurrency, and the management of the user account is not optimized.
On the other hand, in the distributed processing system, the system dynamically allocates tasks according to factors such as the busy level of each node, which results in that multiple credit application requests respectively sent by the same data demander for multiple data distribution are allocated to multiple nodes for processing. Taking the balance of the data demander as 100 as an example, the data demander firstly sends a quota application request 1 to request for data distribution operation a, the distributed processing system distributes the quota application request 1 to the node A for processing, and the required quota of the quota application request 1 is 90; during the processing of the node A, the data demander sends a credit application request 2 to request to perform data distribution operation B, the distributed processing system distributes the credit application request 2 to the processing of the node B, and the required credit of the credit application request 2 is 60.
Because the A node and the B node can not communicate messages and do not know that other nodes are also processing other quota application requests of the data demander, when the A node processes the quota application request 1, the balance of the data demander is 100, and the data distribution operation a is allowed; similarly, when the node B processes the credit application request 2, the node B allows the data distribution operation B to be performed because the balance of the data demander is 100. In practice, however, the accumulated demand credit of credit application requests 1 and 2 has exceeded the balance of the data demander.
To solve the above technical problem, an embodiment of the present invention provides a method for controlling a quota of a processing node, where the processing node is in a distributed processing system, and the method includes: receiving a first quota applying request, wherein the first quota applying request comprises an identifier of a sender; judging whether a second quota application request related to the sender exists in the process to be executed according to the identifier of the sender; when the judgment result shows that the second limit application request does not exist, determining the priorities of a plurality of accounts associated with the sender; and sequentially evaluating the account quota of each account according to the sequence of the priority from high to low so as to determine the success or failure of the quota application associated with the first quota application request.
The technical personnel in the field understand that the scheme of the embodiment can effectively avoid the competition phenomenon of multiple processes for the same quota data at the same time, solve the quota competition problem under the high concurrency of the multiple processes, and realize quota splitting, so that quota management is more refined.
The "data trading platform" as presented herein refers to: a portal that provides data transaction services to users. Through the data transaction platform, users serving as data suppliers and data demanders can realize services of commodity listing, demand release, data ordering, transaction management, information inquiry, clearing and settlement and the like of data transaction, and in the quota control application scene, settlement and quota file push are mainly involved.
The "Data Delivery System (DDS) referred to herein means: a system for performing data distribution operations. Specifically, the DDS may be responsible for connecting to a service system at a data supplier or a data demander for data distribution. The DDS is generally deployed in a front-end processor, the DDS of the demander can transmit a desired data Identifier (ID) to the DDS of the supplier, and the DDS of the supplier can also transmit data to be provided to the DDS of the demander. The user can be connected with the DDS through the data transaction platform to perform data transaction.
The "value unit" appearing herein means: the amount of money the user can use in the data transaction platform to perform the data distribution. In this embodiment, the amount may include a recharge amount and an overdraft amount. Wherein, the recharging amount is the amount actually recharged by the user; the overdraft limit is a credit limit that the data transaction platform or other user provides based on the user's credit. For example, the overdraft limit may be obtained based on the way the donor is credited and/or the platform is credited.
"top-up" as presented herein means: and transferring the funds in the user's own account into the data transaction platform account.
The expression "cash-out" as used herein means: and the user transfers funds which can be used for cash withdrawal in the data transaction platform account into a bank card or an available balance which can be used for data transaction consumption in the data transaction platform.
"trust adjustment" as presented herein refers to: and according to the requirement of business development, the credit limit given to the data demander by the data transaction platform or the data supplier is increased or reduced. The data transaction platform can be understood as a third party platform, plays a role of an intermediate bridge connecting a data supplier and a data demander, and provides the data transaction platform.
"comp adjustments" as appearing herein refers to: according to the needs of business development, the donation amount given to the data demander by the data transaction platform or the data supplier is increased or reduced. For example, the data supplier or the data transaction platform has a trust relationship with the data demander, and can give credit to the data demander.
"reconciliation" as it appears herein means: and adjusting the fund account of the user at the data transaction platform side, so that the account amount accords with the real transaction condition.
"clearing" as used herein means: the process of supervising account funds at the bank side is changed according to transaction consumption and expenditure of a user within a certain time period.
As used herein, the term "data demander" refers to a demander of data. The data demander places an order through the data transaction platform to find a data supplier capable of providing data so as to obtain the desired data.
A "data supplier" as referred to herein refers to a supplier of data. The data supplier may supply data to the data demander.
"Redis cluster" as presented herein refers to: and introducing a third-party memory database cluster. The method provides convenient and fast data caching service, and is used for realizing process communication and caching data in a data distribution system.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
FIG. 1 is a flowchart of a method for controlling a quota of a processing node according to an embodiment of the present invention. The solution described in this embodiment may be executed by the processing node, and the processing node may be one or more servers in communication.
In this embodiment, the processing node may be in a distributed processing system, and the distributed processing system may be configured to maintain a credit Control center (BCC), where the credit Control center is configured to manage and Control credits of a data acquirer and a data supplier in a data transaction platform.
Specifically, in this embodiment, the method for controlling the quota of the processing node may include the following steps:
step S101, receiving a first quota applying request, wherein the first quota applying request comprises an identifier of a sender;
step S102, judging whether a second limit application request related to the sender exists in the process to be executed according to the identification of the sender;
when the judgment result in the step S102 is negative, that is, when the second quota applying request does not exist, executing step S103, and determining priorities of a plurality of accounts associated with the sender; and step S104, sequentially evaluating the account quota of each account according to the sequence of the priority from high to low so as to determine success or failure of quota application associated with the first quota application request.
When the judgment result in the step S102 is positive, that is, there is the second credit line applying request, execute step S105, and add the first credit line applying request to the process to be executed.
More specifically, the first credit application request may be from a sender corresponding to the processing node. Wherein, the correspondence means: all credit line application requests sent by the same sender are distributed to the same processing node for execution.
In one or more embodiments, one processing node may correspond to multiple senders, however, all credit application requests of the same sender are only distributed to the corresponding processing node.
In one or more embodiments, the distributed system may further include at least one distribution node, where the distribution node may be configured to perform hash (hash) calculation on the identifier of the sender to determine a processing node corresponding to the sender, and send a quota application request sent by the sender to the corresponding processing node.
The inventor of the present application finds, through analysis, that when performing credit control in a distributed environment, the prior art generally adopts a distributed lock to avoid credit competition in a multi-process high concurrency. However, this method is not efficient in terms of execution efficiency.
Therefore, in this embodiment, nginx is used as load balancing, the allocation node performs hash calculation on the identifier of the transmitting party to obtain a numerical value, the numerical value is divided by the whole number of nodes to obtain a remainder, and the remainder is the processing node corresponding to the transmitting party. Therefore, all credit application requests sent by the same sender can be distributed to the same processing node, and the credit requests of the corresponding sender are processed by a single service. Wherein the number of nodes may refer to the number of processing nodes comprised by the distributed processing system.
Further, if one of the processing nodes hangs, the new processing node can still effectively process the credit request because the data still exists in Redis.
Therefore, when load balancing is achieved through nginx, the requests of the same sender are guaranteed to fall on the same processing node to be executed in a mode with higher execution efficiency, the problem of quota competition under multi-process high concurrency is effectively solved, and resource consumption caused by distributed locks is avoided.
In one or more embodiments, the process to be executed may include all outstanding tasks of the processing node.
In one or more embodiments, the second credit line application request can be a credit line application request sent by the sender and arriving at the processing node before the first credit line application request.
In one or more embodiments, the number of the second credit line applying requests can be one or more, that is, in the process of waiting to be executed, before the time of receiving the first credit line applying request, a plurality of second credit line applying requests can exist and wait to be executed.
In one or more embodiments, when the determination result in the step S102 is negative, it indicates that no request for requesting credit associated with the sender has not been processed yet in the process to be executed. Meanwhile, since all the credit line application requests of the sender are distributed to the processing node for execution, the step S102 can be executed to simply and intuitively determine that there is no credit line competition problem for the sender currently.
In one or more embodiments, the sender is associated with a plurality of accounts, wherein the account credits of different accounts are sourced differently. For example, the account may be selected from: recharge amount, supplier credit and platform credit.
Further, the account amount can be understood as the expense that the sender can consume, and different accounts can have a priority in advance, wherein the priority is used for indicating the deduction sequence.
For example, the sender may preset the highest priority of the account associated with the platform credit and the lowest priority of the account associated with the recharge amount.
In one or more embodiments, the processing node may store a setting result of the sender for each account priority in advance.
In one or more embodiments, when the determination result in the step S102 is positive, it indicates that at least one pending credit line application request sent by the sender exists in the to-be-executed process, and to avoid credit line contention, the processing node executes the step S105 to add the first credit line application to the to-be-executed process and queue for execution.
In one or more embodiments, after step S105, the method for controlling the quota may further include: step S106, after the second quota applying request is executed, the first quota applying request is executed.
When the second credit line application request includes credit line application requests sent by a plurality of the senders, the step S106 may include: and in the process to be executed, executing the first quota applying request when the quota applying requests sent by all the sending parties are executed completely and are arranged before the first quota applying request.
Specifically, the quota application requests in the process to be executed may be sorted according to the time sequence of reaching the processing node.
In one or more embodiments, referring to fig. 2, the step S104 may include the steps of:
step S1041, starting from the account with the highest priority, judging whether the account quota of the account meets the application quota of the first quota application request;
when the judgment result of the step S1041 is positive, that is, the account quota of any account of the plurality of accounts meets the application quota of the first quota application request, execute step S1042, and determine that the quota application associated with the first quota application request is successful;
and when the judgment result of the step S1041 is negative, that is, the account quota of all the accounts in the plurality of accounts cannot satisfy the application quota of the first quota application request, executing step S1043 to determine that the quota application associated with the first quota application request fails.
Specifically, the first credit line application request can indicate the application credit line in an explicit or implicit mode.
For example, the first credit line application request may indicate a specific value of the application credit line, and in response to receiving the first credit line application request, the processing node may visually extract the application credit line of the sender this time from the request.
For another example, to reduce signaling overhead, the first quota applying request may indicate a number, and the processing node may search a preset mapping table according to the number to determine a specific numerical value of the quota applied by the sender this time, where the preset mapping table may record a plurality of numerical values and corresponding numbers, and the preset mapping table may be stored in the processing node and the server of the sender in advance.
More specifically, the processing node may store account amounts of each account of the sender.
In one or more embodiments, the determination result of step S1041 may also be considered as positive if the following occurs: and the sum of the account quota of the plurality of accounts of the sender meets the application quota of the first quota application request. Correspondingly, after determining that the first limit application request is associated with the limit application success, when carrying out limit deduction operation, the account limits in the plurality of accounts can be deducted in sequence according to the priority order until the deducted limit total is equal to the application limit.
In one or more embodiments, the processing node may periodically interact with the data transaction platform to obtain the latest account credit of each account of the sender.
In one or more embodiments, after step S1042, the processing node may instruct the DDS to perform a data distribution operation directed by the first credit application request.
In one or more embodiments, after step S1043, the processing node may indicate that the DDS fails to apply for the quota, so that the DDS does not perform the data distribution operation pointed by the first quota application request.
By adopting the scheme of the embodiment, the requests of the same sender in the distributed processing system can all fall on the same processing node to be executed in a more efficient mode, the problem of quota competition under multi-process high concurrency is solved, quota splitting is realized, and quota management is more refined.
FIG. 3 is a diagram illustrating a structure of a credit control device of a processing node according to an embodiment of the present invention. Those skilled in the art will understand that the credit control device 3 of the processing node (hereinafter, referred to as the credit control device 3) of the present embodiment may be used to implement the method solutions described in the embodiments shown in fig. 1 and fig. 2.
In particular, the processing nodes may be in a distributed processing system.
More specifically, in this embodiment, the credit line control device 3 may include: the receiving module 31 is configured to receive a first quota applying request, where the first quota applying request includes an identifier of a sender; a judging module 32, configured to judge whether a second quota applying request associated with the sender exists in a process to be executed according to the identifier of the sender; the determining module 33 is used for determining the priorities of a plurality of accounts associated with the sender when the judgment result shows that the second quota applying request does not exist; and the evaluation module 34 is used for sequentially evaluating the account quota of each account according to the sequence of the priority from high to low so as to determine whether the quota application associated with the first quota application request is successful or failed.
In one or more embodiments, the first credit application request may be from a sender corresponding to the processing node.
In one or more embodiments, the distributed system may further include at least one distribution node, where the distribution node may be configured to perform hash calculation on the identifier of the sender to determine a processing node corresponding to the sender, and send a quota application request sent by the sender to the corresponding processing node.
In one or more embodiments, the source of the account credit for different accounts may be different for multiple accounts associated with the sender.
In one or more embodiments, the credit control device 3 may further include: and the adding module 35 is used for adding the first quota applying request to the process to be executed when the judgment result shows that the second quota applying request exists.
Further, the credit line control device 3 may further include: and the execution module 36 is used for executing the first quota applying request after the second quota applying request is executed.
In one or more embodiments, the evaluation module 34 may include: the determining sub-module 341 is configured to determine, from the account with the highest priority, whether the account quota of the account meets the application quota of the first quota application request; the first determining sub-module 342 determines that the quota application associated with the first quota application request is successful when the judgment result indicates that the account quota of any account in the plurality of accounts meets the application quota of the first quota application request; and the second determining sub-module 343, when the determination result indicates that the account quota without an account in the plurality of accounts meets the application quota of the first quota application request, determining that the quota application associated with the first quota application request fails.
For more details on the working principle and working mode of the credit control device 3, reference may be made to the description in fig. 1 and 2, which are not repeated here.
In a typical application scenario, referring to fig. 4, as a data demander, a sender (not shown) may send a data distribution request to the data distribution system 41 through a data transaction platform (not shown). Accordingly, the data distribution system 41 may perform operation s1 to send the first credit application request to the credit control center 42. The first quota applying request can comprise the identification of the sender and the quota applying.
The data distribution system 41 may include a plurality of servers.
The distributed processing system equipped with the quota control center 42 may include a plurality of distribution nodes and a plurality of processing nodes, and in this scenario, the distributed processing system distribution node 421, the distribution node 422, the processing node 423, the processing node 424, and the processing node 425 are specifically described as examples.
Specifically, assuming that the first quota applying request is sent to the distribution node 421, the distribution node 421 may determine the processing node corresponding to the sender by performing hash calculation and dividing the result of the hash calculation by the number of processing nodes.
In this scenario, assuming that the sender corresponds to the processing node 424, the distribution node 421 may perform operation s2 to send the first credit line application request to the processing node 424.
In response to receiving the first credit line application request, the processing node 424 may determine whether its to-be-executed process includes a second credit line application request associated with the sender.
When the determination result indicates that the to-be-executed process includes the second credit line application request associated with the sender, the processing node 424 may add the first credit line application request to the to-be-executed process.
When the determination result indicates that the process to be executed does not include the second credit line application request associated with the sender, the processing node 424 may execute the first credit line application request.
Specifically, the processing node 424 may store priorities of a plurality of accounts associated with the sender, and account amounts of the accounts.
Further, the processing node 424 may sequentially compare the account quota with the demand quota according to a sequence from a high priority to a low priority, and when the comparison result indicates that the account quota of a certain account of the sender meets the demand quota, the processing node 424 sends a feedback message to the data distribution system 41 to indicate that the quota application is successful.
When the comparison result shows that the sender does not have any account credit of the account to meet the demand credit, the processing node 424 sends feedback information to the data distribution system 41 to indicate that the credit application fails.
Further, the processing node 424 may execute operation s3 to write the processing result of the first credit application request into the Redis cluster 43.
Further, the account priority and the account amount of the sender may also be stored in the Redis cluster 43, and the processing node 424 may access the Redis cluster 43 to obtain the required information. When the processing node 424 is abnormal, other processing nodes may obtain required data by accessing the Redis cluster 43 to continue to execute the task of the processing node 424.
In this scenario, when the sender sends a new request for credit to the distribution node 422, even if the new request for credit is sent to the distribution node 422, the new request for credit can be sent to the processing node 424 by the distribution node 422 by performing hash calculation and remainder operation according to the number of processing nodes.
Further, the embodiment of the present invention also discloses a storage medium, on which computer instructions are stored, and when the computer instructions are executed, the technical solution of the method described in the embodiments shown in fig. 1 and fig. 2 is executed. Preferably, the storage medium may include a computer-readable storage medium. The storage medium may include ROM, RAM, magnetic or optical disks, etc.
Further, an embodiment of the present invention further discloses a terminal, which includes a memory and a processor, where the memory stores computer instructions capable of being executed on the processor, and the processor executes the technical solution of the method in the embodiment shown in fig. 1 and fig. 2 when executing the computer instructions. For example, the terminal may be a processing node.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A method for controlling the credit of a processing node in a distributed processing system, comprising:
receiving a first quota applying request, wherein the first quota applying request comprises an identifier of a sender;
judging whether a second quota application request related to the sender exists in the process to be executed according to the identifier of the sender;
when the judgment result shows that the second limit application request does not exist, determining the priorities of a plurality of accounts associated with the sender;
and sequentially evaluating the account quota of each account according to the sequence of the priority from high to low so as to determine the success or failure of the quota application associated with the first quota application request.
2. The credit control method of claim 1, wherein the first credit application request is from a sender corresponding to the processing node.
3. The credit control method of claim 2, wherein the distributed system further comprises at least one distribution node, and the distribution node is configured to perform a hash calculation on the identifier of the sender to determine a processing node corresponding to the sender, and send a credit application request sent by the sender to the corresponding processing node.
4. The credit control method of claim 1, wherein the account credit of different accounts is sourced from different sources for a plurality of accounts associated with the sender.
5. The credit control method of claim 1, further comprising:
and when the judgment result shows that the second quota applying request exists, adding the first quota applying request to the process to be executed.
6. The credit control method of claim 5, further comprising:
and after the second quota applying request is executed, executing the first quota applying request.
7. The credit control method of claim 1, wherein the sequentially evaluating account credits of accounts according to a priority order from high to low to determine success or failure of the first credit application request for requesting the associated credit application comprises:
judging whether the account quota of the account meets the application quota of the first quota application request from the account with the highest priority;
when the judgment result shows that the account quota of any account in the plurality of accounts meets the application quota of the first quota application request, determining that quota application related to the first quota application request is successful;
otherwise, determining that the first quota applying request is associated with quota applying failure.
8. An apparatus for controlling the credit of a processing node in a distributed processing system, comprising:
the system comprises a receiving module, a sending module and a sending module, wherein the receiving module is used for receiving a first quota applying request which comprises an identifier of a sender;
the judging module is used for judging whether a second limit application request related to the sender exists in the process to be executed according to the identifier of the sender;
the determining module is used for determining the priorities of a plurality of accounts associated with the sender when the judging result shows that the second limit application request does not exist;
and the evaluation module is used for sequentially evaluating the account quota of each account according to the sequence of the priority from high to low so as to determine success or failure of quota application associated with the first quota application request.
9. A storage medium having stored thereon computer instructions, wherein said computer instructions when executed perform the steps of the method of any of claims 1 to 7.
10. A terminal comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, wherein the processor, when executing the computer instructions, performs the steps of the method of any one of claims 1 to 7.
CN201910768319.1A 2019-08-20 2019-08-20 Method and device for controlling limit of processing node, storage medium and terminal Pending CN110648232A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910768319.1A CN110648232A (en) 2019-08-20 2019-08-20 Method and device for controlling limit of processing node, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910768319.1A CN110648232A (en) 2019-08-20 2019-08-20 Method and device for controlling limit of processing node, storage medium and terminal

Publications (1)

Publication Number Publication Date
CN110648232A true CN110648232A (en) 2020-01-03

Family

ID=69009737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910768319.1A Pending CN110648232A (en) 2019-08-20 2019-08-20 Method and device for controlling limit of processing node, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN110648232A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015200493A1 (en) * 2014-06-27 2015-12-30 Amazon Technologies, Inc. Rolling resource credits for scheduling of virtual computer resources
CN105335297A (en) * 2014-08-06 2016-02-17 阿里巴巴集团控股有限公司 Distributed memory and database based data processing method, apparatus and system
CN108694588A (en) * 2018-04-13 2018-10-23 平安普惠企业管理有限公司 Virtual resource requesting method and terminal device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015200493A1 (en) * 2014-06-27 2015-12-30 Amazon Technologies, Inc. Rolling resource credits for scheduling of virtual computer resources
CN105335297A (en) * 2014-08-06 2016-02-17 阿里巴巴集团控股有限公司 Distributed memory and database based data processing method, apparatus and system
CN108694588A (en) * 2018-04-13 2018-10-23 平安普惠企业管理有限公司 Virtual resource requesting method and terminal device

Similar Documents

Publication Publication Date Title
US8701117B2 (en) Resource consumption template processing model
CN108446975B (en) Quota management method and device
CN110443695A (en) Data processing method and its device, electronic equipment and medium
CN108154298B (en) Distribution task allocation method and device, electronic equipment and computer storage medium
CN111460504B (en) Service processing method, device, node equipment and storage medium
CN111553699B (en) Resource scheduling method and device
CN112132674A (en) Transaction processing method and device
CN114155026A (en) Resource allocation method, device, server and storage medium
CN109801425A (en) Queue poll reminding method, device, equipment and storage medium in the label business of face
CN106034148A (en) Fast information interaction method, local server, remote server and system
CN110648232A (en) Method and device for controlling limit of processing node, storage medium and terminal
CN111491015A (en) Preheating task processing method and system, proxy server and service center
CN112669160B (en) Data processing method and device, electronic equipment and storage medium
CN110648129A (en) Quota control method and device for batch distribution system, storage medium and terminal
CN110033145B (en) Financial sharing job order separating method and device, equipment and storage medium
US10552900B2 (en) Asset inventory system
CN113312359A (en) Distributed job progress calculation method and device and storage medium
JP7000549B1 (en) Information processing equipment, methods and programs
US20220366425A1 (en) Service management system for processing a request
JP7221927B2 (en) Information processing device, method and program
CN109711992B (en) Resource transfer method, device, system, electronic device and medium
KR100802092B1 (en) Method and system for billing based on the client-server
CN113763177A (en) Method and device for controlling concurrent processing of proxy hotspot accounts
CN114529287A (en) Service processing method and device, electronic equipment and computer readable medium
CN115619566A (en) Data processing method and device, electronic equipment 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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200103