CN109118344A - A kind of business retries method and apparatus - Google Patents

A kind of business retries method and apparatus Download PDF

Info

Publication number
CN109118344A
CN109118344A CN201810736350.2A CN201810736350A CN109118344A CN 109118344 A CN109118344 A CN 109118344A CN 201810736350 A CN201810736350 A CN 201810736350A CN 109118344 A CN109118344 A CN 109118344A
Authority
CN
China
Prior art keywords
business
retries
interval duration
retry
interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810736350.2A
Other languages
Chinese (zh)
Inventor
王乾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810736350.2A priority Critical patent/CN109118344A/en
Publication of CN109118344A publication Critical patent/CN109118344A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

This specification embodiment provides a kind of business and retries method and apparatus, wherein the described method includes: when doing business, business occurring and executes failure;It determines and retries interval duration, the interval duration that retries is the time interval between business adjacent twice when retrying to business progress business retries;Also, when business number of retries gradually increases, the interval duration that retries also is gradually increased;Interval duration is retried according to determining, execution retries the business of the business.

Description

A kind of business retries method and apparatus
Technical field
This disclosure relates to technical field of data processing, in particular to a kind of business retries method and apparatus.
Background technique
It is a kind of common situation that business, which retries, when causing business to execute failure for a variety of reasons, in many cases Execution can be retried again with separated in time, until business runs succeeded.For example, there are magnanimity accounts in collecting charge system Singly need to do it is receivable check and write off processing, real-time bill is signed up as trade company and is checked and write off, in real time for bill generate after can stand Checked and write off.Without being further processed if real-time bill is checked and write off successfully, if in real time bill because of system reason for example System is busy or service reason such as account balance deficiency causes to check and write off failure and then needs to be denoted as account due, and does subsequent heavy Examination is until checking and writing off successfully.
After checking and writing off unsuccessfully for real-time bill at present, record will do it, and at a fixed time (e.g., No. 1 monthly, 5 Number, No. 10, No. 15, No. 20, No. 25) fish for that whole system is all not to check and write off successful bill and retry, therefore, benefit checks and writes off task A large amount of system resource will be consumed to retry.
Summary of the invention
In view of this, this specification one or more embodiment, which provides a kind of business, retries method and apparatus, it is big to reduce The business of amount retries the consumption to resource.
Specifically, this specification one or more embodiment is achieved by the following technical solution:
In a first aspect, providing a kind of business retries method, which comprises
When doing business, business occurs and executes failure;
It determines and retries interval duration, the interval duration that retries is adjacent twice when retrying to business progress business Business retry between time interval;Also, when business number of retries gradually increases, the interval duration that retries also gradually increases Greatly;
Interval duration is retried according to determining, execution retries the business of the business.
Second aspect provides a kind of business and retries device, and described device includes:
Business execution module executes failure for business when doing business, to occur;
Interval determination module retries interval duration for determining, it is described retry interval duration be to the target service into Industry business business adjacent twice when retrying retry between time interval;Also, when business number of retries gradually increases, institute State retry interval duration be also gradually increased;
Processing module is retried, for retrying interval duration according to determining, execution retries the business of target service.
The third aspect provides a kind of business and retries equipment, and the equipment includes memory, processor, and is stored in On reservoir and the computer instruction that can run on a processor, the processor perform the steps of when executing instruction
When doing business, business occurs and executes failure;
It determines and retries interval duration, the interval duration that retries is adjacent twice when retrying to business progress business Business retry between time interval;Also, when business number of retries gradually increases, the interval duration that retries also gradually increases Greatly;
Interval duration is retried according to determining, execution retries the business of the business.
The business of this specification one or more embodiment retries method and apparatus, by gradually increasing in business number of retries Added-time is arranged the retrying interval duration that business next time retries between the execution of this business and is also gradually increased, so that business weight Retrying for examination is spaced in gradually rarefaction, can then reduce the consumption to resource.Furthermore the industry of failure is executed for each For business, it independent can execute above-mentioned business and retry method, the business that can disperse different business retries the time, as far as possible It avoids the business for fishing for magnanimity in the same time from being retried, can also reduce the consumption to system resource.
Detailed description of the invention
In order to illustrate more clearly of this specification one or more embodiment or technical solution in the prior art, below will A brief introduction will be made to the drawings that need to be used in the embodiment or the description of the prior art, it should be apparent that, it is described below Attached drawing is only some embodiments recorded in this specification one or more embodiment, and those of ordinary skill in the art are come It says, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the process that the business that this specification one or more embodiment provides retries method;
Fig. 2 is the process that the business that this specification one or more embodiment provides retries method;
Fig. 3 is the process that the business that this specification one or more embodiment provides retries method;
Fig. 4 is the process that the business that this specification one or more embodiment provides retries method;
Fig. 5 is the structural schematic diagram that the business that this specification one or more embodiment provides retries device;
Fig. 6 is the structural schematic diagram that the business that this specification one or more embodiment provides retries device.
Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in this specification one or more embodiment, Below in conjunction with the attached drawing in this specification one or more embodiment, to the technology in this specification one or more embodiment Scheme is clearly and completely described, it is clear that and described embodiment is only this specification a part of the embodiment, rather than Whole embodiments.Based on this specification one or more embodiment, those of ordinary skill in the art are not making creativeness The range of disclosure protection all should belong in every other embodiment obtained under the premise of labour.
Fixed date total system fish for it is all be not carried out successful business and retried, when the number of services retried compared with When more, a large amount of system resource will be consumed.Wherein, partial service has a characteristic that some execute the business of failure, is executing When multiple business retries, number of retries is more, and success rate is lower.
For example, it is assumed that have the execution of charge operation be unsuccessfully since the account balance deficiency of trade company causes, if that The business carried out many times retries, and has certain time interval between retrying per business twice, still always remaining sum Deficiency retries, it is more likely that still fail even when being further continued for carry out business.Moreover, number of retries is more, substantially more energy Determine the state that trade company will keep account not supplement with money, then it is lower to the estimation of success rate.
The business retried for having the characteristics that above-mentioned business, when carry out business retries, so that it may take certain arrange Apply the consumption reduced to system resource.Based on this, at least one embodiment of this specification provides a kind of business and retries method, should Method is intended to reduce a large amount of business and retries consumption to resource.
This method can be when executing service fail, and determination retries time interval, and it is to the industry that this, which retries interval duration, Business carry out business business adjacent twice when retrying retry between time interval." retrying interval duration " tool that this method determines Have following features: when the business number of retries gradually increases, the interval duration that retries also is gradually increased.For example, Business executes for the first time and first time business retry between the interval duration that retries can be 1 day, second of business is retried with first Secondary business retry between retry interval duration can be 3 days, third time business retry with second of business retry between weight Examination interval duration can be 6 days, etc..It can be seen that the number that business retries is more, it is bigger to retry interval duration.
It is specific determine described in " retry interval duration " method can there are many, several determinations particularized below retry the time The example at interval, including but not limited to:
For example, can according to business number of retries and it is scheduled retry time set-up mode determination retry interval duration, This, which retries time set-up mode, can be a kind of formula.For example, between the formula can be used to indicate that business number of retries and retry Functional relation between duration, illustratively, business, which is retried, next time retries interval duration between the execution of this business It is " current retries interval duration "+N days, wherein N is business number of retries.For example, following table 1 illustrates under the formula Retry interval duration calculating:
Table 1 retries interval duration
Business number of retries Retry interval duration
1 0+1=1
2 1+2=3
3 3+3=6
4 6+4=10
5 10+5=15
In another example the above-mentioned scheduled time set-up mode that retries can be setting business number of retries and retry interval duration Between a kind of corresponding relationship, but the corresponding relationship is independent of business number of retries.It lower is retried every time for example, can recorde When currently retry interval duration, and retry interval duration in the current base for retrying interval duration for what business next time retried It is double on plinth.For example, the interval duration (i.e. apart from the time interval for executing failure for the first time) that retries when first time business retries is 1 It, can recorde down " 1 ", and determines and retry interval duration (i.e. distance when " 1*2=2 days " are retried as second of business The time interval that first time business retries).In this example, the determination for retrying the specific value of interval duration is based on one Secondary retries interval duration, without including business number of retries as " " current retries interval duration "+N days ".But, It business number of retries and retries interval duration and establishes corresponding relationship, e.g., " first time business retries --- 1 day ", " second of industry Business retries --- and 2 days ", " third time business retries --- and 4 days ".
Alternatively, for another example be also possible to next time retry interval duration will be than adjacent last time when retrying interval It is long 2 days more.Deng.--- 3 days ", " second of business retries --- 5 days for example, first time business retries ", " third time business weight Examination --- 7 days ".
Other examples are no longer lifted in detail, as long as it is bigger to meet the more multiple examination interval duration of business number of retries.
After determination retries interval duration, interval duration execution can be retried according to this, business of business is retried.For example, First time business retries and second of business retry between retry interval duration be 2 days, then just being retried in first time business Two days after execution, carries out secondary business and retry.
The business that one this specification one or more embodiment of Fig. 1 example provides retries the process of method, may include:
In step 100, when business executes failure, record traffic number of retries.
For example, the business number of retries of can recorde is 0 when business executes failure for the first time.When having carried out first time business It can new business number of retries be more 1 when retrying, similarly, and so on.
In a step 102, according to business number of retries and it is scheduled retry time set-up mode, determine business next time It retries and retries interval duration between the execution of this business.
This step can determine that business next time is retried and execute that (this business execution can be holds for the first time with this business Row, be also possible to execute the business executed after failure for the first time retry) between retry interval duration.
For example, carrying out first time business when business executes failure for the first time after described " retrying interval duration " and retrying. In another example carrying out second of business after execution first time business retries after described " retrying interval duration " and retrying.Than Such as, interval duration can be retried according to the determination of the mode of table 1.
Simple in order to implement, this number retried with business increases and retries the retry mechanism that interval duration increases, Can be applied to it is all retry business, i.e., whether differentiated service does not have the characteristics that this " when executing multiple business and retrying, is retried Number is more, and success rate is lower ".On the one hand, for not having the business of the feature, it will usually be retried just in preceding business several times It is able to carry out success, too much influence can't be caused to the execution efficiency of this partial service;On the other hand, for having the spy The business of point also can reduce the consumption to resource by this gradually sparse mechanism retried just.It is of course also possible to only It is also possible to retrying using this method for partial service, for example, the partial service can carry out specified selection.
What each secondary business retried retries interval duration timing machine really, can be when business executes failure for the first time, once The business that pre-determined number is calculated in property, which retries, corresponding retries interval duration.It " is held after 1 day for example, can be calculated Row first time business retries, and is then spaced second of the business of progress in 2 days again and retries, is then spaced 4 days progress third time business again Retry ", when waiting execution third time business to retry, retried followed by the business for calculating next group pre-determined number corresponding heavy Examination interval duration, for example, " carrying out the 4th business after being spaced 7 days to retry, being then spaced the 5th business weight of progress in 11 days again Examination ", etc..In another example the business next time that calculates, which is retried, executes it with this business when can also be that business of every execution retries Between retry interval duration.
At step 104, when retrying interval duration described in the arrival, carry out business is retried.
In this step, when judging whether to retry interval duration described in arrival, a kind of judgment mode of example: can be each When carry out business retries, record and retry the time, then calculate current time when judging and this retry between the time when Between it is poor, whether which, which reaches described, retries interval duration.When retrying interval duration described in the arrival, carry out business is retried.
In step 106, if retrying success, terminate this business.In this step, when business retries each time, if Success is retried, then does not continue to carry out business and retries, service ending.
In step 108, if retrying failure, the business number of retries is updated, and continues to determine that business retries next time It is corresponding to retry interval duration.
In this step, when business retries each time, if retrying failure, needs to continue business and retry.So root According to the method for this example, lower business number of retries can be updated, i.e. business number of retries adds 1, and according to the mode of step 102 after Business retries and corresponding retries interval duration next time for continuous determination.
The business retries method, by when business number of retries gradually increases, setting next time business retry and this Business execute between retrying interval duration be also gradually increased so that retrying of retrying of business is spaced in gradually rarefaction, then The consumption to resource can be reduced.Furthermore for the business that each executes failure, independent it can execute above-mentioned Business retries method, and the business that can disperse different business retries the time, avoids fishing for the business of magnanimity in the same time as far as possible It is retried, can also reduce the consumption to system resource.
The business that Fig. 2 example this specification one or more embodiment provides retries the process of method, and this method is to collect For real-time bill in charge system is checked and write off, the processing of this method is illustrated:
In step 200, operation system requests charge information, and obtains charging result, such as need to collect X to trade company A Expense, total Y member.
In this step, operation system can be gone to charge system request to some trade company carry out charging, from charge system to Operation system returns to charging result, collects Y member to trade company A.
In step 202, operation system sends Charge message to charging system.
For example, charging system is for charging to trade company, then operation system can send obtained charging result To charging system, indicate that charging system whereabouts trade company A collects Y member.
In step 204, charging system generates bill, key message is recorded, for example, collecting X expense, total Y to trade company A Member, concurrent message are handled to system of checking and writing off.In this step, charging system can indicate that checking and writing off management system carries out bill processing, It goes to execute checking and writing off for real-time bill.
In step 206, charge is caused to fail since billing and accounting system is busy or trade company's A account balance is insufficient at this time.
In this step, the account balance that management system removes Accounting system inquiry trade company A again is checked and write off, if account balance fills Foot, then can check and write off above-mentioned bill;Otherwise, if originals such as the account balance deficiency or billing and accounting system of trade company A are busy Cause can cause to check and write off unsuccessfully.
In a step 208, it checks and writes off management system and recognizes scene needs and retry, register a dynamic task, dynamic is appointed Business needs to retry according to specified time interval.
In this step, management system is checked and write off after checking and writing off unsuccessfully, so that it may control centre be gone to register a dynamic task.Institute The dynamic task stated refers to that the task can periodically carry out triggering operation.Task is checked and write off for any one real-time bill, when appoint When business executes failure, one dynamic task of the corresponding registration in control centre can be removed.The effect of the dynamic task is so that scheduling Center can periodically go triggering check and write off management system carry out business retry.
In addition, could be aware that this dynamic is appointed when control centre receives the dynamic task registration for checking and writing off management system Corresponding real-time bill of being engaged in checks and writes off task and executes failure for the first time, is not retried also, subsequent to need to trigger by control centre It checks and writes off management system execution business to retry, then it is 0 that control centre, which can recorde current business number of retries, and subsequent execution is primary After business retries, cumulative 1, and so on.
Furthermore checking and writing off management system side can have multiple real-time bills to check and write off task, it is also possible to will appear multiple tasks all Failure is executed, then checking and writing off the corresponding dynamic task of task, Ke Yifen to separate different bills in real time in control centre lateral areas Not Tian Jia Different Dynamic task mark.Illustratively, task, corresponding dynamic task are checked and write off for the real-time bill of trade company A It can recorde as the merchant identification of trade company A.Similarly, the real-time bill of trade company B is checked and write off the corresponding dynamic task of task and be can recorde For the merchant identification of trade company B.It can certainly be using other mark differentiation modes.
It is retried due to checking and writing off management system progress business by control centre, control centre can be known as appointing Be engaged in triggering side, will check and write off management system and is known as task execution side, what the task triggering side was used to be registered according to business execution side Dynamic task is sent to business execution side retries task triggering.
In step 210, control centre's determination retries interval duration as unit of day, for example, between n-th retries It is divided into that (N-1) is secondary to be retried interval+N days.
The interval duration that retries in this step is described in a mode as an example, not limited to this.
For example, being divided into 0+1=1 days between retrying for the 1st time.
It is divided into 1+2=3 days between retrying for 2nd time.
It is divided into 3+3=6 days between retrying for 3rd time.
The 4th is divided into 6+4=10 days between retrying.It is subsequent and so on, no longer it is described in detail.
In addition, control centre when determination retries interval duration, can go out corresponding subsequent multiple business with one-time calculation What is retried retries interval duration, for example, calculated that the 1st business retry retries interval duration, the weight that the 2nd business retries Examination interval duration, what the 3rd business retried retries interval duration etc.;It is also possible that only calculating the weight that business retries next time Examination interval duration, waits and performs after business retries next time, then calculate down that business next time retries retry interval duration.May be used also To use other modes.
It since the number that business retries is more, retries interval duration and is also gradually increased, in order to avoid influencing to retry when N is excessive Failure, can set a business number of retries maximum value, when business number of retries reaches scheduled number maximum value, this is most Big value time business retry it is corresponding retry to be spaced duration and will continue to use to business always retry success.For example, it is assumed that business retries time Number maximum value N are 15, then the 15th business, which retries the corresponding interval duration that retries, can continue to use to business always and retry success, For example, the 16th business retries the interval duration that retries that retries with the 17th business, also to use the 15th business to retry corresponding Retry interval duration.
In the step 212, interval duration is retried described in the arrival, control centre, which sends to retry to the business execution side, to appoint Business triggering, is retried with triggering the business execution side carry out business.
For example, the control centre as task triggering side can retry task to management system transmission is checked and write off after 1 day Triggering, triggering, which checks and writes off management system and executes the 1st business, to be retried, and is checked and write off management system whereabouts Accounting system and mend and checks and writes off.
In step 214, business executes root and retries according to triggering carry out business.
Management system is checked and write off after carry out business retries as business execution side, can feed back a weight to control centre Test result, this is retried the result is that retrying successfully or retrying failure.
In the step 216, business executes direction triggering side feeding back unsuccessful result.
For example, failure can be retried to control centre's feedback by checking and writing off management system after the 1st business retries.
In step 218, control centre updates the business number of retries, and continues to determine that business retries correspondence next time Retry interval duration.In this step, control centre receive check and write off management system feedback when retrying unsuccessfully, can update Business number of retries is 1, and continues to determine how long interval carries out the 2nd business and retry, and retrying interval duration is 1+2=3 days.
In a step 220, when control centre retries interval duration described in the arrival, to the business side of executioning transmission task Triggering, is retried with triggering the business execution side carry out business.
For example, after being spaced 3 days, control centre retries task triggering to checking and writing off management system transmission again, to trigger core Pin management system carries out the 2nd business and retries.
In step 222, management system progress business is checked and write off to retry.
Similarly, it checks and writes off management system and can also be fed back after retrying and retry result.
Assuming that have passed through after multiple business retries, success is retried, thens follow the steps 224.
In step 224, it checks and writes off management system and retries success to control centre's feedback.
In step 226, control centre terminates dynamic task.
In the example of above-mentioned Fig. 2, the update of business number of retries can be executed by control centre side and retries interval The calculating of duration, and management system progress business weight is checked and write off according to the interval duration triggering that retries being calculated by control centre Examination, until business retries success.
The business that Fig. 3 example this specification one or more embodiment provides retries the process of method, example shown in Fig. 3 In son, the update of business number of retries and the calculating for retrying interval duration can also be executed by checking and writing off management system, and be dispatched Center only needs clocked flip, i.e., control centre can timing to the triggering for checking and writing off management system and sending the task that retries, and Whether business is executed according to the triggering to retry, then can retry interval duration by check and write off that management system calculates according to oneself come true It is fixed.May include handling as follows:
Wherein, step 300 is identical to step 206 as the step 200 in Fig. 2 to step 306, is no longer described in detail, may refer to Correspondence process in Fig. 2.
In step 308, it checks and writes off management system and registers a dynamic task to control centre.The dynamic task can be by adjusting The timing of degree center retries triggering to management system transmission task is checked and write off, for example, sending primary triggering every 5 minutes.In addition, checking and writing off It is 0, after business of subsequent execution retries, cumulative 1 that management system, which can recorde current business number of retries, and so on.
In the step 310, it checks and writes off management system determination and retries interval duration as unit of day, for example, n-th weight It is divided into that (N-1) is secondary to be retried interval+N days between examination.
Such as, it is determined that it is divided into 1 day between retrying for the 1st time, is divided into 3 days between retrying for the 2nd time.
In step 312, control centre retries task triggering to management system transmission is checked and write off, which can be by dispatching Center is sent every the set time.
In a step 314, check and write off management system judge the current last business of triggered time distance execute the time when Between be spaced and whether reached corresponding and retry interval duration.
For example, being divided into 1 day i.e. 24 hour between retrying for the 1st time, it is assumed that the time gap that control centre sends triggering is last 16 hours of time interval that business executes, 16 less than 24, also not up to retry interval duration, then checking and writing off management system can be with That ignores control centre's transmission retries task triggering.
In another example the triggering that control centre is sent is had received again when checking and writing off management system, and by calculating, the triggering Current time and last business to execute the time interval of time be 24 hours, reached and retried interval duration, then checked and write off pipe Reason system can continue to execute step 316.
In order to carry out the calculating of above-mentioned time interval, check and write off management system can after performing business every time and retrying, The time retried is all recorded, retries interval duration so that whether subsequent calculating has reached.
In step 316, it checks and writes off management system and retries task triggering according to, execution business retries.
In step 318, management system is checked and write off when retrying unsuccessfully, more new business number of retries.
After retrying unsuccessfully, checks and writes off management system also and will continue subsequent business and retry, method and aforementioned step It is identical, it is periodically triggered by control centre, checks and writes off management system and judge whether to execute the triggering.
Assuming that checking and writing off management system retries success, then step 320 can be continued to execute.
In step 320, checking and writing off management system notice control centre terminates dynamic task, then subsequent control centre is just no longer Send the corresponding task retries triggering.
In addition, business execute the reason of failure can there are many, it is one of the reason is that account balance is insufficient, if that Trade company is sometime carrying out account charging, and according to the scheme of above-mentioned example, the business number of retries the more, retry interval Duration is bigger, it would be possible to influence the timeliness for the task of checking and writing off.Based on this, Fig. 4 illustrates this specification one or more embodiment The business of offer retries the process of method, which increases account balance and change joint-action mechanism on the basis of Fig. 2 example, It enables to after account charging success, carries out mending as soon as possible and check and write off, promote the timeliness for task of checking and writing off.
It is shown in Figure 4, between step 222 and step 224, three steps 2221 are increased to 2223.
Wherein, in step 2221, billing and accounting system can notify the success of control centre's account charging, for example, the account of trade company A Family is supplemented with money, and remaining sum is sufficient.
In step 2222, control centre finds the corresponding dynamic task of trade company A accordingly, and resets business next time and retry Retry interval duration.The interval duration that retries after resetting retries interval duration less than current.For example, original distance is next time It should be 3 days that business retried, which retries interval duration, can be after over-reset and execute at once, or be spaced 3 hours etc..Resetting Purpose be so that business retries executes as early as possible.
In step 2223, control centre retries triggering according to the interval duration transmission task that retries after resetting.
On triggering, it if checking and writing off management system retries success, can notify control centre, this is terminated by control centre Dynamic task.
In order to realize above-mentioned method, at least one embodiment of this specification additionally provides a kind of business and retries device.Such as Shown in Fig. 5, the apparatus may include: business execution module 51, interval determination module 52 and retry processing module 53.
Business execution module 51 executes failure for business when doing business, to occur;
Interval determination module 52 retries interval duration for determining, the interval duration that retries is to the target service Carry out business business adjacent twice when retrying retry between time interval;Also, when business number of retries gradually increases, The interval duration that retries also is gradually increased;
Processing module 53 is retried, for retrying interval duration according to determining, executes the business weight to target service Examination.
In one example, as shown in fig. 6, the device can also include: number logging modle 54.
Number logging modle 54 is used for when business executes failure, record traffic number of retries;
The interval determination module 52, for according to the business number of retries and scheduled retrying time setting side Formula determines that business is retried next time and retries interval duration between the execution of this business;
It is described to retry processing module 53, for when retrying successfully, end to retry target service;Otherwise, by described Number logging modle updates the business number of retries, and continues to be determined according to the business number of retries by interval determination module Business, which retries, next time corresponding retries interval duration.
In one example, interval determination module 52 are also used to: being account balance deficiency when the reason of business executes failure When, monitor the variation of account balance;If detect account charging success, interval duration, the weight after resetting are retried described in resetting Examination interval duration retries interval duration less than current.
The device or module that above-described embodiment illustrates can specifically realize by computer chip or entity, or by having The product of certain function is realized.A kind of typically to realize that equipment is computer, the concrete form of computer can be personal meter Calculation machine, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation are set It is any several in standby, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various modules when description apparatus above with function to describe respectively.Certainly, implementing this The function of each module can be realized in the same or multiple software and or hardware when specification one or more embodiment.
Each step in above-mentioned process as shown in the figure, execution sequence are not limited to the sequence in flow chart.In addition, each The description of a step can be implemented as software, hardware or its form combined, for example, those skilled in the art can be by it It is embodied as the form of software code, can is the computer executable instructions that can be realized the corresponding logic function of the step. When it is realized in the form of software, the executable instruction be can store in memory, and by the processor in equipment It executes.
For example, corresponding to the above method, this specification one or more embodiment provides a kind of business simultaneously and retries equipment. The equipment may include processor, memory and storage on a memory and the computer instruction that can run on a processor, The processor is by executing described instruction, for realizing following steps:
When doing business, business occurs and executes failure;
It determines and retries interval duration, the interval duration that retries is adjacent twice when retrying to business progress business Business retry between time interval;Also, when business number of retries gradually increases, the interval duration that retries also gradually increases Greatly;
Interval duration is retried according to determining, execution retries the business of the business.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that this specification one or more embodiment can provide as method, system or calculating Machine program product.Therefore, this specification one or more embodiment can be used complete hardware embodiment, complete software embodiment or The form of embodiment combining software and hardware aspects.Moreover, this specification one or more embodiment can be used at one or It is multiple wherein include computer usable program code computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) on the form of computer program product implemented.
This specification one or more embodiment can computer executable instructions it is general on It hereinafter describes, such as program module.Generally, program module includes executing particular task or realization particular abstract data type Routine, programs, objects, component, data structure etc..Can also practice in a distributed computing environment this specification one or Multiple embodiments, in these distributed computing environments, by being executed by the connected remote processing devices of communication network Task.In a distributed computing environment, the local and remote computer that program module can be located at including storage equipment is deposited In storage media.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.At data For managing apparatus embodiments, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to side The part of method embodiment illustrates.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can With or may be advantageous.
The foregoing is merely the preferred embodiments of this specification one or more embodiment, not to limit this theory Bright book one or more embodiment, all within the spirit and principle of this specification one or more embodiment, that is done is any Modification, equivalent replacement, improvement etc. should be included within the scope of the protection of this specification one or more embodiment.

