CN104599177B - Amount method for processing resource, on-line transaction processing method and processing device - Google Patents

Amount method for processing resource, on-line transaction processing method and processing device Download PDF

Info

Publication number
CN104599177B
CN104599177B CN201510061643.1A CN201510061643A CN104599177B CN 104599177 B CN104599177 B CN 104599177B CN 201510061643 A CN201510061643 A CN 201510061643A CN 104599177 B CN104599177 B CN 104599177B
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.)
Active
Application number
CN201510061643.1A
Other languages
Chinese (zh)
Other versions
CN104599177A (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

Abstract

A kind of amount method for processing resource provided in an embodiment of the present invention, on-line transaction processing method and processing device, amount application form is set, amount application information is recorded in amount application form by on-line transaction, on-line transaction no longer directly carries out exclusive access and renewal to amount resource, but the processing of amount resource is realized 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 because the read-write to amount application form is not related to the processing of amount resource, therefore the access amount application form that multiple on-line transactions can be parallel, so as to reduce the situation that a large amount of on-line transactions are lined up serial exclusive access renewal amount resource, the probability that transaction congestion occurs is reduced, improves response speed.

Description

Amount method for processing resource, on-line transaction processing method and processing device
Technical field
The present invention relates to technical field of information processing, in particular, is related to a kind of amount method for processing resource, online friendship Disposable method and device.
Background technology
In banking on-line class business, be frequently present of to issue product amount control, such as the finance product amount upper limit, Bond sells limit etc., and these sale amount controls are with regard to needing to access amount resource progress focus in on-line transaction and more Newly, until resource exhaustion.For example, to the purchase-transaction of finance product, limit selling total value, successfully recognize per transaction Purchase transaction will all 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 must all access this Resource, all necessary exclusive access of this resource, exclusive renewal is accessed every time, to prevent the mistake to product limit from reading and writing, this just leads Amount resource is caused to turn into hot point resource, when making a big purchase transaction generation in large quantities, it is necessary to which transaction is lined up serial exclusive access renewal volume Resource is spent, causes congestion of merchandising, response speed is slack-off.When congestion constantly accumulates, make system resource exhaustion, result even in system Collapse.
Therefore, how amount resource is handled to reduce the probability that transaction congestion occurs, improving response speed turns into Urgent problem to be solved.
The content of the invention
It is an object of the invention to provide a kind of amount method for processing resource, on-line transaction processing method and processing device, with drop The probability that low transaction congestion occurs, improves response speed.
To achieve the above object, the embodiments of the invention provide following technical scheme:
A kind of amount method for processing resource, including:
S11:Record in amount application form is analyzed and processed, to determine that status information is application in amount application form The entry number summation of the record of state, wherein, record has each secondary amount application that on-line transaction records in the amount application form Information, record has the application object of every amount application, application amount, application time and status information in every record;
S12:Judge whether status information reaches for the entry number summation of the record of application status in the amount application form Default entry number, if so, then performing step S15;Otherwise, step S13 is performed;
S13:The earliest record that status information in amount application form is application status is inquired about, calculates the record of the record Time (i.e. application time) and the first time difference of current time;
S14:Judge whether the first time difference is more than the first preset duration, if so, then performing step S15;Otherwise, Return and perform step S11;
S15:The summation for applying for amount in the record that all status informations in the amount application form are application status is calculated, And inquire about the current residual amount value of amount resource;
S16:By the summation of the application amount compared with the current residual amount value;If the application amount Summation is more than the current residual amount value, then performs step S17;Otherwise, step S18 is performed;
S17:According to application time order, record reduce application amount from the current residual amount one by one, by volume Spend in application form and complete the recording mark for deducting amount as application success status, and return and perform step S11;
S18:The summation of the application amount is deducted from current residual amount, will complete to deduct amount in amount application form Record disposably all mark be success status, and return to execution step S11.
The above method, it is preferred that the record in the application form to amount analyzes and processes, to determine amount application form Middle status information includes for the entry number summation of the record of application status:
It is application status to inquire about all status informations in the amount application form, and the application time is apart from the of current time Two time differences are more than the record of the second preset duration, and the state information updating by these records is revocation state;
It is the entry number summation of the record of application status to count status information in the amount application form.
The above method, it is preferred that the record in the application form to amount analyzes and processes, to determine amount application form Middle status information includes for the entry number summation of the record of application status:
It is application success status to inquire about all status informations in the amount application form, and the application time is apart from current time The 3rd time difference be more than the record of the 3rd preset duration, return amount resource by the processed amount of these records is accumulative, And by these record state information updatings be revocation state;
It is the entry number summation of the record of application status to count status information in the amount application form.
The above method, it is preferred that the record in the application form to amount analyzes and processes, to determine amount application form Middle status information includes for the entry number summation of the record of application status:
It is application status to inquire about all status informations in the amount application form, and the application time is apart from the of current time Two time differences are more than the record of the second preset duration, and the state information updating by these records is revocation state;
Inquire about in the amount application form that institute is stateful for application success status, and the application time is apart from the of current time Three time differences are more than the record of the 3rd preset duration, and the processed amount of these records is added up to return amount resource, And by these record state information updatings be revocation state;
It is the entry number summation of the record of application status to count status information in the amount application form.
The above method, it is preferred that second preset duration is more than the default waiting time of on-line transaction.
A kind of on-line transaction processing method, including:
Client initialization brings up again number, and initiates first time on-line transaction, and the initiation first time on-line transaction includes:
This amount application record is write into the amount application form of backstage storage, the amount application record includes: The application object of amount application, apply for that amount, application time and status information, initial state information are application status;
Inquiry brings up again whether number exceedes limit value, as exceeded, then exits transaction, otherwise, will bring up again number and adds 1, and Second of on-line transaction is initiated to backstage after preset time period is waited, it is described to include to backstage second of on-line transaction of initiation:
Whether inquiry backstage opens amount resource processing procedure, if amount resource processing procedure is opened on backstage, inquires about The status information of this amount application in amount application form, if application status, then number is brought up again in the return execution inquiry is No the step of exceeding limit value, if application status of fail or revocation state, then report an error and exit, if success status is applied for, then When starting follow-up on-line transaction logical process, and continuing the success of on-line transaction logical process in the rear, more new state information is place Manage completion status;Wherein, the amount resource processing procedure is the as above amount resource processing procedure described in any one;
If amount resource processing procedure is not opened on backstage, directly access and update amount resource.
A kind of amount resource processing unit, including:
Analysis and processing module, for being analyzed and processed to the record in amount application form, to determine in amount application form Status information is the entry number summation of the record of application status, wherein, record has on-line transaction record in the amount application form Each secondary amount application information, record has the application amount of every amount application, application time and state letter in every record Breath;
First judge module, for judging that status information is the entry number of the record of application status in the amount application form Whether summation reaches default entry number;
First computing module, for judging that the entry number summation is not up to described preset when first judge module During entry number, the earliest record that status information in amount application form is application status is inquired about, when calculating the record of the record Between first time difference with current time;
Second judge module, for judging whether the first time difference is more than the first preset duration, if it is not, then triggering The analysis and processing module performs and the record in amount application form is analyzed and processed, to determine that state is believed in amount application form The step of ceasing the entry number summation of the record for application status;
Second computing module, for judging that the entry number summation reaches the default bar when first judge module Mesh number, or, when second judge module judges that the first time difference is more than first preset duration, calculate institute State in the record that all status informations in amount application form are application status and apply for the summation of amount, and inquire about working as amount resource Preceding residue angle value;
Comparison module, for by it is described application amount summation compared with the current residual amount value;
First amount resource processing module, for being the summation for applying for amount when the comparative result of the comparison module During more than the current residual amount value, according to application time order, recording will apply amount from the current residual volume one by one Reduced in degree, be application success status by the recording mark for completing to deduct amount in amount application form, and trigger at the analysis Reason module performs to be analyzed and processed to the record in amount application form, to determine that status information is application shape in amount application form The step of entry number summation of the record of state;
Second amount resource processing module, for being the summation for applying for amount when the comparative result of the comparison module During less than or equal to the current residual amount value, the summation of the application amount is deducted from current residual amount, by amount Disposably all mark is success status to the record of completion deduction amount in application form, and triggers the analysis and processing module Execution analyzes and processes to the record in amount application form, to determine that status information is the note of application status in amount application form The step of entry number summation of record.
Said apparatus, it is preferred that the analysis and processing module includes:
First analysis and processing unit, it is application status for inquiring about all status informations in the amount application form, and Shen Please time gap current time the second time difference be more than the second preset duration record, by these record status information more New is revocation state;
First statistic unit, it is the entry number of the record of application status for counting status information in the amount application form Summation.
Said apparatus, it is preferred that the analysis and processing module includes:
Second analysis and processing unit, it is to apply for success status for it is stateful to inquire about institute in the amount application form, and Shen Please time gap current time the 3rd time difference be more than the 3rd preset duration record, by these record processed amount It is accumulative to return amount resource, and be revocation state by the state information updating of these records;
Second statistic unit, it is the entry number of the record of application status for counting status information in the amount application form Summation.
Said apparatus, it is preferred that the analysis and processing module includes:
3rd analysis and processing unit, it is application status for inquiring about all status informations in the amount application form, and Shen Please time gap current time the second time difference be more than the second preset duration record, by these record status information more New is revocation state;
4th analysis and processing unit, it is to apply for success status for it is stateful to inquire about institute in the amount application form, and Shen Please time gap current time the 3rd time difference be more than the 3rd preset duration record, by these record processed amount It is accumulative to return amount resource, and be revocation state by the state information updating of these records;
3rd statistic unit, it is the entry number of the record of application status for counting status information in the amount application form Summation.
By above scheme, a kind of amount method for processing resource provided in an embodiment of the present invention, on-line transaction processing Method and device, amount application form is set, amount application information is recorded in amount application form by on-line transaction, on-line transaction is not Exclusive access and renewal are directly carried out to amount resource again, but it is real according to amount application form by an independent background application The processing of existing amount resource, and background application can carry out batch processing to the record in amount application form.And due to Read-write to amount application form is not related to the processing of amount resource, therefore the access amount application that multiple on-line transactions can be parallel Table, so as to reduce the situation that a large amount of on-line transactions are lined up serial exclusive access renewal amount resource, reduce congestion of merchandising Probability, improve response speed.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is a kind of implementation process figure of amount method for processing resource provided in an embodiment of the present invention;
Fig. 2 is that the record in the application form provided in an embodiment of the present invention to amount analyzes and processes, to determine amount Shen Please in table status information for the entry number summation of the record of application status a kind of implementation process figure;
Fig. 3 is that the record in the application form provided in an embodiment of the present invention to amount analyzes and processes, to determine amount Shen Please in table status information for the entry number summation of the record of application status another implementation process figure;
Fig. 4 is that the record in the application form provided in an embodiment of the present invention to amount analyzes and processes, to determine amount Shen Please in table status information for the entry number summation of the record of application status another implementation process figure;
Fig. 5 is a kind of structural representation of amount resource processing unit provided in an embodiment of the present invention;
Fig. 6 is a kind of structural representation of analysis and processing module provided in an embodiment of the present invention;
Fig. 7 is another structural representation of analysis and processing module provided in an embodiment of the present invention;
Fig. 8 is another structural representation of analysis and processing module provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
Fig. 1 is refer to, Fig. 1 is a kind of implementation process figure of amount method for processing resource provided in an embodiment of the present invention, can With including:
Step S11:Record in amount application form is analyzed and processed, using determine in amount application form status information as The entry number summation of the record of application status, wherein, record has each secondary amount that on-line transaction records in the amount application form Application information, every record in record have every amount application application object, application amount, the application time and state letter Breath;
In the embodiment of the present invention, amount application form is set, the amount application form is used to record what each on-line transaction was initiated Each secondary amount application information, corresponding one of an amount application (i.e. an amount application) record, and record has one in every record Application object (i.e. the product of user's application), application amount, application time and the status information of secondary amount application, wherein, often The initial state information of bar record is application status.After the record in application status successfully applies for amount, its state is changed to Apply for success status, if applying for amount not successfully, status information is changed to revocation state.If status information is application success status Record do not used by follow-up on-line transaction, then status information is also changed to revocation state.If successfully being used by follow-up on-line transaction, Then status information is changed to handle completion status.
Record in the application form to amount, which carries out analyzing and processing, to be included:Determine note invalid in amount application form Record, revocation state is revised as by the status information of invalid record, it is then determined that status information is application shape in amount application form The entry number of the record of state.
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 because the read-write to amount application form is not related to the processing of amount resource, because This multiple on-line transaction can be parallel processing amount application form, so as to avoid on-line transaction from being lined up serial exclusive access renewal volume Spend resource.
Step S12:Judge status information in the amount application form for the record of application status entry number summation whether Reach default entry number, if so, then performing step S15;Otherwise, step S13 is performed;
Step S13:It is an earliest record for application status to inquire about status information in amount application form, calculates the record Record the first time difference of time and current time;
Step S14:Judge whether the first time difference is more than the first preset duration, if so, then performing step S15; Otherwise, return and perform step S11;
In the embodiment of the present invention, status information reaches for the entry number summation of the record of application status in amount application form Default entry number, or, although status information is not up to pre- for the entry number summation of the record of application status in amount application form If entry number, but status information is record time and the current time of an earliest record for application status in amount application form When first time difference is more than the first preset duration, illustrate that on-line transaction concurrency is higher, now amount resource is entered by backstage Row processing.
Optionally, when in amount application form status information be the not up to default bar of entry number summation of the record of application status Mesh number, and status information is record time and current time the first of an earliest record for application status in amount application form When time difference is less than or equal to the first preset duration, the 4th preset duration is waited, if after waiting the 4th preset duration, amount Shen Please in table status information for the record of application status the still not up to default entry number of entry number summation, and in amount application form Status information for application status it is earliest one record record the time and current time first time difference still less than or Equal to the first preset duration, then step S15- steps S17 can not be performed.That is, in the embodiment of the present invention, when amount Shen Please status information be the not up to default entry number of entry number summation of the record of application status in table, and state in amount application form Information is less than or equal to first for the record time of an earliest record of application status and the first time difference of current time During preset duration, the 4th preset duration is waited, if after waiting the 4th preset duration, status information is application shape in amount application form The still not up to default entry number of the entry number summation of the record of state, and in amount application form status information be application status most The record time of an early record and the first time difference of current time illustrates to join still less than or equal to the first preset duration Machine transaction concurrency is relatively low, can not now start the amount resource processing procedure on backstage.
Optionally, in the embodiment of the present invention, can also determine whether to open the amount Energy Resources Service on backstage by the following method Reason process:
Newly-increased counter, for recording the entry number summation for the record that status information in amount application form is application status not Reach the read-around ratio of default entry number.Specifically, status information is the record of application status in amount application form is judged Entry number summation when reaching default entry number, by counter O reset;Status information is application in amount application form is judged When the record time of an earliest record of state and the first time difference of current time are more than the first preset duration, it will count Device adds 1, and judges whether count results reach pre-set count values, when the count results of counter reach the pre-set count values When, it is believed that on-line transaction concurrency is relatively low, can not start the amount resource processing procedure on backstage.
Step S15:It is application amount in the record of application status to calculate all status informations in the amount application form Summation, and inquire about the current residual amount value of amount resource;
Step S16:By the summation of the application amount compared with the current residual amount value;If the application volume The summation of degree is more than the current residual amount value, then performs step S17;Otherwise, step S18 is performed;
Step S17:According to application time order, record reduce application amount from the current residual amount one by one, It is application success status by the recording mark for completing to deduct amount in amount application form, and returns and perform step S11;
If the summation of application amount is more than the current residual amount value, illustrate the current residual amount of amount resource not It is enough, now according to the sequencing of application, a record is often read from amount application form, just from the remaining amount of amount resource It is middle to deduct the application amount recorded in this record, and the status information in this record in amount application form is changed to apply Success, until the remaining amount in amount resource not enough deducts the application amount recorded in a record.
Step S18:The summation of the application amount is deducted from current residual amount, will complete to deduct in amount application form Disposably all mark is success status to the record of amount, and returns and perform step S11.
If the summation of the application amount is less than or equal to the current residual amount value, directly detained from application amount Except the summation of application amount, and disposably complete to complete to deduct the renewal of the status information of the record of amount in amount application form, Realize the batch processing of amount application.
It should be noted that amount method for processing resource provided in an embodiment of the present invention is by backstage amount resource processing routine (amount method for processing resource i.e. provided in an embodiment of the present invention) processing is completed, rather than is completed by on-line transaction program.
Amount method for processing resource provided in an embodiment of the present invention, amount application form is set, by on-line transaction in amount Shen Amount application information please be recorded in table, on-line transaction no longer directly carries out exclusive access and renewal to amount resource, but by rear Platform amount resource processing routine realizes the processing of amount resource according to amount application form, and amount resource processing routine can be to volume The record spent in application form carries out batch processing.And because the read-write to amount application form is not related to the processing of amount resource, because This multiple on-line transaction can be parallel access amount application form, be lined up serial exclusive access so as to reduce a large amount of on-line transactions The situation of amount resource is updated, the probability that transaction congestion occurs is reduced, improves response speed.It is additionally, since in the absence of multiple The resource contention of machine transaction (i.e. on-line transaction program), therefore avoid the generation of deadlock between program.
In addition, amount method for processing resource provided in an embodiment of the present invention, the safety and stability of system is improved.This In inventive embodiments, uniquely accessed by backstage amount resource processing routine and update amount resource, visiting frequency is controllable, compares A large amount of on-line transactions concurrently grab amount resource, and the embodiment of the present invention can greatly mitigate system burden, avoid a large amount of concurrent On-line transaction causes congestion due to waiting the release of amount resource, and system resources consumption is excessive, or even system crash.
Optionally, the record in the application form to amount analyzes and processes, to determine that state is believed in amount application form A kind of implementation process figure of the entry number summation of the record for application status is ceased as shown in Fig. 2 can include:
Step S21:It is application status to inquire about all status informations in the amount application form, and application time distance is current The second time difference of time is more than the record of the second preset duration, and the state information updating by these records is revocation state;
In the embodiment of the present invention, for the record of application status, application status, explanation are remained as after more than certain time The online process time-out of this part record, will be unable to carry out follow-up on-line transaction processing, that is, invalid record, therefore, by this The status information of part record is revised as revocation state.
Step S22:It is the entry number summation of the record of application status to count status information in the amount application form.
Optionally, the record in the application form to amount analyzes and processes, to determine that state is believed in amount application form Another implementation process figure of the entry number summation of the record for application status is ceased as shown in figure 3, can include:
Step S31:It is to apply for success status to inquire about all status informations in the amount application form, and application time distance 3rd time difference of current time is more than the record of the 3rd preset duration, and the processed amount of these records is added up into refund amount Resource is spent, and is revocation state by the state information updating of these records;Wherein, the 3rd preset duration is more than described second Preset duration.
After record in amount application form is processed successfully, status information will be changed to apply for success status, wait Subsequent treatment is carried out, now, if because program exception or network reason can not carry out subsequent treatment, what this part had been deducted Amount will be wasted.Therefore, status information is application success status in amount application form, and records time gap current time The record that 3rd time difference is more than the 3rd preset duration falls within invalid record, in the embodiment of the present invention, judges status information To apply for whether time-out is not used the record of success status, if it is, amount is reclaimed, and more new state information is revocation shape State.
Step S32:It is the entry number summation of the record of application status to count status information in the amount application form.
Optionally, the record in the application form to amount analyzes and processes, to determine that state is believed in amount application form Another implementation process figure of the entry number summation of the record for application status is ceased as shown in figure 4, can include:
Step S41:It is application status to inquire about all status informations in the amount application form, and application time distance is current The second time difference of time is more than the record of the second preset duration, and the state information updating by these records is revocation state;
Step S42:It is stateful to apply for success status to inquire about institute in the amount application form, and application time distance is current The 3rd time difference of time is more than the record of the 3rd preset duration, and the accumulative amount of returning of the processed amount of these records is provided Source, and be revocation state by the state information updating of these records;
It should be noted that step S41 and step S42 execution sequence are not specifically limited, step can be first carried out S41, then perform step S42;Or step S42 is first carried out, then perform step S41;Or step S41 and step S42 is simultaneously Perform.
Step S43:It is the entry number summation of the record of application status to count status information in the amount application form.
In above-described embodiment, optionally, second preset duration is more than the default waiting time of on-line transaction.The present invention In embodiment, on-line transaction waits the second preset duration after recording amount application information in amount application form, is waiting the Record that can be in amount application form after two preset durations carries out subsequent treatment.
The embodiment of the present invention also provides a kind of on-line transaction processing method, can specifically include:
Client initialization brings up again number, and initiates first time on-line transaction;
In the embodiment of the present invention, bring up again number and submit count parameter for the repetition that client is set, due to backstage volume Degree resource processing procedure (amount method for processing resource i.e. provided in an embodiment of the present invention) there may be delay, and therefore, design is more It is secondary to bring up again, to extend the time for waiting the processing of amount resource.
The initiation first time on-line transaction can include:
This amount application record is write into the amount application form of backstage storage, the amount application record includes: The application object of amount application, apply for that amount, application time and status information, initial state information are application status;
First time on-line transaction program writes when submitting amount application to backstage in the amount application form of backstage storage This amount application record.
Inquiry brings up again whether number exceedes limit value, as exceeded, then exits transaction, otherwise, will bring up again number and adds 1, and After preset time period is waited second of on-line transaction is initiated to backstage;It is described to include to backstage second of on-line transaction of initiation:
Whether inquiry backstage opens amount resource processing procedure, if amount resource processing procedure is opened on backstage, inquires about The status information of this amount application in amount application form, if application status, then number is brought up again in the return execution inquiry is No the step of exceeding limit value, if application status of fail or revocation state, then report an error and exit, if success status is applied for, then Start follow-up on-line transaction logical process, after the completion of follow-up on-line transaction processing, the state inquired about again in amount application form is believed Breath, if the status information in being recorded in amount application form has been revocation state, rollback, the processing before cancelling, such as still It is so application success status, then is processing completion status by the state information updating in respective record in amount application form.Wherein, The amount resource processing procedure is amount method for processing resource as described above;If backstage is not opened amount resource and treated Journey, then directly access and update amount resource, according to the status information of respective record in renewal result renewal amount application form, tool Body, if the success of amount resource updates, more new state information is applies for successfully, and otherwise, more new state information fails for application. When the success of on-line transaction subsequent treatment, then it is processing completion status to update the status information recorded in amount application form.
In the embodiment of the present invention, on-line transaction is divided into and carried out twice, first time on-line transaction registration amount application form, so Wait backstage to carry out amount resource processing afterwards, second of on-line transaction is initiated after certain time length is waited, by second of online friendship Easy program directly handles amount table, it is seen then that on-line transaction program no longer directly accesses amount resource, but accesses amount application Table.Moreover, will control the stand-by period in the transaction of foreground, the stand-by period is controllable, when avoiding a large amount of on-line transactions concurrent, to amount Resource queue reads congestion and hypervelocity caused by renewal, improves the transaction success rate at peak transaction moment.
In addition, in the embodiment of the present invention, in the case where on-line transaction concurrency is relatively low, backstage amount resource processing procedure It can suspend, first time on-line transaction reads the processing of backstage amount resource and enables mark, if backstage amount resource processing procedure is not Open, then first time on-line transaction registration amount application form, follow-up second of on-line transaction directly access, update amount resource. It can so overcome background program to have to wait for being delayed caused by the processing of amount resource is just done in amount application in batch, and reduce system Consumption.
Corresponding with embodiment of the method, the embodiment of the present invention also provides a kind of amount resource processing unit, and the present invention is implemented A kind of structural representation for the amount resource processing unit that example provides is as shown in figure 5, can include:
Analysis and processing module 51, the first judge module 52, the first computing module 53, the second judge module 54, second calculates 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 used to analyze and process the record in amount application form, to determine in amount application form Status information is the entry number summation of the record of application status, wherein, record has on-line transaction record in the amount application form Each secondary amount application information, record has the application amount of every amount application, application time and state letter in every record Breath;
First judge module 52 is used to judge that status information is the entry of the record of application status in the amount application form Whether number summation reaches default entry number;
First computing module 53 is used for when first judge module 52 judges that the entry number summation is not up to described During default entry number, the earliest record that status information in amount application form is application status is inquired about, calculates the note of the record Record the first time difference of time and current time;
Second judge module 54 is used to judge whether the first time difference is more than the first preset duration, if it is not, then touching Send out analysis and processing module described and perform and the record in amount application form is analyzed and processed, to determine state in amount application form The step of information is the entry number summation of the record of application status;
Second computing module 55 is used for when first judge module 52 judges that the entry number summation reaches described pre- If entry number, or, when second judge module 54 judges that the first time difference is more than first preset duration, Calculate in the record that all status informations in the amount application form are application status and apply for the summation of amount, and inquire about amount money The current residual amount value in source;
Comparison module 56 is used for the summation by the application amount compared with the current residual amount value;
First amount resource processing module 57, for being the total of the application amount when the comparative result of the comparison module During with more than the current residual amount value, according to application time order, recording will apply amount from the current residual one by one Reduced in amount, be application success status by the recording mark for completing to deduct amount in amount application form, and trigger the analysis Processing module 51 performs to be analyzed and processed to the record in amount application form, to determine that status information is Shen in amount application form Please state record entry number summation the step of;
Second amount resource processing module 58 is used for when the comparative result of the comparison module is the total of the application amount During with less than or equal to the current residual amount value, the summation of the application amount is deducted from current residual amount, by volume Spend in application form and complete the record for deducting amount disposably all to mark to be success status, and trigger the analyzing and processing mould Block 51 performs to be analyzed and processed to the record in amount application form, to determine that status information is application status in amount application form Record entry number summation the step of.
A kind of amount resource processing unit of the embodiment of the present invention, amount application form is set, by on-line transaction in amount application Amount application information is recorded in table, on-line transaction no longer directly carries out exclusive access and renewal to amount resource, but by this hair The amount resource processing unit that bright embodiment provides realizes the processing of amount resource, and the embodiment of the present invention according to amount application form The amount resource processing unit of offer can carry out batch processing to the record in amount application form.And due to amount application The read-write of table is not related to the processing of amount resource, therefore the access amount application form that multiple on-line transactions can be parallel, so as to reduce A large amount of on-line transactions are lined up the situation of serial exclusive access renewal amount resources, reduce the probability that transaction congestion occurs, improve Response speed.The resource contention in the absence of multiple on-line transactions (i.e. on-line transaction program) is additionally, since, therefore avoids program Between deadlock generation.
In addition, amount resource processing unit provided in an embodiment of the present invention, the safety and stability of system is improved.This In inventive embodiments, uniquely accessed by amount resource processing unit and update amount resource, visiting frequency is controllable, compared to a large amount of On-line transaction concurrently grabs amount resource, and the embodiment of the present invention can greatly mitigate system burden, avoids a large amount of concurrent online Transaction causes congestion due to waiting the release of amount resource, and system resources consumption is excessive, or even system crash.
Optionally, a kind of structural representation of analysis and processing module 51 is as shown in fig. 6, can include:
First analysis and processing unit 61 and the first statistic unit 62;Wherein,
It is application status that first analysis and processing unit 61, which is used to inquire about all status informations in the amount application form, and Shen Please time gap current time the second time difference be more than the second preset duration record, by these record status information more New is revocation state;
It is the entry of the record of application status that first statistic unit 62, which is used to count status information in the amount application form, Number summation.
Optionally, another structural representation of analysis and processing module 51 is as shown in fig. 7, can include:
Second analysis and processing unit 71 and the second statistic unit 72;Wherein,
It is to apply for success status that it is stateful, which to be used to inquire about institute in the amount application form, for second analysis and processing unit 71, and Shen Please time gap current time the 3rd time difference be more than the 3rd preset duration record, by these record processed amount It is accumulative to return amount resource, and be revocation state by the state information updating of these records;
It is the entry of the record of application status that second statistic unit 72, which is used to count status information in the amount application form, Number summation.
Optionally, another structural representation of analysis and processing module 51 is as shown in figure 8, can include:
3rd analysis and processing unit 81, the 4th analysis and processing unit 82 and the 3rd statistic unit 83;Wherein,
It is application status that 3rd analysis and processing unit 81, which is used to inquire about all status informations in the amount application form, and Shen Please time gap current time the second time difference be more than the second preset duration record, by these record status information more New is revocation state;
It is to apply for success status that it is stateful, which to be used to inquire about institute in the amount application form, for 4th analysis and processing unit 82, and Shen Please time gap current time the 3rd time difference be more than the 3rd preset duration record, by these record processed amount It is accumulative to return amount resource, and be revocation state by the state information updating of these records;
It is the entry of the record of application status that 3rd statistic unit 83, which is used to count status information in the amount application form, Number summation.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Member and algorithm steps, it can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually Performed with hardware or software mode, application-specific and design constraint depending on technical scheme.Professional and technical personnel Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description With the specific work process of unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, it can be passed through Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, only Only a kind of division of logic function, there can be other dividing mode when actually realizing, such as multiple units or component can be tied Another device is closed or is desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or discussed Mutual coupling or direct-coupling or communication connection can be the INDIRECT COUPLINGs or logical by some interfaces, device or unit Letter connection, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.
The foregoing description of the disclosed embodiments, professional and technical personnel in the field are enable to realize or using the present invention. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope caused.

Claims (10)

  1. A kind of 1. amount method for processing resource, it is characterised in that including:
    S11:Record in amount application form is analyzed and processed, to determine that status information is application status in amount application form Record entry number summation, wherein, in the amount application form record have on-line transaction record each secondary amount application information, Record has the application object of every amount application, application amount, application time and status information in every record;
    S12:Judge whether status information reaches default for the entry number summation of the record of application status in the amount application form Entry number, if so, then performing step S15;Otherwise, step S13 is performed;
    S13:The earliest record that status information in amount application form is application status is inquired about, calculates the record time of the record With the first time difference of current time;
    S14:Judge whether the first time difference is more than the first preset duration, if so, then performing step
    S15;Otherwise, return and perform step S11;
    S15:Calculate in the record that all status informations in the amount application form are application status and apply for the summation of amount, and look into Ask the current residual amount value of amount resource;
    S16:By the summation of the application amount compared with the current residual amount value;If the summation of the application amount More than the current residual amount value, then step S17 is performed;Otherwise, step S18 is performed;
    S17:According to application time order, record reduce application amount from the current residual amount one by one, by amount Shen It please complete to deduct the recording mark of amount to apply for success status in table, and return and perform step S11;
    S18:The summation of the application amount is deducted from current residual amount, the note of deduction amount will be completed in amount application form The disposable all marks of record are success status, and return and perform step S11.
  2. 2. according to the method for claim 1, it is characterised in that the record in the application form to amount is carried out at analysis Reason, to determine that entry number summation of the status information as the record of application status includes in amount application form:
    It is application status to inquire about all status informations in the amount application form, and when the application time is apart from the second of current time Between difference be more than the second preset duration record, by these record state information updatings be revocation state;
    It is the entry number summation of the record of application status to count status information in the amount application form.
  3. 3. according to the method for claim 1, it is characterised in that the record in the application form to amount is carried out at analysis Reason, to determine that entry number summation of the status information as the record of application status includes in amount application form:
    All status informations are inquired about in the amount application form as application success status, and the application time is apart from the of current time Three time differences are more than the record of the 3rd preset duration, by the accumulative return amount resource of the processed amount of these records, and will The state information updating of these records is revocation state;
    It is the entry number summation of the record of application status to count status information in the amount application form.
  4. 4. according to the method for claim 1, it is characterised in that the record in the application form to amount is carried out at analysis Reason, to determine that entry number summation of the status information as the record of application status includes in amount application form:
    It is application status to inquire about all status informations in the amount application form, and when the application time is apart from the second of current time Between difference be more than the second preset duration record, by these record state information updatings be revocation state;
    It is stateful for application success status to inquire about in the amount application form institute, and when the application time is apart from the 3rd of current time Between difference be more than the record of the 3rd preset duration, return amount resource by the processed amount of these records is accumulative, and by these The state information updating of record is revocation state;
    It is the entry number summation of the record of application status to count status information in the amount application form.
  5. 5. the method according to claim 2 or 4, it is characterised in that second preset duration is more than the pre- of on-line transaction If waiting time.
  6. A kind of 6. on-line transaction processing method, it is characterised in that including:
    Client initialization brings up again number, and initiates first time on-line transaction, and the initiation first time on-line transaction includes:
    This amount application record is write into the amount application form of backstage storage, the amount application record includes:Amount The application object of application, apply for that amount, application time and status information, initial state information are application status;
    Inquiry brings up again whether number exceedes limit value, has such as exceeded, has then exited transaction, otherwise, will bring up again number and add 1, and waiting Second of on-line transaction is initiated to backstage after preset time period, it is described to include to backstage second of on-line transaction of initiation:
    Whether inquiry backstage opens amount resource processing procedure, if amount resource processing procedure is opened on backstage, inquires about amount The status information of this amount application in application form, if application status, then return to the execution inquiry and bring up again whether number surpasses The step of crossing limit value, if application status of fail or revocation state, then report an error and exit, if application success status, then start Follow-up on-line transaction logical process, and when continuing the success of on-line transaction logical process in the rear, more new state information is has handled Into state;Wherein, the amount resource processing procedure treats for the amount resource as described in claim 1-5 any one Journey;
    If amount resource processing procedure is not opened on backstage, directly access and update amount resource.
  7. A kind of 7. amount resource processing unit, it is characterised in that including:
    Analysis and processing module, for being analyzed and processed to the record in amount application form, to determine state in amount application form Information is the entry number summation of the record of application status, wherein, record has on-line transaction to record each in the amount application form Secondary amount application information, record has application amount, application time and the status information of every amount application in every record;
    First judge module, for judging that status information is the entry number summation of the record of application status in the amount application form Whether default entry number is reached;
    First computing module, for judging that the entry number summation is not up to the default entry when first judge module During number, inquire about the earliest record of status information in amount application form for application status, calculate record time of the record with The first time difference of current time;
    Second judge module, for judging whether the first time difference is more than the first preset duration, if it is not, then described in triggering Analysis and processing module performs and the record in amount application form is analyzed and processed, using determine in amount application form status information as The step of entry number summation of the record of application status;
    Second computing module, for judging that the entry number summation reaches the default entry when first judge module Number, or, when second judge module judges that the first time difference is more than first preset duration, described in calculating All status informations is apply for the summation of amount in the record of application status in amount application form, and inquire about the current of amount resource Residue angle value;
    Comparison module, for by it is described application amount summation compared with the current residual amount value;
    First amount resource processing module, it is more than for the comparative result when the comparison module for the summation of the application amount During the current residual amount value, according to application time order, recording will apply amount from the current residual amount one by one Reduce, be application success status by the recording mark for completing to deduct amount in amount application form, and trigger the analyzing and processing mould Block performs and the record in amount application form is analyzed and processed, to determine that status information is application status in amount application form The step of entry number summation of record;
    Second amount resource processing module, it is less than for the comparative result when the comparison module for the summation of the application amount Or during equal to the current residual amount value, the summation of the application amount is deducted from current residual amount, by amount application Disposably all mark is success status to the record of completion deduction amount in table, and triggers the analysis and processing module and perform Record in amount application form is analyzed and processed, to determine that status information is the record of application status in amount application form The step of entry number summation.
  8. 8. device according to claim 7, it is characterised in that the analysis and processing module includes:
    First analysis and processing unit, it is application status for inquiring about all status informations in the amount application form, and during application Between apart from current time the second time difference be more than the second preset duration record, by these record state information updatings be Revocation state;
    First statistic unit, it is total for the entry number of the record of application status for counting status information in the amount application form With.
  9. 9. device according to claim 7, it is characterised in that the analysis and processing module includes:
    Second analysis and processing unit, it is stateful to apply for success status for inquiring about institute in the amount application form, and during application Between apart from current time the 3rd time difference be more than the 3rd preset duration record, by these record processed amounts add up Amount resource is returned, and is revocation state by the state information updating of these records;
    Second statistic unit, it is total for the entry number of the record of application status for counting status information in the amount application form With.
  10. 10. device according to claim 7, it is characterised in that the analysis and processing module includes:
    3rd analysis and processing unit, it is application status for inquiring about all status informations in the amount application form, and during application Between apart from current time the second time difference be more than the second preset duration record, by these record state information updatings be Revocation state;
    4th analysis and processing unit, it is stateful to apply for success status for inquiring about institute in the amount application form, and during application Between apart from current time the 3rd time difference be more than the 3rd preset duration record, by these record processed amounts add up Amount resource is returned, and is revocation state by the state information updating of these records;
    3rd statistic unit, it is total for the entry number of the record of application status for counting status information in the amount application form With.
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 CN104599177A (en) 2015-05-06
CN104599177B true 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)

Families Citing this family (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
US10983836B2 (en) 2018-08-13 2021-04-20 International Business Machines Corporation Transaction optimization during periods of peak activity
CN112380259B (en) * 2020-12-29 2021-12-31 四川新网银行股份有限公司 Method for improving processing speed of real-time online transaction share of online deposit product

Citations (2)

* 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7895474B2 (en) * 2007-05-03 2011-02-22 International Business Machines Corporation Recovery and restart of a batch application

Patent Citations (2)

* 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

Also Published As

Publication number Publication date
CN104599177A (en) 2015-05-06

Similar Documents

Publication Publication Date Title
CN104599177B (en) Amount method for processing resource, on-line transaction processing method and processing device
CN108764911B (en) Transaction method and system for internet points
CN108764906A (en) A kind of server and its block chain transaction confirmation method, device, storage medium
WO2019169758A1 (en) Data processing device and method and computer readable storage medium
CN106981021A (en) It is a kind of to realize the data processing method continuously serviced and device
US20090106075A1 (en) Methods and apparatus for estimation of project schedules
CN107437222A (en) The processing method and system of online business data based on bank counter front end
CN109584078A (en) Fund applies to purchase management method, device, computer readable storage medium and server
CN110728519B (en) Processing method and device for repudiation task and server
WO2015004692A1 (en) Payment system, server, terminal, method and program
CN102567912A (en) Switching method of accounting date and business clearing and settlement system
CN107038560A (en) A kind of system, the method and device of payment transaction execution
WO2017107870A1 (en) Offline payment method and device
CN107133788A (en) A kind of reimbursement processing method and processing device
US20080221857A1 (en) Method and apparatus for simulating the workload of a compute farm
CN110335154A (en) It is a kind of based on accounting processing method, equipment and the system of depositing guard system
CN109472680A (en) A kind of accounting processing method and system
CN106933655A (en) Event execution method and device
CN105897931A (en) Network traffic-free control method and device
CN109101321A (en) A kind of message monitoring method and device based on cloud platform
CN108897776A (en) A kind of arithmetic processing method of data information, device and computer storage medium
CN106559310B (en) A kind of the excitation update method and system of access of virtual interaction platform
JP5889379B1 (en) Electronic record receivable collateral management service system and method
TWM621022U (en) Server system of intelligent procurement platform
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