CN104599177A - Limit resource processing method, online transaction processing method and limit resource processing device - Google Patents

Limit resource processing method, online transaction processing method and limit resource processing device Download PDF

Info

Publication number
CN104599177A
CN104599177A CN201510061643.1A CN201510061643A CN104599177A CN 104599177 A CN104599177 A CN 104599177A CN 201510061643 A CN201510061643 A CN 201510061643A CN 104599177 A CN104599177 A CN 104599177A
Authority
CN
China
Prior art keywords
amount
application
record
status
application form
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510061643.1A
Other languages
Chinese (zh)
Other versions
CN104599177B (en
Inventor
佟炜
张宝强
王建生
田鸿
张伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN201510061643.1A priority Critical patent/CN104599177B/en
Publication of CN104599177A publication Critical patent/CN104599177A/en
Application granted granted Critical
Publication of CN104599177B publication Critical patent/CN104599177B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)

Abstract

An embodiment of the invention provides a limit resource processing method, an online transaction processing method and a limit resource processing device. A limit application table is set, limit application information is recorded in the limit application table by an online transaction, the online transaction does not exclusively access to and update limit resources directly any more, and an independent background application program processes the limit resources according to the limit application table and can perform batch processing on records in the limit application table. Read-write to the limit application table does not involve in limit resource processing, so that multiple online transactions can access to the limit application table concurrently, the situation that a large number of online transactions lines up to serially and inclusively access to and update the limit resources is reduced, the probability of transaction congestion is decreased, and response speed is increased.

Description