Claims (11)

1. a kind of business retries method, which comprises
When doing business, business occurs and executes failure;
It determines and retries interval duration, the interval duration that retries is to carry out business adjacent twice when business retries to the business Time interval between retrying;Also, when business number of retries gradually increases, the interval duration that retries also is gradually increased;
Interval duration is retried according to determining, execution retries the business of the business.
2. according to the method described in claim 1,
The determination retries interval duration, comprising: when business execution failure occurs, record traffic number of retries;According to described Business number of retries and it is scheduled retry time set-up mode, determine that business is retried and executed this business next time between Retry interval duration;
After the execution retries the business of the business, the method also includes: if retrying success, terminate this industry Business;Otherwise, the business number of retries is updated, and continues to determine that business retries correspondence next time according to the business number of retries Retry interval duration.
3. according to the method described in claim 2, it is described according to business number of retries and it is scheduled retry time set-up mode, It determines that business is retried next time and retries interval duration between the execution of this business, comprising:
When the business number of retries reaches scheduled number maximum value, the number maximum value time business retries corresponding heavy Examination interval duration, which will be continued to use to business, retries success.
4. the business executes root according to task according to the method described in claim 1, the method is executed by business execution side The triggering of triggering side executes business and retries;
Described that interval duration is retried according to determining, execution retries the business of target service, comprising:
Task that reception task triggering side was sent retry triggering, described to retry task triggering be by task triggering root according to industry Business execution side's business executes the dynamic task registered when failure and sends;
Judge current time and last business retry between time interval, if arrival retries interval duration;
If judging result be it is no, ignore and described retry task triggering;
If the determination result is YES, then task triggering is retried according to, execution business retries.
5. the task triggering side is used for basis according to the method described in claim 1, the method is executed by task triggering side The dynamic task that business execution side registers is sent to business execution side retries task triggering, and the dynamic task is that the business is held It is registered when business executes failure for the first time row side;
Described when retrying interval duration described in the arrival, carry out business retries, comprising:
When retrying interval duration described in the arrival, task is retried to business executions side transmission and is triggered, to trigger the business Execution side's carry out business retries.
6. according to the method described in claim 1, the method also includes:
When it is account balance deficiency that business, which executes the reason of failing, the variation of account balance is monitored;
If detect account charging success, interval duration is retried described in resetting, the interval duration that retries after resetting is less than currently Retry interval duration.
7. a kind of business retries device, described device includes:
Business execution module executes failure for business when doing business, to occur;
Interval determination module retries interval duration for determining, the interval duration that retries is to carry out industry to the target service Business business adjacent twice when retrying retry between time interval;Also, it is described heavy when business number of retries gradually increases Examination interval duration is also gradually increased;
Processing module is retried, for retrying interval duration according to determining, execution retries the business of target service.
8. device according to claim 7, described device further include: number logging modle;
Number logging modle is used for when business executes failure, record traffic number of retries;
The interval determination module, for according to the business number of retries and it is scheduled retry time set-up mode, determine Business, which is retried, next time retries interval duration between the execution of this business.
9. device according to claim 7,
The interval determination module is also used to when the business number of retries reaches scheduled number maximum value, the number Maximum value time business retry it is corresponding retry interval duration and will continue to use to business retry success.
10. device according to claim 7,
The interval determination module, is also used to: when it is account balance deficiency that business, which executes the reason of failing, monitoring account balance Variation;If detect account charging success, interval duration is retried described in resetting, and the retrying interval duration after resetting is less than and works as Preceding retries interval duration.
11. a kind of business retries equipment, the equipment includes memory, processor, and stores on a memory and can locate The computer instruction run on reason device, the processor perform the steps of when executing instruction
When doing business, business occurs and executes failure;
It determines and retries interval duration, the interval duration that retries is to carry out business adjacent twice when business retries to the business Time interval between retrying;Also, when business number of retries gradually increases, the interval duration that retries also is gradually increased;
Interval duration is retried according to determining, execution retries the business of the business.
CN201810736350.2A 2018-07-06 2018-07-06 A kind of business retries method and apparatus Pending CN109118344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810736350.2A CN109118344A (en) 2018-07-06 2018-07-06 A kind of business retries method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810736350.2A CN109118344A (en) 2018-07-06 2018-07-06 A kind of business retries method and apparatus

