CN109670807A - It withholds control method, device, equipment and readable storage medium storing program for executing - Google Patents
It withholds control method, device, equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN109670807A CN109670807A CN201811394571.2A CN201811394571A CN109670807A CN 109670807 A CN109670807 A CN 109670807A CN 201811394571 A CN201811394571 A CN 201811394571A CN 109670807 A CN109670807 A CN 109670807A
- Authority
- CN
- China
- Prior art keywords
- withholing
- request
- server end
- withhold
- locking
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/10—Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
- G06Q20/108—Remote banking, e.g. home banking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/22—Payment schemes or models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/40—Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
- G06Q20/407—Cancellation of a transaction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/02—Banking, e.g. interest calculation or account maintenance
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Technology Law (AREA)
- Marketing (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
It withholds control method, device, equipment and readable storage medium storing program for executing the invention discloses one kind, based on distributed cloud deployment techniques, the described method includes: receive withhold request when, according to the current request number to be processed of the multiple server end determine described in withhold the destination server end of request;Locking processing is carried out to the request of withholing, locks that treated by described request of withholing is sent to the destination server end, so that described withhold requests corresponding user account is corresponding to execute the operation of withholing prestored to locking that treated at the destination server end.The technical issues of present invention solves existing bank when withholing, and Yi Chongfu withholds and influences user experience.
Description
Technical field
It withholds control method, device, equipment and readable storage medium the present invention relates to financial technology field more particularly to one kind
Matter.
Background technique
Currently, bank is that the server end based on distributed deployment withholds in real time to user, disposed with single-point type
Server end to carry out real-time deduction mode to user different, user is detained in real time based on the server end of distributed deployment
Money will cause the case where repetition is withholdd often, for example, attendant because accidentally triggering the button to same account in a short time
Money operates and corresponds to generation and withholdd when requesting twice, and often will cause repetition withholds, namely generate withhold twice request when, by
It is that competition process is withholdd request in the server end of distributed deployment, if a certain request of withholing of one of server process
When, the processing that another server also will do it another request of withholing (since server is distributed, thus can not identify and be
It is no that there are duplicate requests of withholing), thus, it repeats still to be difficult to eliminate the phenomenon that withholing.
Summary of the invention
It withholds control method, device, equipment and readable storage medium storing program for executing the main purpose of the present invention is to provide one kind, it is intended to
Existing bank is solved when withholing, the technical issues of Yi Chongfu withholds and influences user experience.
To achieve the above object, the present invention provides one kind and withholds control method, and the control method of withholing is applied to collection
System, the collection system include multiple server ends of distributed distribution, and the control method of withholing includes:
Receive withhold request when, according to the multiple server end, current request number to be processed determines the button
The destination server end of money request;
Locking processing is carried out to the request of withholing, by it is described lock that treated and withhold request and be sent to the target take
Be engaged in device end, for the destination server end withhold to lock that treated described request corresponding user account it is corresponding execute it is pre-
The operation of withholing deposited.
Optionally, it is described to the request of withholing carry out lock processing step include:
The con current control program segment prestored is called, with request of withholing described in interception;
The distributed locking mode provided based on Redis database carries out locking processing to the request of withholing.
Optionally, the distributed locking mode provided based on Redis database locks the request of withholing
Processing step includes:
It withholds described in acquisition and requests corresponding user account, the IP address at destination server end and preset lock time-out
Between;
Based on Redis database, set prestoring the in distributed locking mode for the user account and default prefix
The IP address at the destination server end is set as prestoring in distributed locking mode by the first content of parameter of one parameter key
The second content of parameter of second parameter value will be set as prestoring the between the preset lock time-out in distributed locking mode
The third content of parameter of three parameter second requests corresponding target to be locked to obtain described withhold;
The target is locked and carries out verification processing, it is determined whether receives default return value;
If receiving default return value, it is determined that request of withholing described in successfully locking.
Optionally, if described receive default return value, it is determined that include: after request step of withholing described in successfully locking
Request of withholing described in after successfully locking is stored in Redis database, and Redis data described in timing scan
Treated withholds request for each locking stored in library;
If detect it is each lock treated withhold request the storage time in Redis database be greater than lock time-out between
When, then the storage time is greater than to lock and timeless lock that treated request of withholing is unlocked processing.
Optionally, described to lock that treated by described request of withholing is sent to the destination server end, for described
To locking that treated, described withhold requests corresponding user account is corresponding to execute the operation step of withholing prestored at destination server end
Include: after rapid
If detecting, to locking that treated, described withhold requests corresponding client to be withholdd at the destination server end
When function, then processing is unlocked to the successfully corresponding request of withholing of withholing.
Optionally, the control method of withholing further include:
If detecting, request of withholing has unlocked the unlock completion instruction of processing, completes instruction acquisition institute based on the unlock
State the unlock type for request of withholing;
If the unlock type is actively to unlock type, it is determined that generate successful first prompt information of withholing;
If the unlock type is passive unlock type, it is determined that generate the second prompt information of failure of withholing.
It withholds control device the present invention also provides one kind, the control device of withholing includes:
Receiving module, for receive withhold request when, according to the current request to be processed of the multiple server end
Number is withholdd the destination server end of request described in determining;
Lock module, for carrying out locking processing to the request of withholing, by it is described lock treated withhold request hair
The destination server end is given, so that described withhold requests corresponding user to locking that treated at the destination server end
Account is corresponding to execute the operation of withholing prestored.
Optionally, the locking module includes:
Call unit, for calling the con current control program segment prestored, with request of withholing described in interception;
Unit is locked, for adding based on the distributed locking mode that Redis database provides to the request of withholing
Lock processing.
Optionally, the locking unit includes:
First obtain subelement, requests the IP of corresponding user account, destination server end for obtaining described withhold
Between location and preset lock time-out;
Setting subelement sets distributed for the user account and default prefix and adds for being based on Redis database
The first content of parameter that the first parameter key is prestored in lock mode sets distributed for the IP address at the destination server end
The second content of parameter that the second parameter value is prestored in locking mode, will be set as between the preset lock time-out it is distributed plus
The third content of parameter of third parameter second is prestored in lock mode, requests corresponding target to be locked to obtain described withhold;
Subelement is verified, carries out verification processing for locking to the target, it is determined whether receive default return value;
Subelement is determined, if for receiving default return value, it is determined that request of withholing described in successfully locking.
Optionally, the locking unit further include:
Storing sub-units are stored in Redis database for request of withholing described in after successfully locking, and timing is swept
Retouch each locking for storing in the Redis database treated request of withholing;
Detection sub-unit, if each locking that treated and withholing storage of the request in Redis database for detecting
When time is greater than between lock time-out, then the storage time is greater than to lock and timeless lock that treated request of withholing is unlocked
Processing.
Optionally, the control device of withholing further include:
Unlocked state, if withholdd to lock that treated described for detecting the destination server end request it is corresponding
When client is withholdd successfully, then processing is unlocked to the successfully corresponding request of withholing of withholing.
Optionally, the control device of withholing further include:
Module is obtained, if being based on the unlock for detecting that request of withholing has unlocked the unlock completion instruction of processing
Completion instructs the unlock type for request of withholing described in acquisition;
First determining module, if being actively to unlock type for the unlock type, it is determined that generate and withhold successful the
One prompt information;
Second determining module, if being passive unlock type for the unlock type, it is determined that generation withholds the of failure
Two prompt informations.
In addition, to achieve the above object, withholing the present invention also provides one kind and controlling equipment, described withhold controls equipment packet
Include: memory, processor and are stored in withholing on the memory and control program communication bus,
The communication bus is for realizing the communication connection between processor and memory;
The processor controls program for executing described withhold, to perform the steps of
Receive withhold request when, according to the multiple server end, current request number to be processed determines the button
The destination server end of money request;
Locking processing is carried out to the request of withholing, by it is described lock that treated and withhold request and be sent to the target take
Be engaged in device end, for the destination server end withhold to lock that treated described request corresponding user account it is corresponding execute it is pre-
The operation of withholing deposited.
In addition, to achieve the above object, the present invention also provides a kind of readable storage medium storing program for executing, the readable storage medium storing program for executing storage
Have one perhaps more than one program the one or more programs can be held by one or more than one processor
Row is to be used for:
Receive withhold request when, according to the multiple server end, current request number to be processed determines the button
The destination server end of money request;
Locking processing is carried out to the request of withholing, by it is described lock that treated and withhold request and be sent to the target take
Be engaged in device end, for the destination server end withhold to lock that treated described request corresponding user account it is corresponding execute it is pre-
The operation of withholing deposited.
The present invention receive withhold request when, determined according to the current request number to be processed of the multiple server end
The destination server end of the request of withholing;Locking processing is carried out to the request of withholing, locks that treated withholds for described
Request is sent to the destination server end, for the destination server end withhold to lock that treated described request it is corresponding
User account corresponding execute the operation of withholing prestored.In this application, receive withhold request when, it is first determined target clothes
Business device, is then locked and is handled to request of withholing, after locking, it is synchronous quilt that this, which is withholdd and requests corresponding client,
It locks, thus, it withholds with this request synchronous other requests of withholing if it exists, which does not locate
Reason promotes user experience, and then solve existing bank when withholing, Yi Chongfu withholds simultaneously thus, it is possible to avoid repeating to withhold
The technical issues of influencing user experience.
Detailed description of the invention
Fig. 1 is the flow diagram of control method first embodiment of the invention of withholing;
Fig. 2 is to carry out locking the thin of processing step to the request of withholing in control method second embodiment of the invention of withholing
Change flow diagram;
Fig. 3 is the device structure schematic diagram for the hardware running environment that present invention method is related to;
Fig. 4 is the flow diagram of control device of the invention of withholing.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides one kind and withholds control method, in the first embodiment that the present invention withholds control method, referring to figure
1, for the control method of withholing applied to collection system, the collection system includes multiple server ends of distributed distribution, institute
Stating control method of withholing includes:
Step S10, receive withhold request when, according to the multiple server end, current request number to be processed is true
The destination server end of the fixed request of withholing;
Step S20 carries out locking processing to the request of withholing, and locks that treated by described request of withholing is sent to institute
Destination server end is stated, so that described withhold requests corresponding user account pair to locking that treated at the destination server end
The operation of withholing prestored should be executed.
Specific step is as follows:
Step S10, receive withhold request when, according to the multiple server end, current request number to be processed is true
The destination server end of the fixed request of withholing;
In the present embodiment, for the control method of withholing applied to collection system, the collection system includes distributed point
Multiple server ends of cloth, multiple server end all have the function of that processing is withholdd request, wherein are receiving request of withholing
When, multiple server end the request of withholing, specific competitive way can be may is that according to the multiple server with competition process
Hold the destination server end for request of withholing described in current request number to be processed determination, the current request to be processed of server end
Number is fewer, then competitive strength is bigger, and the current request number to be processed of server end is more, then competitive strength is smaller, in addition,
Specific competitive way may also is that be determined according to the processing speed or processing capacity of server end, specifically, server end
Configure that performance is better, then the processing speed or processing of the processing speed of the server end perhaps higher server end of processing capacity
Ability is higher, then the competitive strength of the server end is bigger, is more possible to competition and obtains request of withholing.
After receiving and withholing request, collection system determines destination server end by above-mentioned competitive way, and need by
The request of withholing is sent to the destination server end.
Step S20 carries out locking processing to the request of withholing, and locks that treated by described request of withholing is sent to institute
Destination server end is stated, so that described withhold requests corresponding user account pair to locking that treated at the destination server end
The operation of withholing prestored should be executed.
In the present embodiment, behind the destination server end for determining request of withholing, the request of withholing is carried out at locking
Reason, wherein the request of withholing is carried out locking processing including the following two kinds mode:
Mode one: the cache subsystem that request of withholing is sent in collection system is asked in cache subsystem to withholing
It asks and carries out locking processing, after the completion of locking processing, the request of withholing completed will be locked and be sent to destination server end;
Mode two: the request that will directly withhold is sent to destination server end, carries out request of withholing at destination server end
Locking processing.
In the present embodiment, the mode of aforesaid way one, if it exists it is described withhold request it is corresponding it is other withhold when requesting,
As attendant because accidentally trigger in a short time to same account withhold operation due to correspond to generation withhold twice request when,
Other requests of withholing will not be locked processing, and will not be sent to other withhold and request corresponding destination server end,
And for the mode of aforesaid way two, exist withhold request it is corresponding it is other withhold request when, which will not
It is locked processing, but other requests of withholing may be sent to other withhold and request corresponding destination server end.
It should be noted that if this is withholdd, request is locked for the request of withholing being locked, the request of withholing
The account of corresponding client is synchronized to lock, that is, the user account is can not be again when request of withholing is locked
Other operations of withholing are carried out, are illustrated to specific embodiment, when scanning banker's payment code is paid the bill, which is paid
Money code is successively scanned twice, and two corresponding payment requests are generated, then, should after locking to one of payment request
Another payment request can not be synchronized to lock, because the Bank Account Number has existed the record being locked.
After request is withholdd in locking, locks that treated by described request of withholing is sent to the destination server end, with
It withholds for the destination server end to lock that treated described and requests corresponding user account is corresponding to execute withholing of prestoring
Operation.
Wherein, to locking that treated, described withhold requests corresponding execute of corresponding user account to prestore at destination server end
Operating procedure of withholing include: to obtain deducted amount entrained in request of withholing, account of withholing, agreement of withholing is based on the button
The money amount of money, account of withholing and agreement of withholing are withholdd to bank's request.
In the present embodiment, receive withhold request and to withhold request in the process of processing, be to generate behaviour
Make journal file, which can be based on the memory database Redis of NOSQL (non-relational), and utilize
What the persistent storage of Redis was realized.
Receive withhold request when, the persistent storage AOF mode based on Redis, by " operation+data " with format
The mode of instruction is appended to the tail portion of corresponding operating journal file, as long as being since receiving and withholing request, i.e., by make-up
The process flow steps and each data obtained in process flow steps that money request carries out are written into journal file,
All historical operation processes being saved in journal file, thus, when needing data to restore, according to journal file, can restore
All operating process.Avoid not finding withhold record and caused by item loss.
In addition, in the present embodiment, detect request of withholing is locked when, withholing after locking is requested in real time
Persistent storage is into Redis database.
The present invention receive withhold request when, determined according to the current request number to be processed of the multiple server end
The destination server end of the request of withholing;Locking processing is carried out to the request of withholing, locks that treated withholds for described
Request is sent to the destination server end, for the destination server end withhold to lock that treated described request it is corresponding
User account corresponding execute the operation of withholing prestored.In this application, receive withhold request when, it is first determined target clothes
Business device, is then locked and is handled to request of withholing, after locking, it is synchronous quilt that this, which is withholdd and requests corresponding client,
It locks, thus, it withholds with this request synchronous other requests of withholing if it exists, which does not locate
Reason promotes user experience, and then solve existing bank when withholing, Yi Chongfu withholds simultaneously thus, it is possible to avoid repeating to withhold
The technical issues of influencing user experience.
Further, the present invention provides another embodiment for control method of withholing, in this embodiment, described referring to Fig. 2
Carrying out locking processing step to the request of withholing includes:
Step S21 calls the con current control program segment prestored, with request of withholing described in interception;
Con current control program segment is prestored in collection system, is prestored in the con current control program segment
DistributedLockAspect class, the realization of the DistributedLockAspect class predominant package Redis distributed lock
Logic carries out locking processing to the request of withholing to realize, specifically, which utilizes
Lock and unlock method carry out concurrent lock control, the realization process on specific DistributedLockAspect class method are as follows:
Definition " method explains@Lock " and " parameter explains@ParamLock ", i.e., explain@Aspect customized one using Spring
Distributed lock dynamic proxy class namely DistributedLockAspect class realize con current control, specifically, the con current control
Program segment can be when the destination server end for detecting request of withholing determines, request of withholing described in interception, intercepts request of withholing
Purpose be to carry out locking processing to request of withholing.
Step S22, the distributed locking mode provided based on Redis database carry out at locking the request of withholing
Reason.
It in the present embodiment, is that the distributed locking mode provided based on Redis database carries out the request of withholing
Lock processing.
Specifically, the distributed locking mode provided based on Redis database locks the request of withholing
Processing step includes:
Step S221 withholds described in acquisition and requests corresponding user account, the IP address at destination server end and default
Lock time-out between;
In the present embodiment, it withholds and carries user account, the IP address at destination server end and preset lock in requesting
Between time-out, thus, it can be extracted from request of withholing and obtain corresponding user account, the IP address at destination server end and default
Lock time-out between.
Step S222 is based on Redis database, sets distributed locking mode for the user account and default prefix
In prestore the first content of parameter of the first parameter key, set distributed locking side for the IP address at the destination server end
The second content of parameter that the second parameter value is prestored in formula will be set as distributed locking mode between the preset lock time-out
In prestore the third content of parameter of third parameter second, request corresponding target to be locked to obtain described withhold;
The specific treatment process that locks is that setnx (key, value, the second) method provided using Redis is arranged,
In, key is the first parameter, and value is the second parameter, and second is third parameter, specifically, by the user account and is preset
Prefix is set as prestoring the first content of parameter of the first parameter key in distributed locking mode, for example, with " LOCK_KEY_
ACCT_ " prefix+user account sets distributed for the IP address at the destination server end and adds as the first content of parameter
The second content of parameter of the second parameter value is prestored in lock mode, particularly, by the IP address at the destination server end with work as
The preceding setting time is set as prestoring the second content of parameter of the second parameter value in distributed locking mode, for example, with " node
IP (destination server) * * * * * * "+current time in system as the second content of parameter, will be set as between the preset lock time-out
The third content of parameter of third parameter second is prestored in distributed locking mode, such as lock time-out time can be set to 180
Second, the third content of parameter of second is 180S, after the setup, obtains described withhold and corresponding target is requested to be locked.
Step S223 locks the target and carries out verification processing, it is determined whether receives default return value;
In the present embodiment, judge the setnx being arranged in the present embodiment by setnx (key, value, second) method
Whether return presets return value or whether returns to true.
Step S224, if receiving default return value, it is determined that request of withholing described in successfully locking.
In the present embodiment, if setnx returns to default return value or returns to true, illustrate to lock successfully, then it can be with
Operation of withholing is carried out, if setnx does not return to default return value and do not return to true, illustrates to lock failure.
Further, if described receive default return value, it is determined that wrapped after request step of withholing described in successfully locking
It includes:
Step S225, after successfully locking described in request of withholing be stored in Redis database, and described in timing scan
Treated withholds request for each locking stored in Redis database;
In the present embodiment, request of withholing described in after successfully locking is stored in Redis database, at by locking
After request of withholing after reason is sent to destination server end, destination server can handle the request of withholing after locking, due to target
Server may be in maintenance or destination server is likely to be at the state of cisco unity malfunction, thus destination server
Operation of withholing may not be completed, at this point, in the present embodiment, can also obtain the abnormal feelings of offer for the case where avoiding deadlock
Compensation mechanism under condition, compensation mechanism include: that collection system starts the JAVAJOB (timed task), timing scan Redis prestored
Treated withholds request for the locking of middle preservation.
Step S226, if detecting, each to lock that treated and withhold storage time of the request in Redis database big
When between lock time-out, then the storage time is greater than to lock and timeless lock that treated request of withholing is unlocked processing.
Due to using " node IP (destination server) * * * * * * "+current time in system as the second content of parameter, thus, energy
Enough obtain locks that treated and withholds storage time of the request in Redis database, each locks that treated if detecting
Request withhold when the storage time in Redis database is greater than between lock time-out, if storage time is 180 seconds big (between lock time-out),
It then unlocks immediately, discharges lock resource, it is ensured that for account not by abnormal locking, guarantee, which is withholdd, operates smooth execution.After withholing successfully
That is releasable lock, namely after withholing successfully, withhold and corresponding user account is requested not to be lockable, it avoids influencing client
Next time withhold operation.
In the present embodiment, the IP address of corresponding user account, destination server end is requested by withholing described in acquisition
And between preset lock time-out;Based on Redis database, distributed locking side is set by the user account and default prefix
The IP address at the destination server end is set distributed locking by the first content of parameter that the first parameter key is prestored in formula
The second content of parameter that the second parameter value is prestored in mode will be set as distributed locking side between the preset lock time-out
The third content of parameter of third parameter second is prestored in formula, requests corresponding target to be locked to obtain described withhold;To the mesh
Mark lock carries out verification processing, it is determined whether receives default return value;If receiving default return value, it is determined that successfully lock institute
State request of withholing.In the present embodiment, realize that the locking to request of withholing is handled, to avoid repeating to withhold to lay the foundation.
Further, the present invention provides another embodiment for control method of withholing, in this embodiment, described described to add
Treated that request of withholing is sent to the destination server end for lock, so that the destination server end is to the institute that locks that treated
State the operating procedure of withholing withholdd and the corresponding execution of corresponding user account is requested to prestore includes: later
Step A1, if detecting, to locking that treated, described withhold requests corresponding client at the destination server end
When withholing successfully, then processing is unlocked to the successfully corresponding request of withholing of withholing.
In the present embodiment, if detect the destination server end withhold to lock that treated described request it is corresponding
When client is withholdd successfully, then processing is unlocked to the successfully corresponding request of withholing of withholing.Namely in the present embodiment,
It is successfully unlocked as long as withholing, avoids influencing the subsequent non-concurrent operation of withholing of client.
The control method of withholing further include:
Step B1, if detecting, request of withholing has unlocked the unlock completion instruction of processing, is referred to based on unlock completion
Enable the unlock type for request of withholing described in obtaining;
In the present embodiment, if detecting, request of withholing has unlocked the unlock completion instruction of processing, is based on the unlock
Completion instructs the unlock type for request of withholing described in acquisition, wherein unlock type includes actively unlocking type and passively unlocking class
Type actively unlocks type and refers to the unlock after withholing successfully, and the passive type that unlocks refers to after reaching between lock time-out, is not located
The unlock of request of withholing after the locking of reason.
Step B2, if the unlock type is actively to unlock type, it is determined that generate successful first prompt information of withholing;
Step B3, if the unlock type is passive unlock type, it is determined that generate the second prompt information of failure of withholing.
If the unlock type is actively to unlock type, it is determined that successful first prompt information of withholing is generated, if described
Unlocking type is passive unlock type, it is determined that generates the second prompt information of failure of withholing.Wherein, the first prompt information and the
The suggestion content and prompting mode of two prompt informations are all different, and are withholdd success or not with distinction cue.
In the present embodiment, if detecting, request of withholing has unlocked the unlock completion instruction of processing, is based on the unlock
Completion instructs the unlock type for request of withholing described in acquisition;If the unlock type is actively to unlock type, it is determined that generate button
Successful first prompt information of money;If the unlock type is passive unlock type, it is determined that generation, which is withholdd, the second of failure to be mentioned
Show information.In the present embodiment, prompt actively unlock and passive unlock are distinguished, more effectively prompt effect is obtained, is promoted and used
Family experience.
Referring to Fig. 3, Fig. 3 is the device structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
The embodiment of the present invention, which is withholdd, to be controlled equipment and can be PC, and smart phone, tablet computer, e-book reading are also possible to
Device, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio
Level 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression
Standard audio level 3) terminal devices such as player, portable computer.
As shown in figure 3, this is withholdd, to control equipment may include: processor 1001, such as CPU, memory 1005, and communication is total
Line 1002.Wherein, communication bus 1002 is for realizing the connection communication between processor 1001 and memory 1005.Memory
1005 can be high speed RAM memory, be also possible to stable memory (non-volatile memory), such as disk is deposited
Reservoir.Memory 1005 optionally can also be the storage equipment independently of aforementioned processor 1001.
Optionally, it can also include target user interface, network interface, camera, RF (Radio that this, which is withholdd and controls equipment,
Frequency, radio frequency) circuit, sensor, voicefrequency circuit, WiFi module etc..Target user interface may include display screen
(Display), input unit such as keyboard (Keyboard), optional target user interface can also include that the wired of standard connects
Mouth, wireless interface.Network interface optionally may include standard wireline interface and wireless interface (such as WI-FI interface).
It does not constitute it will be understood by those skilled in the art that withholing shown in Fig. 3 and controlling device structure to control of withholing
The restriction of equipment may include perhaps combining certain components or different component cloth than illustrating more or fewer components
It sets.
As shown in figure 3, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium
Believe module and withhold and controls program.Operating system is to manage and control to withhold to control the program of device hardware and software resource,
Support, which is withholdd, controls the operation of program and other softwares and/or program.Network communication module is for realizing in memory 1005
Communication between each component in portion, and communicated between other hardware and softwares with withholing to control in equipment.
Shown in Fig. 3 withholing controls in equipment, and processor 1001 is for executing the control of withholing stored in memory 1005
Processing procedure sequence, realize it is described in any of the above embodiments withhold control method the step of.
The present invention, which withholds, controls equipment specific embodiment and above-mentioned each embodiment of control method of withholing is essentially identical, herein
It repeats no more.
It withholds control device the present invention also provides one kind, referring to Fig. 4, the control device of withholing includes:
Receiving module, for receive withhold request when, according to the current request to be processed of the multiple server end
Number is withholdd the destination server end of request described in determining;
Lock module, for carrying out locking processing to the request of withholing, by it is described lock treated withhold request hair
The destination server end is given, so that described withhold requests corresponding user to locking that treated at the destination server end
Account is corresponding to execute the operation of withholing prestored.
Optionally, the locking module includes:
Call unit, for calling the con current control program segment prestored, with request of withholing described in interception;
Unit is locked, for adding based on the distributed locking mode that Redis database provides to the request of withholing
Lock processing.
The present invention withhold control device specific embodiment and above-mentioned each embodiment of control method of withholing it is essentially identical, herein
It repeats no more.
The present invention provides a kind of readable storage medium storing program for executing, the readable storage medium storing program for executing is stored with one or more than one journey
Sequence, the one or more programs can also be executed by one or more than one processor for realizing above-mentioned
The step of control method of withholing described in one.
Readable storage medium storing program for executing specific embodiment of the present invention and above-mentioned each embodiment of control method of withholing are essentially identical, herein
It repeats no more.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field similarly includes in patent process range of the invention.
Claims (10)
- The control method 1. one kind is withholdd, which is characterized in that the control method of withholing is applied to collection system, the collection system Multiple server ends including distribution distribution, the control method of withholing include:Receive withhold request when, according to the current request number to be processed of the multiple server end determine described in withhold and ask The destination server end asked;Locking processing is carried out to the request of withholing, locks that treated by described request of withholing is sent to the destination server End withholds to lock that treated described for the destination server end and corresponding execute of corresponding user account is requested to prestore It withholds operation.
- 2. control method of withholing as described in claim 1, which is characterized in that described to carry out locking processing to the request of withholing Step includes:The con current control program segment prestored is called, with request of withholing described in interception;The distributed locking mode provided based on Redis database carries out locking processing to the request of withholing.
- 3. control method of withholing as claimed in claim 2, which is characterized in that the distribution provided based on Redis database Formula locking mode carries out locking processing step to the request of withholingIt withholds and is requested between corresponding user account, the IP address at destination server end and preset lock time-out described in acquisition;Based on Redis database, it is set as the user account and default prefix to prestore the first ginseng in distributed locking mode The first content of parameter of number key, sets the IP address at the destination server end to prestore second in distributed locking mode The second content of parameter of parameter value will be set as prestoring third ginseng in distributed locking mode between the preset lock time-out The third content of parameter of number second requests corresponding target to be locked to obtain described withhold;The target is locked and carries out verification processing, it is determined whether receives default return value;If receiving default return value, it is determined that request of withholing described in successfully locking.
- 4. control method of withholing as claimed in claim 3, which is characterized in that if described receive default return value, it is determined that Include: after request step of withholing described in success lockingRequest of withholing described in after successfully locking is stored in Redis database, and in Redis database described in timing scan Treated withholds request for each locking of storage;If detect it is each lock treated withhold request the storage time in Redis database be greater than lock time-out between when, Then the storage time is greater than to lock and timeless lock that treated request of withholing is unlocked processing.
- 5. withholing control method as described in claim 1, which is characterized in that described to lock that treated and withhold request for described It is sent to the destination server end, so that described withhold requests to use accordingly to locking that treated at the destination server end Include: after the operating procedure of withholing that account corresponding execution in family prestoresIf detecting, the destination server end is withholdd to lock that treated described when corresponding client being requested to be withholdd successfully, Processing then is unlocked to the successfully corresponding request of withholing of withholing.
- 6. control method of withholing as described in claim 1, which is characterized in that the control method of withholing further include:If detecting, request of withholing has unlocked the unlock completion instruction of processing, completes the instruction acquisition button based on the unlock The unlock type of money request;If the unlock type is actively to unlock type, it is determined that generate successful first prompt information of withholing;If the unlock type is passive unlock type, it is determined that generate the second prompt information of failure of withholing.
- The control device 7. one kind is withholdd, which is characterized in that the control device of withholing includes:Receiving module, for receive withhold request when, according to the current request number to be processed of the multiple server end It withholds described in determination the destination server end of request;Module is locked, for carrying out locking processing to the request of withholing, locks that treated by described request of withholing is sent to The destination server end, so that described withhold requests corresponding user account to locking that treated at the destination server end It is corresponding to execute the operation of withholing prestored.
- 8. withholing control device as claimed in claim 7, which is characterized in that the locking module includes:Call unit, for calling the con current control program segment prestored, with request of withholing described in interception;Unit is locked, the distributed locking mode for being provided based on Redis database carries out at locking the request of withholing Reason.
- 9. one kind, which is withholdd, controls equipment, which is characterized in that described to withhold that control equipment include: memory, processor, communication bus And be stored in withholing on the memory and control program,The communication bus is for realizing the communication connection between processor and memory;The processor controls program for executing described withhold, and is withholdd with realizing as described in any one of claims 1 to 6 The step of control method.
- 10. a kind of readable storage medium storing program for executing, which is characterized in that it is stored with to withhold on the readable storage medium storing program for executing and controls program, it is described Withhold control when program is executed by processor realize as it is of any of claims 1-6 withhold control method the step of.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811394571.2A CN109670807A (en) | 2018-11-20 | 2018-11-20 | It withholds control method, device, equipment and readable storage medium storing program for executing |
PCT/CN2018/123190 WO2020103275A1 (en) | 2018-11-20 | 2018-12-24 | Money deduction control method, apparatus, and device, and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811394571.2A CN109670807A (en) | 2018-11-20 | 2018-11-20 | It withholds control method, device, equipment and readable storage medium storing program for executing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109670807A true CN109670807A (en) | 2019-04-23 |
Family
ID=66142706
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811394571.2A Pending CN109670807A (en) | 2018-11-20 | 2018-11-20 | It withholds control method, device, equipment and readable storage medium storing program for executing |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109670807A (en) |
WO (1) | WO2020103275A1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111324622A (en) * | 2020-02-20 | 2020-06-23 | 中国建设银行股份有限公司 | Resource first-aid-purchase processing method, device, equipment and storage medium |
CN111459963A (en) * | 2020-04-07 | 2020-07-28 | 中国建设银行股份有限公司 | Core accounting transaction concurrent processing method and device |
CN111833034A (en) * | 2020-07-02 | 2020-10-27 | 泰康保险集团股份有限公司 | Batch deduction method, payment server, computer equipment and storage medium |
CN112565467A (en) * | 2021-02-22 | 2021-03-26 | 常州微亿智造科技有限公司 | Service processing method, device and storage medium |
CN113516471A (en) * | 2021-07-07 | 2021-10-19 | 深圳市雪球科技有限公司 | Bus payment method, device and equipment |
CN113593127A (en) * | 2020-04-30 | 2021-11-02 | 海南掌上能量传媒有限公司 | Control method of mobile power supply leasing terminal |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103793843A (en) * | 2012-10-26 | 2014-05-14 | 阿里巴巴集团控股有限公司 | Account data processing method and device |
CN105988862A (en) * | 2015-02-04 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Distributed transaction processing method and device |
CN107358425A (en) * | 2017-06-29 | 2017-11-17 | 湖南搜云网络科技股份有限公司 | The calculating of tranaction costs and method of payment and device, transaction platform and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103581273B (en) * | 2012-08-08 | 2017-06-06 | 阿里巴巴集团控股有限公司 | A kind of distributed system performs method, the apparatus and system of business |
CN107818018A (en) * | 2016-09-14 | 2018-03-20 | 北京京东尚科信息技术有限公司 | The control method and device of distributed lock |
CN107808285A (en) * | 2017-09-28 | 2018-03-16 | 深圳市生银万国网络科技有限公司 | A kind of method of payment, equipment and computer-readable recording medium |
CN107767140A (en) * | 2017-10-02 | 2018-03-06 | 头等尝网络餐饮管理科技(深圳)有限公司 | Method of payment, device, equipment and readable storage medium storing program for executing |
-
2018
- 2018-11-20 CN CN201811394571.2A patent/CN109670807A/en active Pending
- 2018-12-24 WO PCT/CN2018/123190 patent/WO2020103275A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103793843A (en) * | 2012-10-26 | 2014-05-14 | 阿里巴巴集团控股有限公司 | Account data processing method and device |
CN105988862A (en) * | 2015-02-04 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Distributed transaction processing method and device |
CN107358425A (en) * | 2017-06-29 | 2017-11-17 | 湖南搜云网络科技股份有限公司 | The calculating of tranaction costs and method of payment and device, transaction platform and storage medium |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111324622A (en) * | 2020-02-20 | 2020-06-23 | 中国建设银行股份有限公司 | Resource first-aid-purchase processing method, device, equipment and storage medium |
CN111459963A (en) * | 2020-04-07 | 2020-07-28 | 中国建设银行股份有限公司 | Core accounting transaction concurrent processing method and device |
CN111459963B (en) * | 2020-04-07 | 2024-03-15 | 中国建设银行股份有限公司 | Concurrent processing method and device for core accounting transaction |
CN113593127A (en) * | 2020-04-30 | 2021-11-02 | 海南掌上能量传媒有限公司 | Control method of mobile power supply leasing terminal |
CN113593127B (en) * | 2020-04-30 | 2023-09-29 | 海南掌上能量传媒有限公司 | Control method of portable power source leasing terminal |
CN111833034A (en) * | 2020-07-02 | 2020-10-27 | 泰康保险集团股份有限公司 | Batch deduction method, payment server, computer equipment and storage medium |
CN111833034B (en) * | 2020-07-02 | 2024-01-30 | 泰康保险集团股份有限公司 | Batch deduction method, payment server, computer equipment and storage medium |
CN112565467A (en) * | 2021-02-22 | 2021-03-26 | 常州微亿智造科技有限公司 | Service processing method, device and storage medium |
CN113516471A (en) * | 2021-07-07 | 2021-10-19 | 深圳市雪球科技有限公司 | Bus payment method, device and equipment |
CN113516471B (en) * | 2021-07-07 | 2023-12-05 | 深圳市雪球科技有限公司 | Bus payment method, device and equipment |
Also Published As
Publication number | Publication date |
---|---|
WO2020103275A1 (en) | 2020-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109670807A (en) | It withholds control method, device, equipment and readable storage medium storing program for executing | |
CN108494703A (en) | A kind of access frequency control method, device and storage medium | |
CN108805702A (en) | Transaction buffer/accelerated method based on block chain and block chain transaction processing system | |
CN107770140A (en) | A kind of single sign-on authentication method and device | |
CN108073684A (en) | A kind of data processing method, server and computer readable storage medium | |
CN104639650B (en) | A kind of fine granularity distributed interface access control method and device | |
CN109087116A (en) | Accumulated point exchanging method, integral transaction system and computer readable storage medium | |
CN106161537A (en) | The processing method of remote procedure call, device, system and electronic equipment | |
CN112767133B (en) | Service decision method and device, storage medium and computer equipment | |
CN108288168A (en) | Borrow or lend money register method, terminal and the computer readable storage medium of service account | |
CN110489696A (en) | Buffering updating method, device and electronic equipment, storage medium | |
CN112767135A (en) | Rule engine configuration method and device, storage medium and computer equipment | |
CN107026879A (en) | A kind of data cache method and background application system | |
CN106603594A (en) | Distributed service management method and system | |
CN107734017A (en) | Data service method and system | |
CN111415146A (en) | Resource data processing method, device and equipment | |
CN112799970B (en) | Test data processing method, device, electronic equipment and medium | |
CN113377875B (en) | Cross-chain data processing method and device, electronic equipment and readable storage medium | |
CN113506100A (en) | Alliance link data processing method and device, computer equipment and storage medium | |
CN110971470A (en) | Weight-supporting private cloud service cluster current limiting method and system | |
CN111294377B (en) | Dependency network request sending method, terminal device and storage medium | |
CN103457980B (en) | Terminal unit data acquisition methods | |
CN106210031A (en) | Service execution method, device, client and server | |
CN114615084B (en) | Single sign-on logout method, system, electronic equipment and storage medium applied to front-end and back-end separation scene | |
CN106790493B (en) | A kind of face verification system and method |
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 |