Amount method for processing resource, on-line transaction disposal route and device
Technical field
The present invention relates to technical field of information processing, in particular, relate to a kind of amount method for processing resource, on-line transaction disposal route and device.
Background technology
In banking on-line class business, frequent existence is to the control of distribution product amount, such as limit etc. sold by the finance product amount upper limit, bond, and these are sold amount and control in on-line transaction, to carry out focus access and renewal with regard to needs to amount resource, until resource exhaustion.Such as, to the purchase-transaction of finance product, limit selling total value, transaction is successfully subscribed in every transaction all will reduce total value, until total value is zero, product can not be bought.
In this kind of transaction, amount resource (i.e. product limit) has unique attribute, and similar transaction all must access this resource, the all necessary exclusive access of this resource of each access, exclusive renewal, to prevent from reading and writing the mistake of product limit, this just causes amount resource to become hot point resource, when making a big purchase transaction in large quantities and occurring, just need transaction queuing serial exclusive access to upgrade amount resource, cause transaction congested, response speed is slack-off.When congested continuous accumulation, make system resource exhaustion, even can cause system crash.
Therefore, how amount resource is processed to reduce the probability of congested generation of concluding the business, improve response speed and become problem demanding prompt solution.
Summary of the invention
The object of the present invention is to provide a kind of amount method for processing resource, on-line transaction disposal route and device, to reduce the probability of congested generation of concluding the business, improve response speed.
For achieving the above object, following technical scheme is embodiments provided:
A kind of amount method for processing resource, comprising:
S11: analyzing and processing is carried out to the record in amount application form, to determine the entry number summation of record that in amount application form, status information is application status, wherein, record each amount application information of on-line transaction record in described amount application form, in every bar record, record the application object of every amount application, application amount, application time and status information;
S12: judge status information in described amount application form is whether the entry number summation of the record of application status reaches default entry number, if so, then performs step S15; Otherwise, perform step S13;
S13: in inquiry amount application form, status information is a record the earliest of application status, calculates the writing time (i.e. application time) of this record and the very first time difference of current time;
S14: judge whether described very first time difference is greater than the first preset duration, if so, then performs step S15; Otherwise, return and perform step S11;
S15: calculating all status informations in described amount application form is the summation of applying for amount in the record of application status, and inquire about the current residual amount value of amount resource;
S16: the summation of described application amount and described current residual amount value are compared; If the summation of described application amount is greater than described current residual amount value, then perform step S17; Otherwise, perform step S18;
S17: according to application time order, application amount is reduced by itemize from described current residual amount, will complete the recording mark of deduction amount for application success status, and return execution step S11 in amount application form;
S18: the summation deducting described application amount from current residual amount, is disposablely all labeled as application success status by completing recording of deduction amount in amount application form, and returns and perform step S11.
Said method, preferably, describedly carries out analyzing and processing to the record in amount application form, to determine that the entry number summation of record that in amount application form, status information is application status comprises:
Inquiring about all status informations in described amount application form is application status, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
Adding up status information in described amount application form is the entry number summation of the record of application status.
Said method, preferably, describedly carries out analyzing and processing to the record in amount application form, to determine that the entry number summation of record that in amount application form, status information is application status comprises:
Inquiring about all status informations in described amount application form is application success status, and the 3rd time difference of application time distance current time is greater than the record of the 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
Adding up status information in described amount application form is the entry number summation of the record of application status.
Said method, preferably, describedly carries out analyzing and processing to the record in amount application form, to determine that the entry number summation of record that in amount application form, status information is application status comprises:
Inquiring about all status informations in described amount application form is application status, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
All states in described amount application form of inquiring about are application success status, and the 3rd time difference of application time distance current time is greater than the record of described 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
Adding up status information in described amount application form is the entry number summation of the record of application status.
Said method, preferably, described second preset duration is greater than the default waiting time of on-line transaction.
A kind of on-line transaction disposal route, comprising:
Client initialization brings up again number of times, and initiates first time on-line transaction, and described initiation first time on-line transaction comprises:
In the amount application form that backstage stores, write this amount application record, described amount application record comprises: the application object of amount application, application amount, application time and status information, and initial state information is application status;
Inquiry is brought up again number of times and whether is exceeded limit value, as exceeded, then exits transaction, otherwise will bring up again number of times and add 1, and initiate second time on-line transaction to backstage after wait preset time period, described second time on-line transaction of initiating to backstage comprises:
Whether inquiry backstage opens amount resource processing procedure, if amount resource processing procedure is opened on backstage, then inquire about the status information of this amount application in amount application form, if application status, then return and perform described inquiry and bring up again the step whether number of times exceed limit value, if apply for status of fail or cancel state, then report an error and exit, if application success status, then start follow-up on-line transaction logical process, and when continuous on-line transaction logical process is successful in the rear, more new state information is process completion status; Wherein, described amount resource processing procedure is the amount resource processing procedure as above described in any one;
If amount resource processing procedure is not opened on backstage, then directly access and upgrade amount resource.
A kind of amount resource treating apparatus, comprising:
Analysis and processing module, for carrying out analyzing and processing to the record in amount application form, to determine the entry number summation of record that in amount application form, status information is application status, wherein, record each amount application information of on-line transaction record in described amount application form, in every bar record, record the application amount of every amount application, application time and status information;
First judge module, for judging status information in described amount application form is whether the entry number summation of the record of application status reaches default entry number;
First computing module, for when described first judge module judges that described entry number summation does not reach described default entry number, in inquiry amount application form, status information is a record the earliest of application status, calculates the writing time of this record and the very first time difference of current time;
Second judge module, for judging whether described very first time difference is greater than the first preset duration, if not, then trigger described analysis and processing module to perform and carry out analyzing and processing to the record in amount application form, to determine the step of the entry number summation of record that in amount application form, status information is application status;
Second computing module, for judging that described entry number summation reaches described default entry number when described first judge module, or, when described second judge module judges that the described very first time, difference was greater than described first preset duration, calculating all status informations in described amount application form is the summation of applying for amount in the record of application status, and inquires about the current residual amount value of amount resource;
Comparison module, for comparing the summation of described application amount and described current residual amount value;
First amount resource processing module, for when the comparative result of described comparison module be the summation of described application amount be greater than described current residual amount value time, according to application time order, application amount is reduced by itemize from described current residual amount, the recording mark of deduction amount will be completed for application success status in amount application form, and trigger described analysis and processing module and perform and analyzing and processing is carried out to the record in amount application form, to determine the step of the entry number summation of record that in amount application form, status information is application status;
Second amount resource processing module, for when the comparative result of described comparison module be the summation of described application amount be less than or equal to described current residual amount value time, the summation of described application amount is deducted from current residual amount, disposablely application success status is all labeled as by completing recording of deduction amount in amount application form, and trigger described analysis and processing module and perform and analyzing and processing is carried out to the record in amount application form, to determine the step of the entry number summation of record that in amount application form, status information is application status.
Said apparatus, preferably, described analysis and processing module comprises:
First analysis and processing unit is application status for inquiring about all status informations in described amount application form, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
First statistic unit is the entry number summation of the record of application status for adding up status information in described amount application form.
Said apparatus, preferably, described analysis and processing module comprises:
Second analysis and processing unit, for inquiring about in described amount application form all states for application success status, and the 3rd time difference of application time distance current time is greater than the record of the 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
Second statistic unit is the entry number summation of the record of application status for adding up status information in described amount application form.
Said apparatus, preferably, described analysis and processing module comprises:
3rd analysis and processing unit is application status for inquiring about all status informations in described amount application form, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
4th analysis and processing unit, for inquiring about in described amount application form all states for application success status, and the 3rd time difference of application time distance current time is greater than the record of the 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
3rd statistic unit is the entry number summation of the record of application status for adding up status information in described amount application form.
Known by above scheme, a kind of amount method for processing resource, on-line transaction disposal route and device that the embodiment of the present invention provides, amount application form is set, in amount application form, amount application information is recorded by on-line transaction, on-line transaction is no longer direct carries out exclusive access and renewal to amount resource, but realized the process of amount resource according to amount application form by an independent background application, and background application can carry out batch processing to the record in amount application form.And owing to not relating to the process of amount resource to the read-write of amount application form, therefore multiple on-line transaction access amount application form that can walk abreast, thus decrease the situation that a large amount of on-line transaction queuing serial exclusive access upgrades amount resource, reduce the probability of the congested generation of transaction, improve response speed.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to the accompanying drawing provided.
A kind of realization flow figure of the amount method for processing resource that Fig. 1 provides for the embodiment of the present invention;
What Fig. 2 provided for the embodiment of the present invention carries out analyzing and processing to the record in amount application form, to determine a kind of realization flow figure of the entry number summation of record that in amount application form, status information is application status;
What Fig. 3 provided for the embodiment of the present invention carries out analyzing and processing to the record in amount application form, to determine the another kind of realization flow figure of the entry number summation of record that in amount application form, status information is application status;
What Fig. 4 provided for the embodiment of the present invention carries out analyzing and processing to the record in amount application form, to determine another realization flow figure of the entry number summation of record that in amount application form, status information is application status;
A kind of structural representation of the amount resource treating apparatus that Fig. 5 provides for the embodiment of the present invention;
A kind of structural representation of the analysis and processing module that Fig. 6 provides for the embodiment of the present invention;
The another kind of structural representation of the analysis and processing module that Fig. 7 provides for the embodiment of the present invention;
Another structural representation of the analysis and processing module that Fig. 8 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Please refer to Fig. 1, a kind of realization flow figure of the amount method for processing resource that Fig. 1 provides for the embodiment of the present invention, can comprise:
Step S11: analyzing and processing is carried out to the record in amount application form, to determine the entry number summation of record that in amount application form, status information is application status, wherein, record each amount application information of on-line transaction record in described amount application form, in every bar record, record the application object of every amount application, application amount, application time and status information;
In the embodiment of the present invention, amount application form is set, each the amount application information that this amount application form is initiated for recording each on-line transaction, the corresponding record of an amount application (i.e. an amount application), the application object (i.e. the product of user's application) of an amount application, application amount, application time and status information is recorded in every bar record, wherein, the initial state information of every bar record is application status.After the record being in application status successfully applies for amount, its state changes application success status into, if unsuccessful application amount, then status information changes the state of cancelling into.Do not used by follow-up on-line transaction if status information is the record of application success status, then status information also changes the state of cancelling into.If successfully used by follow-up on-line transaction, then status information changes process completion status into.
Describedly analyzing and processing is carried out to the record in amount application form can comprise: determine record invalid in amount application form, the status information of invalid record is revised as the state of cancelling, then determines that in amount application form, status information is the entry number of the record of application status.
That is, in the embodiment of the present invention, on-line transaction no longer carries out exclusive access and renewal to amount resource, but amount application information is recorded in amount application form, and owing to not relating to the process of amount resource to the read-write of amount application form, therefore multiple on-line transaction process amount application form that can walk abreast, thus avoid on-line transaction queuing serial exclusive access to upgrade amount resource.
Step S12: judge status information in described amount application form is whether the entry number summation of the record of application status reaches default entry number, if so, then performs step S15; Otherwise, perform step S13;
Step S13: in inquiry amount application form, status information is a record the earliest of application status, calculates the writing time of this record and the very first time difference of current time;
Step S14: judge whether described very first time difference is greater than the first preset duration, if so, then performs step S15; Otherwise, return and perform step S11;
In the embodiment of the present invention, in amount application form, status information is that the entry number summation of the record of application status reaches default entry number, or, although status information is that the entry number summation of the record of application status does not reach default entry number in amount application form, but in amount application form status information be application status the earliest one record writing time and current time the very first time, difference was greater than the first preset duration time, illustrate that on-line transaction concurrency is higher, now by backstage, amount resource is processed.
Optionally, the entry number summation being the record of application status when status information in amount application form does not reach default entry number, and in amount application form status information be application status the earliest one record writing time and current time the very first time, difference was less than or equal to the first preset duration time, wait for the 4th preset duration, if after waiting for the 4th preset duration, in amount application form, status information is that the entry number summation of the record of application status does not still reach default entry number, and status information is that writing time of a record the earliest of application status and the very first time difference of current time are still less than or equal to the first preset duration in amount application form, then can not perform step S15-step S17.That is, in the embodiment of the present invention, the entry number summation being the record of application status when status information in amount application form does not reach default entry number, and in amount application form status information be application status the earliest one record writing time and current time the very first time, difference was less than or equal to the first preset duration time, wait for the 4th preset duration, if after waiting for the 4th preset duration, in amount application form, status information is that the entry number summation of the record of application status does not still reach default entry number, and status information is that writing time of a record the earliest of application status and the very first time difference of current time are still less than or equal to the first preset duration in amount application form, illustrate that on-line transaction concurrency is lower, now can not start the amount resource processing procedure on backstage.
Optionally, in the embodiment of the present invention, also can determine whether the amount resource processing procedure of opening backstage by the following method:
Newly-increased counter is the read-around ratio that the entry number summation of the record of application status does not reach default entry number for recording status information in amount application form.Be specially, judge status information in amount application form be the entry number summation of the record of application status reach default entry number time, by counter O reset; Judge status information in amount application form be writing time of a record the earliest of application status and current time the very first time, difference was greater than the first preset duration time, counter is added 1, and judge whether count results reaches pre-set count values, when the count results of counter reaches described pre-set count values, think that on-line transaction concurrency is lower, the amount resource processing procedure on backstage can not be started.
Step S15: calculating all status informations in described amount application form is the summation of applying for amount in the record of application status, and inquire about the current residual amount value of amount resource;
Step S16: the summation of described application amount and described current residual amount value are compared; If the summation of described application amount is greater than described current residual amount value, then perform step S17; Otherwise, perform step S18;
Step S17: according to application time order, application amount is reduced by itemize from described current residual amount, will complete the recording mark of deduction amount for application success status, and return execution step S11 in amount application form;
If the summation of application amount is greater than described current residual amount value, illustrate that the current residual amount of amount resource is inadequate, now according to the sequencing of application, often from amount application form, read a record, from the residue amount of amount resource, just deduct the application amount of record in this record, and the status information in this record in amount application form changed to and apply for successfully, until the residue amount in amount resource deducts an application amount recorded in recording not.
Step S18: the summation deducting described application amount from current residual amount, is disposablely all labeled as application success status by completing recording of deduction amount in amount application form, and returns and perform step S11.
If when the summation of described application amount is less than or equal to described current residual amount value, directly from application amount, deduction applies for the summation of amount, and the disposable renewal completing in amount application form the status information of the record completing deduction amount, realize the batch processing of amount application.
It should be noted that, the amount method for processing resource that the embodiment of the present invention provides has been processed by backstage amount resource handling procedure (i.e. the embodiment of the present invention provide amount method for processing resource), instead of is completed by on-line transaction program.
The amount method for processing resource that the embodiment of the present invention provides, amount application form is set, in amount application form, amount application information is recorded by on-line transaction, on-line transaction is no longer direct carries out exclusive access and renewal to amount resource, but realized the process of amount resource according to amount application form by backstage amount resource handling procedure, and amount resource handling procedure can carry out batch processing to the record in amount application form.And owing to not relating to the process of amount resource to the read-write of amount application form, therefore multiple on-line transaction access amount application form that can walk abreast, thus decrease the situation that a large amount of on-line transaction queuing serial exclusive access upgrades amount resource, reduce the probability of the congested generation of transaction, improve response speed.And, owing to there is not the resource contention of multiple on-line transaction (i.e. on-line transaction program), therefore avoid the generation of deadlock between program.
In addition, the amount method for processing resource that the embodiment of the present invention provides, improves the safety and stability of system.In the embodiment of the present invention, the access unique by backstage amount resource handling procedure and renewal amount resource, visiting frequency is controlled, compare a large amount of on-line transaction concurrent plunder amount resource, the embodiment of the present invention can be born by mitigation system greatly, avoid a large amount of concurrent on-line transaction to cause congested owing to waiting for the release of amount resource, system resources consumption is excessive, even system crash.
Optionally, described analyzing and processing is carried out to the record in amount application form, to determine a kind of realization flow figure of the entry number summation of record that in amount application form, status information is application status as shown in Figure 2, can comprise:
Step S21: inquiring about all status informations in described amount application form is application status, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
In the embodiment of the present invention, for the record of application status, be still application status after exceeding certain hour, this part in-line processing time-out recorded is described, follow-up on-line transaction process cannot be carried out, namely invalid record, therefore, this part status information recorded is revised as the state of cancelling.
Step S22: adding up status information in described amount application form is the entry number summation of the record of application status.
Optionally, described analyzing and processing is carried out to the record in amount application form, to determine the another kind of realization flow figure of the entry number summation of record that in amount application form, status information is application status as shown in Figure 3, can comprise:
Step S31: inquiring about all status informations in described amount application form is application success status, and the 3rd time difference of application time distance current time is greater than the record of the 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state; Wherein, described 3rd preset duration is greater than described second preset duration.
Record in amount application form is processed successfully, and status information will be modified as application success status, wait pending subsequent treatment, and now, if cannot carry out subsequent treatment due to program exception or network reason, then the amount that this part has been deducted will be wasted.Therefore, in amount application form, status information is application success status, and the record that writing time is greater than the 3rd preset duration apart from the 3rd time difference of current time also belongs to invalid record, in the embodiment of the present invention, judge status information be application success status record whether time-out does not use, if so, then by amount reclaim, and more new state information for cancelling state.
Step S32: adding up status information in described amount application form is the entry number summation of the record of application status.
Optionally, described analyzing and processing is carried out to the record in amount application form, to determine another realization flow figure of the entry number summation of record that in amount application form, status information is application status as shown in Figure 4, can comprise:
Step S41: inquiring about all status informations in described amount application form is application status, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
Step S42: all states in described amount application form of inquiring about are application success status, and the 3rd time difference of application time distance current time is greater than the record of the 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
It should be noted that, the execution sequence of step S41 and step S42 is not specifically limited, and first can perform step S41, then perform step S42; Or, first perform step S42, then perform step S41; Or step S41 and step S42 performs simultaneously.
Step S43: adding up status information in described amount application form is the entry number summation of the record of application status.
In above-described embodiment, optionally, described second preset duration is greater than the default waiting time of on-line transaction.In the embodiment of the present invention, on-line transaction waits for the second preset duration after recording amount application information in amount application form, can carry out subsequent treatment after wait second preset duration according to the record in amount application form.
The embodiment of the present invention also provides a kind of on-line transaction disposal route, specifically can comprise:
Client initialization brings up again number of times, and initiates first time on-line transaction;
In the embodiment of the present invention, bring up again number of times be client arrange one repeat submit to count parameter, because backstage amount resource processing procedure (i.e. the embodiment of the present invention provide amount method for processing resource) may exist time delay, therefore, design is repeatedly brought up again, to extend the time waiting for the process of amount resource.
Described initiation first time on-line transaction can comprise:
In the amount application form that backstage stores, write this amount application record, described amount application record comprises: the application object of amount application, application amount, application time and status information, and initial state information is application status;
First time, on-line transaction program was when submitting amount application to backstage, in the amount application form that backstage stores, write this amount application record.
Inquiry is brought up again number of times and whether is exceeded limit value, as exceeded, then exits transaction, otherwise, number of times will be brought up again and add 1, and initiate second time on-line transaction to backstage after wait preset time period; Described second time on-line transaction of initiating to backstage comprises:
Whether inquiry backstage opens amount resource processing procedure, if amount resource processing procedure is opened on backstage, then inquire about the status information of this amount application in amount application form, if application status, then return and perform described inquiry and bring up again the step whether number of times exceed limit value, if apply for status of fail or cancel state, then report an error and exit, if application success status, then start follow-up on-line transaction logical process, after follow-up on-line transaction process completes, again inquire about the status information in amount application form, if the status information in amount application form in record is for cancelling state, then rollback, process before cancelling, as being still application success status, it is then process completion status by the state information updating in respective record in amount application form.Wherein, described amount resource processing procedure is amount method for processing resource as above; If amount resource processing procedure is not opened on backstage, then directly access and upgrade amount resource, according to the status information upgrading respective record in result renewal amount application form, concrete, if the success of amount resource updates, then more new state information is for apply for successfully, otherwise more new state information is for apply for unsuccessfully.When the success of on-line transaction subsequent treatment, then upgrading the status information recorded in amount application form is process completion status.
In the embodiment of the present invention, on-line transaction is divided into and carries out for twice, first time on-line transaction registration amount application form, then wait for that the process of amount resource is carried out on backstage, after wait certain time length, initiate second time on-line transaction, directly process amount table by second time on-line transaction program, visible, on-line transaction program no longer directly accesses amount resource, but access amount application form.And will control the stand-by period in the transaction of foreground, the stand-by period is controlled, when avoiding a large amount of on-line transaction concurrent, the congested and hypervelocity caused the reading renewal of amount resource queue, improves the Transaction Success rate in peak transaction moment.
In addition, in the embodiment of the present invention, when on-line transaction concurrency is lower, backstage amount resource processing procedure can be suspended, mark is enabled in first time on-line transaction reading backstage amount resource process, if backstage amount resource processing procedure is not opened, then first time on-line transaction registration amount application form, follow-up second time on-line transaction is directly accessed, is upgraded amount resource.Background program can be overcome like this and must wait for the time delay that amount application in batch is just done the process of amount resource and caused, and reduce system consumption.
Corresponding with embodiment of the method, the embodiment of the present invention also provides a kind of amount resource treating apparatus, and a kind of structural representation of the amount resource treating apparatus that the embodiment of the present invention provides as shown in Figure 5, can comprise:
Analysis and processing module 51, the first judge module 52, first computing module 53, second judge module 54, second computing module 55, comparison module 56, the first amount resource processing module 57 and the second amount resource processing module 58; Wherein,
Analysis and processing module 51 is for carrying out analyzing and processing to the record in amount application form, to determine the entry number summation of record that in amount application form, status information is application status, wherein, record each amount application information of on-line transaction record in described amount application form, in every bar record, record the application amount of every amount application, application time and status information;
First judge module 52 is for judging status information in described amount application form is whether the entry number summation of the record of application status reaches default entry number;
First computing module 53 is for when described first judge module 52 judges that described entry number summation does not reach described default entry number, in inquiry amount application form, status information is a record the earliest of application status, calculates the writing time of this record and the very first time difference of current time;
Second judge module 54 is for judging whether described very first time difference is greater than the first preset duration, if not, then trigger described analysis and processing module to perform and carry out analyzing and processing to the record in amount application form, to determine the step of the entry number summation of record that in amount application form, status information is application status;
When described first judge module 52, second computing module 55 is for judging that described entry number summation reaches described default entry number, or, when described second judge module 54 judges that the described very first time, difference was greater than described first preset duration, calculating all status informations in described amount application form is the summation of applying for amount in the record of application status, and inquires about the current residual amount value of amount resource;
Comparison module 56 is for comparing the summation of described application amount and described current residual amount value;
First amount resource processing module 57, for when the comparative result of described comparison module be the summation of described application amount be greater than described current residual amount value time, according to application time order, application amount is reduced by itemize from described current residual amount, the recording mark of deduction amount will be completed for application success status in amount application form, and trigger described analysis and processing module 51 and perform analyzing and processing is carried out to the record in amount application form, to determine the step of the entry number summation of record that in amount application form, status information is application status;
Second amount resource processing module 58 for when the comparative result of described comparison module be the summation of described application amount be less than or equal to described current residual amount value time, the summation of described application amount is deducted from current residual amount, disposablely application success status is all labeled as by completing recording of deduction amount in amount application form, and trigger described analysis and processing module 51 and perform analyzing and processing is carried out to the record in amount application form, to determine the step of the entry number summation of record that in amount application form, status information is application status.
A kind of amount resource of embodiment of the present invention treating apparatus, amount application form is set, in amount application form, amount application information is recorded by on-line transaction, on-line transaction is no longer direct carries out exclusive access and renewal to amount resource, but the amount resource treating apparatus provided by the embodiment of the present invention realizes the process of amount resource according to amount application form, and the amount resource treating apparatus that the embodiment of the present invention provides can carry out batch processing to the record in amount application form.And owing to not relating to the process of amount resource to the read-write of amount application form, therefore multiple on-line transaction access amount application form that can walk abreast, thus decrease the situation that a large amount of on-line transaction queuing serial exclusive access upgrades amount resource, reduce the probability of the congested generation of transaction, improve response speed.And, owing to there is not the resource contention of multiple on-line transaction (i.e. on-line transaction program), therefore avoid the generation of deadlock between program.
In addition, the amount resource treating apparatus that the embodiment of the present invention provides, improves the safety and stability of system.In the embodiment of the present invention, the access unique by amount resource treating apparatus and renewal amount resource, visiting frequency is controlled, compare a large amount of on-line transaction concurrent plunder amount resource, the embodiment of the present invention can be born by mitigation system greatly, avoid a large amount of concurrent on-line transaction to cause congested owing to waiting for the release of amount resource, system resources consumption is excessive, even system crash.
Optionally, a kind of structural representation of analysis and processing module 51 as shown in Figure 6, can comprise:
First analysis and processing unit 61 and the first statistic unit 62; Wherein,
First analysis and processing unit 61 is application status for inquiring about all status informations in described amount application form, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
First statistic unit 62 is the entry number summation of the record of application status for adding up status information in described amount application form.
Optionally, the another kind of structural representation of analysis and processing module 51 as shown in Figure 7, can comprise:
Second analysis and processing unit 71 and the second statistic unit 72; Wherein,
Second analysis and processing unit 71 is application success status for inquiring about all states in described amount application form, and the 3rd time difference of application time distance current time is greater than the record of the 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
Second statistic unit 72 is the entry number summation of the record of application status for adding up status information in described amount application form.
Optionally, another structural representation of analysis and processing module 51 as shown in Figure 8, can comprise:
3rd analysis and processing unit the 81, four analysis and processing unit 82 and the 3rd statistic unit 83; Wherein,
3rd analysis and processing unit 81 is application status for inquiring about all status informations in described amount application form, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
4th analysis and processing unit 82 is application success status for inquiring about all states in described amount application form, and the 3rd time difference of application time distance current time is greater than the record of the 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
3rd statistic unit 83 is the entry number summation of the record of application status for adding up status information in described amount application form.
Those of ordinary skill in the art can recognize, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with the combination of electronic hardware or computer software and electronic hardware.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the device of foregoing description and the specific works process of unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that disclosed apparatus and method can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another device can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.
To the above-mentioned explanation of the disclosed embodiments, professional and technical personnel in the field are realized or uses the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. an amount method for processing resource, is characterized in that, comprising:
S11: analyzing and processing is carried out to the record in amount application form, to determine the entry number summation of record that in amount application form, status information is application status, wherein, record each amount application information of on-line transaction record in described amount application form, in every bar record, record the application object of every amount application, application amount, application time and status information;
S12: judge status information in described amount application form is whether the entry number summation of the record of application status reaches default entry number, if so, then performs step S15; Otherwise, perform step S13;
S13: in inquiry amount application form, status information is a record the earliest of application status, calculates the writing time of this record and the very first time difference of current time;
S14: judge whether described very first time difference is greater than the first preset duration, if so, then performs step S15; Otherwise, return and perform step S11;
S15: calculating all status informations in described amount application form is the summation of applying for amount in the record of application status, and inquire about the current residual amount value of amount resource;
S16: the summation of described application amount and described current residual amount value are compared; If the summation of described application amount is greater than described current residual amount value, then perform step S17; Otherwise, perform step S18;
S17: according to application time order, application amount is reduced by itemize from described current residual amount, will complete the recording mark of deduction amount for application success status, and return execution step S11 in amount application form;
S18: the summation deducting described application amount from current residual amount, is disposablely all labeled as application success status by completing recording of deduction amount in amount application form, and returns and perform step S11.
2. method according to claim 1, is characterized in that, describedly carries out analyzing and processing to the record in amount application form, to determine that the entry number summation of record that in amount application form, status information is application status comprises:
Inquiring about all status informations in described amount application form is application status, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
Adding up status information in described amount application form is the entry number summation of the record of application status.
3. method according to claim 1, is characterized in that, describedly carries out analyzing and processing to the record in amount application form, to determine that the entry number summation of record that in amount application form, status information is application status comprises:
Inquiring about all status informations in described amount application form is application success status, and the 3rd time difference of application time distance current time is greater than the record of the 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
Adding up status information in described amount application form is the entry number summation of the record of application status.
4. method according to claim 1, is characterized in that, describedly carries out analyzing and processing to the record in amount application form, to determine that the entry number summation of record that in amount application form, status information is application status comprises:
Inquiring about all status informations in described amount application form is application status, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
All states in described amount application form of inquiring about are application success status, and the 3rd time difference of application time distance current time is greater than the record of described 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
Adding up status information in described amount application form is the entry number summation of the record of application status.
5. the method according to claim 2 or 4, is characterized in that, described second preset duration is greater than the default waiting time of on-line transaction.
6. an on-line transaction disposal route, is characterized in that, comprising:
Client initialization brings up again number of times, and initiates first time on-line transaction, and described initiation first time on-line transaction comprises:
In the amount application form that backstage stores, write this amount application record, described amount application record comprises: the application object of amount application, application amount, application time and status information, and initial state information is application status;
Inquiry is brought up again number of times and whether is exceeded limit value, as exceeded, then exits transaction, otherwise will bring up again number of times and add 1, and initiate second time on-line transaction to backstage after wait preset time period, described second time on-line transaction of initiating to backstage comprises:
Whether inquiry backstage opens amount resource processing procedure, if amount resource processing procedure is opened on backstage, then inquire about the status information of this amount application in amount application form, if application status, then return and perform described inquiry and bring up again the step whether number of times exceed limit value, if apply for status of fail or cancel state, then report an error and exit, if application success status, then start follow-up on-line transaction logical process, and when continuous on-line transaction logical process is successful in the rear, more new state information is process completion status; Wherein, described amount resource processing procedure is the amount resource processing procedure as described in claim 1-5 any one;
If amount resource processing procedure is not opened on backstage, then directly access and upgrade amount resource.
7. an amount resource treating apparatus, is characterized in that, comprising:
Analysis and processing module, for carrying out analyzing and processing to the record in amount application form, to determine the entry number summation of record that in amount application form, status information is application status, wherein, record each amount application information of on-line transaction record in described amount application form, in every bar record, record the application amount of every amount application, application time and status information;
First judge module, for judging status information in described amount application form is whether the entry number summation of the record of application status reaches default entry number;
First computing module, for when described first judge module judges that described entry number summation does not reach described default entry number, in inquiry amount application form, status information is a record the earliest of application status, calculates the writing time of this record and the very first time difference of current time;
Second judge module, for judging whether described very first time difference is greater than the first preset duration, if not, then trigger described analysis and processing module to perform and carry out analyzing and processing to the record in amount application form, to determine the step of the entry number summation of record that in amount application form, status information is application status;
Second computing module, for judging that described entry number summation reaches described default entry number when described first judge module, or, when described second judge module judges that the described very first time, difference was greater than described first preset duration, calculating all status informations in described amount application form is the summation of applying for amount in the record of application status, and inquires about the current residual amount value of amount resource;
Comparison module, for comparing the summation of described application amount and described current residual amount value;
First amount resource processing module, for when the comparative result of described comparison module be the summation of described application amount be greater than described current residual amount value time, according to application time order, application amount is reduced by itemize from described current residual amount, the recording mark of deduction amount will be completed for application success status in amount application form, and trigger described analysis and processing module and perform and analyzing and processing is carried out to the record in amount application form, to determine the step of the entry number summation of record that in amount application form, status information is application status;
Second amount resource processing module, for when the comparative result of described comparison module be the summation of described application amount be less than or equal to described current residual amount value time, the summation of described application amount is deducted from current residual amount, disposablely application success status is all labeled as by completing recording of deduction amount in amount application form, and trigger described analysis and processing module and perform and analyzing and processing is carried out to the record in amount application form, to determine the step of the entry number summation of record that in amount application form, status information is application status.
8. device according to claim 7, is characterized in that, described analysis and processing module comprises:
First analysis and processing unit is application status for inquiring about all status informations in described amount application form, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
First statistic unit is the entry number summation of the record of application status for adding up status information in described amount application form.
9. device according to claim 7, is characterized in that, described analysis and processing module comprises:
Second analysis and processing unit, for inquiring about in described amount application form all states for application success status, and the 3rd time difference of application time distance current time is greater than the record of the 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
Second statistic unit is the entry number summation of the record of application status for adding up status information in described amount application form.
10. device according to claim 7, is characterized in that, described analysis and processing module comprises:
3rd analysis and processing unit is application status for inquiring about all status informations in described amount application form, and the second time difference of application time distance current time is greater than the record of the second preset duration, by these state information updatings recorded for cancelling state;
4th analysis and processing unit, for inquiring about in described amount application form all states for application success status, and the 3rd time difference of application time distance current time is greater than the record of the 3rd preset duration, amount resource is returned by accumulative for these processed amounts recorded, and by these state information updatings recorded for cancelling state;
3rd statistic unit is the entry number summation of the record of application status for adding up status information in described amount application form.
CN201510061643.1A 2015-02-05 2015-02-05 Amount method for processing resource, on-line transaction processing method and processing device Active CN104599177B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510061643.1A CN104599177B (en) 2015-02-05 2015-02-05 Amount method for processing resource, on-line transaction processing method and processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510061643.1A CN104599177B (en) 2015-02-05 2015-02-05 Amount method for processing resource, on-line transaction processing method and processing device

Publications (2)

Publication Number Publication Date
CN104599177A true CN104599177A (en) 2015-05-06
CN104599177B CN104599177B (en) 2018-01-30

Family

ID=53124929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510061643.1A Active CN104599177B (en) 2015-02-05 2015-02-05 Amount method for processing resource, on-line transaction processing method and processing device

Country Status (1)

Country Link
CN (1) CN104599177B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040567A (en) * 2016-09-27 2017-08-11 阿里巴巴集团控股有限公司 The management-control method and device of pre-allocation of resources amount
CN107784500A (en) * 2017-03-14 2018-03-09 平安科技(深圳)有限公司 transaction limit control system and method
CN112380259A (en) * 2020-12-29 2021-02-19 四川新网银行股份有限公司 Method for improving processing speed of real-time online transaction share of online deposit product
US10983836B2 (en) 2018-08-13 2021-04-20 International Business Machines Corporation Transaction optimization during periods of peak activity

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067862A (en) * 2007-06-28 2007-11-07 中国工商银行股份有限公司 System and method for quota selling financial affairs-managing products
CN101216922A (en) * 2007-12-28 2008-07-09 中国工商银行股份有限公司 A system and method for real time ultra-short term financing
US20080276239A1 (en) * 2007-05-03 2008-11-06 International Business Machines Corporation Recovery and restart of a batch application

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080276239A1 (en) * 2007-05-03 2008-11-06 International Business Machines Corporation Recovery and restart of a batch application
CN101067862A (en) * 2007-06-28 2007-11-07 中国工商银行股份有限公司 System and method for quota selling financial affairs-managing products
CN101216922A (en) * 2007-12-28 2008-07-09 中国工商银行股份有限公司 A system and method for real time ultra-short term financing

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040567A (en) * 2016-09-27 2017-08-11 阿里巴巴集团控股有限公司 The management-control method and device of pre-allocation of resources amount
CN107784500A (en) * 2017-03-14 2018-03-09 平安科技(深圳)有限公司 transaction limit control system and method
US10983836B2 (en) 2018-08-13 2021-04-20 International Business Machines Corporation Transaction optimization during periods of peak activity
CN112380259A (en) * 2020-12-29 2021-02-19 四川新网银行股份有限公司 Method for improving processing speed of real-time online transaction share of online deposit product
CN112380259B (en) * 2020-12-29 2021-12-31 四川新网银行股份有限公司 Method for improving processing speed of real-time online transaction share of online deposit product

Also Published As

Publication number Publication date
CN104599177B (en) 2018-01-30

Similar Documents

Publication Publication Date Title
EP3329438B1 (en) Message dispatcher for payment system
CN104599177A (en) Limit resource processing method, online transaction processing method and limit resource processing device
EP1218856A1 (en) System and method for assigning a line of credit to a credit card account
CN104077362A (en) Online mass data processing system and method
US10332427B2 (en) Processing electronic payments using at least two payment tools for a transaction
JP2010152738A (en) Device, program and method for method managing method
WO2011011146A1 (en) System and method for real-time batch account processing
CN107358425B (en) Transaction fee calculation and payment method and device, transaction platform and storage medium
CN102567912A (en) Switching method of accounting date and business clearing and settlement system
US7735730B2 (en) System and method for state-based execution and recovery in a payment system
US10535069B2 (en) Method, medium, and system for handling blocks on orders during order processing
US10713659B2 (en) System and method for preventing multiple charges for a transaction in a payment system
CN110335154B (en) Account processing method, device and system based on storage management system
US10437623B2 (en) Fast switching between virtual machines without interrupt virtualization for high-performance, secure trusted-execution environment
US9665438B2 (en) System and method for the production of job level pre-processed backup of critical data and/or datasets in a mainframe computing environment
CN111027984A (en) Business order processing method and system, electronic equipment and computer storage medium
KR102430554B1 (en) Apparatus and method for providing wage of gig worker
US20160132395A1 (en) Peripheral bus error containment and recovery
CN110413421B (en) Service data processing method and device, and transaction data processing method and device
CN110689394B (en) Method and device for processing service supplementary notes
CN109919623A (en) Prevent account overdraw method, apparatus, equipment and readable storage medium storing program for executing
CN104574190A (en) Information processing method and device
EP3940549A1 (en) Parallel load operations for etl with unified post-processing
CN114880007A (en) Upgrading method, device, equipment and storage medium
WO2013189011A1 (en) Method and apparatus for transaction processing

Legal Events

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