Publications (1)

Publication Number Publication Date
CN109118344A true CN109118344A (en) 2019-01-01

Family

ID=64822908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810736350.2A Pending CN109118344A (en) 2018-07-06 2018-07-06 A kind of business retries method and apparatus

Country Status (1)

Country Link
CN (1) CN109118344A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321211A (en) * 2019-06-27 2019-10-11 上海数禾信息科技有限公司 Asynchronous schedule method and device for operation system
CN110716972A (en) * 2019-09-12 2020-01-21 上海易点时空网络有限公司 Method and device for processing error of high-frequency calling external interface
CN111259032A (en) * 2020-01-17 2020-06-09 中国建设银行股份有限公司 Service processing method and device
CN112350807A (en) * 2019-08-07 2021-02-09 德科仕通信(上海)有限公司 Fault-tolerant method for avoiding network storm for terminal big data acquisition system
CN112395134A (en) * 2020-11-18 2021-02-23 平安普惠企业管理有限公司 Retry method, device, equipment and medium for application execution exception
CN114710569A (en) * 2022-03-11 2022-07-05 珠海派诺科技股份有限公司 Self-scaling TCP link maintenance method, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829139A (en) * 2006-03-30 2006-09-06 阿里巴巴公司 Message repeating method and system
CN103019866A (en) * 2012-10-24 2013-04-03 北京京东世纪贸易有限公司 Distributed method and system based on message queue
CN106547635A (en) * 2015-09-18 2017-03-29 阿里巴巴集团控股有限公司 A kind of operation of operation retries method and apparatus
CN107506298A (en) * 2017-07-28 2017-12-22 杭州销冠网络科技有限公司 A kind of monitoring method and system for business on line

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829139A (en) * 2006-03-30 2006-09-06 阿里巴巴公司 Message repeating method and system
CN103019866A (en) * 2012-10-24 2013-04-03 北京京东世纪贸易有限公司 Distributed method and system based on message queue
CN106547635A (en) * 2015-09-18 2017-03-29 阿里巴巴集团控股有限公司 A kind of operation of operation retries method and apparatus
CN107506298A (en) * 2017-07-28 2017-12-22 杭州销冠网络科技有限公司 A kind of monitoring method and system for business on line

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321211A (en) * 2019-06-27 2019-10-11 上海数禾信息科技有限公司 Asynchronous schedule method and device for operation system
CN110321211B (en) * 2019-06-27 2020-05-12 上海数禾信息科技有限公司 Asynchronous scheduling method and device for service system
CN112350807A (en) * 2019-08-07 2021-02-09 德科仕通信(上海)有限公司 Fault-tolerant method for avoiding network storm for terminal big data acquisition system
CN110716972A (en) * 2019-09-12 2020-01-21 上海易点时空网络有限公司 Method and device for processing error of high-frequency calling external interface
CN111259032A (en) * 2020-01-17 2020-06-09 中国建设银行股份有限公司 Service processing method and device
CN112395134A (en) * 2020-11-18 2021-02-23 平安普惠企业管理有限公司 Retry method, device, equipment and medium for application execution exception
CN114710569A (en) * 2022-03-11 2022-07-05 珠海派诺科技股份有限公司 Self-scaling TCP link maintenance method, system and storage medium

Similar Documents

Publication Publication Date Title
CN109118344A (en) A kind of business retries method and apparatus
CN101266557B (en) The mine to target assignment of computational tasks in client-server or hosted environment
CN105719182B (en) Automatic account checking method and automatic account checking system
CN102144220B (en) Distributed data processing system
CN106911780A (en) Traffic ID generation method, apparatus and system
CN110308983A (en) Method for balancing resource load and system, service node and client
CN101963969B (en) Method and database server for realizing load balancing in Oracle RAC (Real Application Cluster) system
US9886337B2 (en) Quorum based distributed anomaly detection and repair using distributed computing by stateless processes
CN114581094B (en) Payment channel dynamic decision method, server and computer readable medium
CN110928655A (en) Task processing method and device
CN106097092A (en) Data processing method and device for reconciliation
CN106408271A (en) Method and device for monitoring project
CN113127171A (en) Techniques for behavioral pairing in a task distribution system
CN110196759A (en) Distributed transaction processing method and device, storage medium and electronic device
CN111125719B (en) Method, device, computer equipment and readable storage medium for improving code security detection efficiency
CN109117244A (en) A kind of implementation method of resources of virtual machine application queuing mechanism
CN115879706A (en) Metering asset checking method and device, electronic equipment and readable storage medium
CN106534303A (en) Load balance method and device applied to account checking system
CN110428240A (en) The suspicious transaction automatic identification of one kind and processing method, terminal and server
CN111984677B (en) Resource data checking method, device, computer equipment and storage medium
CN111680914B (en) Event distribution method, event distribution device, storage medium, and electronic device
CN101841800A (en) Prepayment service charging method and system
CN109933433A (en) A kind of GPU resource scheduling system and its dispatching method
US11496525B2 (en) ACR buffering in the cloud
CN114283007A (en) Method and device for solving payment hotspot account problem and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40002333

Country of ref document: HK

TA01 Transfer of patent application right

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20190101

RJ01 Rejection of invention patent application after publication