CN109191135A - Transaction based on block chain retries method, apparatus, equipment and readable storage medium storing program for executing - Google Patents

Transaction based on block chain retries method, apparatus, equipment and readable storage medium storing program for executing Download PDF

Info

Publication number
CN109191135A
CN109191135A CN201810979877.8A CN201810979877A CN109191135A CN 109191135 A CN109191135 A CN 109191135A CN 201810979877 A CN201810979877 A CN 201810979877A CN 109191135 A CN109191135 A CN 109191135A
Authority
CN
China
Prior art keywords
transaction
failed transactions
grade
block chain
retries
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
CN201810979877.8A
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.)
Beijing Jingdong Financial Technology Holding Co Ltd
Original Assignee
Beijing Jingdong Financial Technology Holding Co 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 Beijing Jingdong Financial Technology Holding Co Ltd filed Critical Beijing Jingdong Financial Technology Holding Co Ltd
Priority to CN201810979877.8A priority Critical patent/CN109191135A/en
Publication of CN109191135A publication Critical patent/CN109191135A/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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/405Establishing or using transaction specific rules

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a kind of transaction based on block chain and retries method, apparatus, equipment and readable storage medium storing program for executing, by the Transaction Information for obtaining failed transactions in block chain, then the transaction grade of failed transactions is obtained according to Transaction Information, failed transactions are added in message queue again, it is retried with carrying out transaction according to transaction grade, to keep the failed transactions in block chain processed in time, it is retried by transaction and guarantees that failed transactions can be successfully sent in block chain, it averts failure to trade and brings loss to user, improve the efficiency and user experience of whole system.

Description

Transaction based on block chain retries method, apparatus, equipment and readable storage medium storing program for executing
Technical field
The present invention relates to fields of communication technology more particularly to a kind of transaction based on block chain to retry method, apparatus, equipment And readable storage medium storing program for executing.
Background technique
With the continuous development of internet, block chain technology is come into being, it is a kind of internet database technology, is had Decentralization, open and clear feature.Specifically, the essence of block chain technology is decentralization and the number for residing in distributed frame According to the method for storage, transmission and proof, replace dependence of the current internet to central server with data block, so that all numbers According to change or trading item be all recorded on a cloud system.Due to the distributed peer-to-peer network of not no central control point Network, and use the method for distributed collective's running, it may be said that block chain is disclosed account book on network.There are many sections for it Point, each node can observe entire account book, and participate in maintenance jointly, and income is then the right of acquisition book keeping operation, and And a complete database can be replicated, individual node can not modify database, to ensure that the safety of account book data can It leans on.
In practical applications, block chain can have Fail Transaction in many cases, such as high concurrent causes Processing overlong time, part of nodes abends and leads to Fail Transaction when transaction endorsement, and network delay leads to Fail Transaction etc. Fail Transaction caused by many reasons.Such as TPS (the Transaction Per of the blocks chain such as alliance's chain or publicly-owned chain Second, issued transaction amount per second) it largely is insufficient for business demand, when concurrency of trading is beyond its processing capacity Time can generate a large amount of failed transactions, failed transactions be divided into effectively failure (being sent to the transaction of block chain network but authentication failed) and The case where invalid failure (not being sent to the transaction of block chain network), a large amount of failed transactions occur will affect user experience and The efficiency of whole system is to promote product operation cost.
Summary of the invention
The present invention provides a kind of transaction based on block chain and retries method, apparatus, equipment and readable storage medium storing program for executing, so that area Failed transactions in block chain can be processed in time, and the transaction that averts failure brings loss to user, improves the efficiency of whole system And user experience.
The first aspect of the present invention is to provide a kind of transaction based on block chain and retries method, which comprises
Obtain the Transaction Information of failed transactions in block chain;
The transaction grade of the failed transactions is determined according to the Transaction Information;
The failed transactions are added in message queue, unsuccessfully to be handed over according to the transaction grade of the failed transactions by described It is easily retransmitted to the block chain to carry out transaction and retry.
Further, the transaction grade that the failed transactions are determined according to the Transaction Information, comprising:
Transaction urgency level, aging and transaction number of retries are determined according to the Transaction Information;
Sliding-model control, acquisition pair are carried out to the transaction urgency level, the aging and the transaction number of retries The discretization numerical value answered;
The transaction grade of the failed transactions is obtained according to the discretization numerical value.
Further, described that the failed transactions are added in message queue, according to the transaction etc. of the failed transactions Grade retransmits the failed transactions to the block chain to carry out transaction and retry, comprising:
The failed transactions are added in message queue corresponding with the transaction grade according to the transaction grade;
The failed transactions of preset quantity are obtained from the corresponding message queue of each transaction grade according to preset ratio, and successively It is retransmitted to the block chain to carry out transaction and retry, wherein grade high ratio relatively transaction etc. of trading in the preset ratio The low ratio of grade is big.
Further, the mistake for obtaining preset quantity from the corresponding message queue of each transaction grade according to preset ratio Lose transaction, further includes:
If the failed transactions lazy weight in a certain corresponding message queue of grade of trading, corresponding from next transaction grade Message queue in obtain respective numbers failed transactions to supplement the deficiency quantity.
Further, the transaction grade according to the failed transactions by the failed transactions to the block chain again Send with carry out transaction retry after, further includes:
Judge to trade and whether succeed after transaction retries, transaction is re-started if unsuccessful and is retried.
The second aspect of the present invention is to provide a kind of transaction based on block chain and retries device, and described device includes:
Module is obtained, for obtaining the Transaction Information of failed transactions in block chain;
Rating module, for determining the transaction grade of the failed transactions according to the Transaction Information;
Transaction retries module, for the failed transactions to be added in message queue, according to the friendship of the failed transactions Easy grade retransmits the failed transactions to the block chain to carry out transaction and retry.
Further, the rating module is specifically used for:
Transaction urgency level, aging and transaction number of retries are determined according to the Transaction Information;
Sliding-model control, acquisition pair are carried out to the transaction urgency level, the aging and the transaction number of retries The discretization numerical value answered;
The transaction grade of the failed transactions is obtained according to the discretization numerical value.
Further, the transaction retries module and is specifically used for:
According to the transaction grade of the failed transactions, the transaction grade with the failed transactions is added in the failed transactions In corresponding message queue;
The failed transactions of preset quantity are obtained from the corresponding message queue of each transaction grade according to preset ratio, and successively It is retransmitted to the block chain to carry out transaction and retry, wherein grade high ratio relatively transaction etc. of trading in the preset ratio The low ratio of grade is big.
Further, the transaction retries module and is also used to:
If the failed transactions lazy weight in a certain corresponding message queue of grade of trading, corresponding from next transaction grade Message queue in obtain respective numbers failed transactions to supplement the deficiency quantity.
Further, the transaction retries module and is also used to:
Judge to trade and whether succeed after transaction retries, transaction is re-started if unsuccessful and is retried.
The third aspect of the present invention is to provide a kind of transaction based on block chain and retries equipment, and the equipment includes:
Memory;
Processor;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as being executed by the processor with reality Now method as described in relation to the first aspect.
The fourth aspect of the present invention is to provide a kind of computer readable storage medium, is stored thereon with computer program;
Method as described in relation to the first aspect is realized when the computer program is executed by processor.
Transaction provided by the invention based on block chain retries method, apparatus, equipment and readable storage medium storing program for executing, passes through acquisition The Transaction Information of failed transactions in block chain, then obtains the transaction grade of failed transactions according to Transaction Information, then will unsuccessfully hand over It is easily added in message queue, is retried with carrying out transaction according to transaction grade, to keep the failed transactions in block chain timely It is processed, it is retried by transaction and guarantees that failed transactions can be successfully sent in block chain, the transaction that averts failure is brought to user Loss, improves the efficiency and user experience of whole system.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art To obtain other drawings based on these drawings.
Fig. 1 is that the transaction provided in an embodiment of the present invention based on block chain retries method flow diagram;
Fig. 2 be another embodiment of the present invention provides the transaction based on block chain retry method flow diagram;
Fig. 3 be another embodiment of the present invention provides the transaction based on block chain retry method flow diagram;
Fig. 4 is the network architecture diagram that the transaction provided in an embodiment of the present invention based on block chain retries method;
Fig. 5 is the structure chart that the transaction provided in an embodiment of the present invention based on block chain retries device;
Fig. 6 is the structure chart that the transaction provided in an embodiment of the present invention based on block chain retries equipment.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Fig. 1 is that the transaction provided in an embodiment of the present invention based on block chain retries method flow diagram.As described in Figure 1, this reality It applies example and provides a kind of transaction based on block chain and retry method, executing subject is service system, and this method specific steps are such as Under:
S101, the Transaction Information for obtaining failed transactions in block chain.
In the present embodiment, block chain is sent for transaction by service system, when transaction concurrency handles energy beyond it It can there may be a large amount of failed transactions when power.Service system can obtain the transaction of failed transactions after judging Fail Transaction Information, specifically, may include transaction content, transaction amount, transaction urgency level, aging etc. in Transaction Information, in addition, if When the Fail Transaction is multiple, transaction number of retries can be got.Certain Transaction Information is not limited to above-mentioned cited information, Details are not described herein again for his information.
S102, the transaction grade that the failed transactions are determined according to the Transaction Information.
In the present embodiment, the transaction grade of failed transactions can characterize the significance level of the transaction, can be used as transaction The priority of repeating transmission, namely transaction higher grade, illustrates that the significance level of the transaction is higher, needs more when carrying out transaction and retrying Preferential processing.The transaction grade for obtaining failed transactions in the present embodiment according to Transaction Information can specifically pre-establish evaluation mark Standard, such as evaluated according to transaction urgency level, aging etc., furthermore also retried in combination with transaction number of retries, namely transaction Number is more, illustrates the failed transactions multiple Fail Transaction, does not avoid the body for extending period of reservation of number, influencing user It tests, the more failed transactions of transaction number of retries are also required to preferentially carry out trading to retry, namely need to improve transaction grade.
S103, the failed transactions are added in message queue, with will be described according to the transaction grade of the failed transactions Failed transactions are retransmitted to the block chain to carry out transaction and retry.
In the present embodiment, failed transactions are added in message queue, and according to transaction grade to disappearing in message queue Breath is consumed, namely the high failed transactions of transaction grade are preferentially obtained from message queue, sends block for failed transactions It is retried in chain with carrying out transaction.Certainly the failed transactions for not avoiding transaction grade low are constantly in wait state, can be with predetermined The failed transactions that ratio obtains different transaction grades from message queue carry out transaction and retry, to guarantee the low mistake of grade of trading It loses to trade also can timely carry out trading and retry.
Transaction provided in this embodiment based on block chain retries method, by the transaction for obtaining failed transactions in block chain Then information obtains the transaction grade of failed transactions according to Transaction Information, then failed transactions is added in message queue, with basis Transaction grade carries out transaction and retries, to keep the failed transactions in block chain processed in time, retries guarantee by transaction Failed transactions can be successfully sent in block chain, and the transaction that averts failure brings loss to user, improve the efficiency of whole system And user experience.
On the basis of the above embodiments, as shown in Fig. 2, determining the failure according to the Transaction Information described in S102 The transaction grade of transaction, it may include:
S1021, transaction urgency level, aging and transaction number of retries are determined according to the Transaction Information;
In the present embodiment, transaction urgency level, aging and transaction number of retries can be obtained according to Transaction Information, wherein Above-mentioned each information can carry in Transaction Information, can also be obtained according to Transaction Information from the storage unit for storing each information, or Person sends acquisition request to the user of the transaction, by each information of user feedback.
S1022, sliding-model control is carried out to the transaction urgency level, the aging and the transaction number of retries, Obtain corresponding discretization numerical value;
In the present embodiment, the evaluation to transaction grade for convenience retries transaction urgency level, aging and transaction Number carries out sliding-model control, specifically can carry out discretization by such as following table 1-3:
Table 1
Urgency level It is high In on In In under It is low
Coefficient a 10 8 6 2 1
Table 2
Table 3
As shown in table 1, urgency level can be divided into 5 grades by the present embodiment, and to different urgency level assignment, from And obtain discretization numerical value namely coefficient a;As shown in table 2, aging can be drawn and is temporally divided into 5 stages, and the stage is assigned Value, to obtain discretization numerical value namely coefficient b, wherein T1, T2, T3, T4, T5 are the empirical value that actual test is crossed, and T5 > T4 > T3 > T2 > T1 can be understood as being less than or equal to time T4 greater than time T5 greater than time T5 in the present embodiment, I.e. aging is between time T4 and T5, in addition, coefficient b is denoted as 0 when being less than or equal to T5;As shown in figure 3, transaction can be retried Number is divided into 5 grades, and to different transaction number of retries assignment, to obtain discretization numerical value namely coefficient c.When The example above is not limited to transaction urgency level, aging and transaction number of retries discretization in right the present embodiment.
S1023, the transaction grade that the failed transactions are obtained according to the discretization numerical value.
In the present embodiment, based on above-mentioned citing, transaction grading index can be calculated using following formula:
After calculating transaction grading index, is divided in transaction grade, such as the present embodiment and drawn according to transaction grading index It is divided into 5 transaction grades, regard 5 >=L > 4 as the 5th grade, 4 >=L > 3 is used as the 4th grade, and 3 >=L > 2 is used as 3rd level, 2 >=L > 1 As the 2nd grade, L≤1 is used as the 1st grade, for transaction urgency level be in upper, aging be greater than time T2 and transaction retries time Failed transactions of the number more than 5 times, it is 4.25 that transaction grading index L can be calculated according to above-mentioned formula, to judge it for the 5th Grade.Certainly it obtains transaction grade and is also not limited to the example above.
Further, as shown in figure 3, the failed transactions are added in message queue described in S103, according to The transaction grade of failed transactions retransmits the failed transactions to the block chain to carry out transaction and retry, and can specifically wrap It includes:
The friendship with the failed transactions is added in the failed transactions by S1031, the transaction grade according to the failed transactions In the corresponding message queue of easy grade;
S1032, the failed transactions for obtaining preset quantity from the corresponding message queue of each transaction grade according to preset ratio, And successively retransmit to the block chain to carry out transaction and retry, wherein trade in the preset ratio the high ratio of grade compared with The low ratio of grade of trading is big.
In the present embodiment, settable multiple message queues, it is corresponding with transaction grade, it can will fail according to transaction grade Transaction be added in the corresponding message queue of transaction grade, specifically, as shown in figure 4, grade of trading has 5 grades, then settable 5 The failed transactions that grade of trading is 5 grades are added in 5 grades of message queues by message queue, the failure friendship for being 4 grades by grade of trading Easily be added in 4 grades of message queues, and so on, wherein in Fig. 4 transaction initiator namely the present embodiment in service system, For sending transaction into block chain.When carry out transaction retry when, failure can be obtained from each message queue according to predetermined ratio Transaction, such as predetermined ratio are 5:4:3:2:1, and preset quantity is 15, namely obtains 5 from 5 grades of message queues and unsuccessfully hand over Easily, 4 failed transactions are obtained from 4 grades of message queues, and so on, the failure preferentially high to transaction grade after the completion of acquisition Transaction is retried, so that the high failed transactions of grade of trading obtain priority processing, while it is low also to take into account transaction grade Failed transactions, avoid transaction grade it is low the failed transactions waiting time it is too long.
Further, if failed transactions lazy weight in the corresponding message queue of a certain transaction grade, from next friendship The failed transactions of respective numbers are obtained in the corresponding message queue of easy grade to supplement the deficiency quantity.
For example, according to the predetermined ratio and preset quantity of above-mentioned setting, if the failed transactions in certain level-one message queue Lazy weight is then supplemented from next stage message queue, such as needs to obtain 5 failed transactions from 5 grades of message queues, but 5 Currently there was only 3 failed transactions in grade message queue, then obtains 2 failed transactions from 4 grades of message queues as supplement;Certainly The message queue of intermediate level, such as 4 grades of message queues can also be supplemented from the corresponding message queue of upper transaction grade, Namely it is supplemented from 5 grades of message queues;For 1 grade of message queue, can be supplemented from 2 grades of consumption queues, naturally it is also possible to wait.
On the basis of the above embodiments, after failed transactions are carried out with transaction and is retried, may also include that
Judge to trade and whether succeed after transaction retries, transaction is re-started if unsuccessful and is retried.
In the present embodiment, after failed transactions, which carry out transaction, to be retried, it is possible to occur the case where Fail Transaction again, Therefore it needs to judge whether transaction succeeds after transaction retries, transaction is re-started if unsuccessful and is retried.It should be noted that If grade of trading and transaction number of retries are related, transaction grade needs to change when failed transactions fail again, then needs The transaction grade of the failed transactions is reacquired, then failed transactions are added in message queue again, according to failed transactions Transaction grade by failed transactions to block chain retransmit with carry out transaction retry;If trade grade and transaction number of retries without If pass, then directly failed transactions can be added in message queue, be retried with carrying out transaction according to the transaction grade previously obtained; Certainly it also can determine whether transaction grade changes, then reacquire transaction grade if there is a change, add message team In column, it is directly added into message queue if not changing.
Transaction provided in this embodiment based on block chain retries method, by the transaction for obtaining failed transactions in block chain Then information obtains the transaction grade of failed transactions according to Transaction Information, then failed transactions is added in message queue, with basis Transaction grade carries out transaction and retries, to keep the failed transactions in block chain processed in time, retries guarantee by transaction Failed transactions can be successfully sent in block chain, and the transaction that averts failure brings loss to user, improve the efficiency of whole system And user experience.
Fig. 5 is the structure chart that the transaction provided in an embodiment of the present invention based on block chain retries device.The present embodiment provides The transaction based on block chain retry device can execute the transaction based on block chain retry embodiment of the method offer processing stream Journey, as shown in figure 5, it includes obtaining module 31, rating module 32 and handing over that the transaction based on block chain, which retries device, Easily retry module 33.
Wherein, module 31 is obtained, for obtaining the Transaction Information of failed transactions in block chain;
Rating module 32, for determining the transaction grade of the failed transactions according to the Transaction Information;
Transaction retries module 33, for the failed transactions to be added in message queue, according to the failed transactions Transaction grade retransmits the failed transactions to the block chain to carry out transaction and retry.
Further, the rating module 32 is specifically used for:
Transaction urgency level, aging and transaction number of retries are determined according to the Transaction Information;
Sliding-model control, acquisition pair are carried out to the transaction urgency level, the aging and the transaction number of retries The discretization numerical value answered;
The transaction grade of the failed transactions is obtained according to the discretization numerical value.
Further, the transaction retries module 33 and is specifically used for:
According to the transaction grade of the failed transactions, the transaction grade with the failed transactions is added in the failed transactions In corresponding message queue;
The failed transactions of preset quantity are obtained from the corresponding message queue of each transaction grade according to preset ratio, and successively It is retransmitted to the block chain to carry out transaction and retry, wherein grade high ratio relatively transaction etc. of trading in the preset ratio The low ratio of grade is big.
Further, the transaction retries module 33 and is also used to:
If the failed transactions lazy weight in a certain corresponding message queue of grade of trading, corresponding from next transaction grade Message queue in obtain respective numbers failed transactions to supplement the deficiency quantity.
Further, the transaction retries module 33 and is also used to:
Judge to trade and whether succeed after transaction retries, transaction is re-started if unsuccessful and is retried.
Transaction provided in an embodiment of the present invention based on block chain, which retries device, can be specifically used for executing above-mentioned Fig. 1-3 institute The embodiment of the method for offer, details are not described herein again for concrete function.
Transaction provided in this embodiment based on block chain retries device, by the transaction for obtaining failed transactions in block chain Then information obtains the transaction grade of failed transactions according to Transaction Information, then failed transactions is added in message queue, with basis Transaction grade carries out transaction and retries, to keep the failed transactions in block chain processed in time, retries guarantee by transaction Failed transactions can be successfully sent in block chain, and the transaction that averts failure brings loss to user, improve the efficiency of whole system And user experience.
Fig. 6 be another embodiment of the present invention provides the transaction based on block chain retry the structure chart of equipment.Such as Fig. 6 institute Show, the present embodiment provides a kind of transaction based on block chain to retry equipment, and the equipment includes: processor 42;Memory 43;With And computer program.
Wherein, the computer program is stored in the memory 43, and is configured as being executed by the processor 42 To realize that the transaction as provided by Fig. 1-3 based on block chain retries the process flow of embodiment of the method offer, realization principle Similar with technical effect, details are not described herein again.
More specifically, the equipment further includes receiver 40 and transmitter 41, receiver 40 and transmitter 41, processor 42 It is connected with memory 43 by bus.
In addition, the present embodiment also provides a kind of computer readable storage medium, it is stored thereon with computer program, the meter Calculation machine program is executed by processor to realize that the transaction based on block chain described in above-described embodiment retries method.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or unit Letter connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various It can store the medium of program code.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each functional module Division progress for example, in practical application, can according to need and above-mentioned function distribution is complete by different functional modules At the internal structure of device being divided into different functional modules, to complete all or part of the functions described above.On The specific work process for stating the device of description, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (12)

1. a kind of transaction based on block chain retries method characterized by comprising
Obtain the Transaction Information of failed transactions in block chain;
The transaction grade of the failed transactions is determined according to the Transaction Information;
By the failed transactions be added message queue in, with according to the transaction grade of the failed transactions by the failed transactions to The block chain is retransmitted to carry out transaction and retry.
2. the method according to claim 1, wherein described determine the failed transactions according to the Transaction Information Transaction grade, comprising:
Transaction urgency level, aging and transaction number of retries are determined according to the Transaction Information;
Sliding-model control is carried out to the transaction urgency level, the aging and the transaction number of retries, is obtained corresponding Discretization numerical value;
The transaction grade of the failed transactions is obtained according to the discretization numerical value.
3. the method according to claim 1, wherein it is described by the failed transactions be added message queue in, with The failed transactions are retransmitted to the block chain to carry out transaction and retry according to the transaction grade of the failed transactions, are wrapped It includes:
According to the transaction grade of the failed transactions, the failed transactions are added corresponding with the transaction grade of the failed transactions Message queue in;
The failed transactions of preset quantity are obtained from the corresponding message queue of each transaction grade according to preset ratio, and successively to institute It states block chain to retransmit to carry out transaction and retry, wherein the high ratio of grade of trading in the preset ratio is low compared with transaction grade Ratio it is big.
4. according to the method described in claim 3, it is characterized in that, described disappear according to preset ratio from each transaction grade is corresponding Cease the failed transactions that preset quantity is obtained in queue, further includes:
If the failed transactions lazy weight in a certain corresponding message queue of grade of trading, disappears from next transaction grade is corresponding It ceases and obtains the failed transactions of respective numbers in queue to supplement the deficiency quantity.
5. method according to claim 1-4, which is characterized in that the transaction etc. according to the failed transactions Grade by the failed transactions to the block chain retransmit with carry out transaction retry after, further includes:
Judge to trade and whether succeed after transaction retries, transaction is re-started if unsuccessful and is retried.
6. a kind of transaction based on block chain retries device characterized by comprising
Module is obtained, for obtaining the Transaction Information of failed transactions in block chain;
Rating module, for determining the transaction grade of the failed transactions according to the Transaction Information;
Transaction retries module, for the failed transactions to be added in message queue, according to the transaction etc. of the failed transactions Grade retransmits the failed transactions to the block chain to carry out transaction and retry.
7. device according to claim 6, which is characterized in that the rating module is specifically used for:
Transaction urgency level, aging and transaction number of retries are determined according to the Transaction Information;
Sliding-model control is carried out to the transaction urgency level, the aging and the transaction number of retries, is obtained corresponding Discretization numerical value;
The transaction grade of the failed transactions is obtained according to the discretization numerical value.
8. device according to claim 6, which is characterized in that the transaction retries module and is specifically used for:
According to the transaction grade of the failed transactions, the failed transactions are added corresponding with the transaction grade of the failed transactions Message queue in;
The failed transactions of preset quantity are obtained from the corresponding message queue of each transaction grade according to preset ratio, and successively to institute It states block chain to retransmit to carry out transaction and retry, wherein the high ratio of grade of trading in the preset ratio is low compared with transaction grade Ratio it is big.
9. device according to claim 8, which is characterized in that the transaction retries module and is also used to:
If the failed transactions lazy weight in a certain corresponding message queue of grade of trading, disappears from next transaction grade is corresponding It ceases and obtains the failed transactions of respective numbers in queue to supplement the deficiency quantity.
10. according to the described in any item devices of claim 6-9, which is characterized in that the transaction retries module and is also used to:
Judge to trade and whether succeed after transaction retries, transaction is re-started if unsuccessful and is retried.
11. a kind of transaction based on block chain retries equipment characterized by comprising
Memory;
Processor;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as being executed by the processor to realize such as Method of any of claims 1-5.
12. a kind of computer readable storage medium, which is characterized in that be stored thereon with computer program;
The computer program realizes method according to any one of claims 1 to 5 when being executed by processor.
CN201810979877.8A 2018-08-27 2018-08-27 Transaction based on block chain retries method, apparatus, equipment and readable storage medium storing program for executing Pending CN109191135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810979877.8A CN109191135A (en) 2018-08-27 2018-08-27 Transaction based on block chain retries method, apparatus, equipment and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810979877.8A CN109191135A (en) 2018-08-27 2018-08-27 Transaction based on block chain retries method, apparatus, equipment and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN109191135A true CN109191135A (en) 2019-01-11

Family

ID=64916220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810979877.8A Pending CN109191135A (en) 2018-08-27 2018-08-27 Transaction based on block chain retries method, apparatus, equipment and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN109191135A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995585A (en) * 2019-03-22 2019-07-09 杭州复杂美科技有限公司 A kind of abnormality eliminating method, equipment and storage medium
CN110458582A (en) * 2019-01-29 2019-11-15 深圳市智税链科技有限公司 Method for processing business, device, medium and electronic equipment based on block catenary system
CN113722330A (en) * 2021-09-07 2021-11-30 辽宁振兴银行股份有限公司 Method and device for retrying online transaction failure
CN113822762A (en) * 2021-09-29 2021-12-21 上海通联金融服务有限公司 Method for triggering failure transaction short message in financial transaction authorization process
CN113722330B (en) * 2021-09-07 2024-06-07 辽宁振兴银行股份有限公司 Method and device for retrying online transaction failure

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160077908A1 (en) * 2013-07-01 2016-03-17 International Business Machines Corporation Failure interval determination
CN107016611A (en) * 2017-03-29 2017-08-04 杭州秘猿科技有限公司 A kind of transaction manufacture timeout control method based on block chain
CN107392611A (en) * 2017-03-24 2017-11-24 阿里巴巴集团控股有限公司 A kind of method and device for sending Transaction Information and common recognition checking
CN107391526A (en) * 2017-03-28 2017-11-24 阿里巴巴集团控股有限公司 A kind of data processing method and equipment based on block chain
CN107819696A (en) * 2017-11-22 2018-03-20 中国银行股份有限公司 A kind of transaction flow control method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160077908A1 (en) * 2013-07-01 2016-03-17 International Business Machines Corporation Failure interval determination
CN107392611A (en) * 2017-03-24 2017-11-24 阿里巴巴集团控股有限公司 A kind of method and device for sending Transaction Information and common recognition checking
CN107391526A (en) * 2017-03-28 2017-11-24 阿里巴巴集团控股有限公司 A kind of data processing method and equipment based on block chain
CN107016611A (en) * 2017-03-29 2017-08-04 杭州秘猿科技有限公司 A kind of transaction manufacture timeout control method based on block chain
CN107819696A (en) * 2017-11-22 2018-03-20 中国银行股份有限公司 A kind of transaction flow control method and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458582A (en) * 2019-01-29 2019-11-15 深圳市智税链科技有限公司 Method for processing business, device, medium and electronic equipment based on block catenary system
JP2022511616A (en) * 2019-01-29 2022-02-01 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Business processing methods, equipment, electronic devices and computer programs based on blockchain systems
JP7325506B2 (en) 2019-01-29 2023-08-14 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Business processing method, device, electronic device and computer program based on blockchain system
CN110458582B (en) * 2019-01-29 2023-12-12 深圳市智税链科技有限公司 Business processing method, device, medium and electronic equipment based on block chain system
CN109995585A (en) * 2019-03-22 2019-07-09 杭州复杂美科技有限公司 A kind of abnormality eliminating method, equipment and storage medium
CN113722330A (en) * 2021-09-07 2021-11-30 辽宁振兴银行股份有限公司 Method and device for retrying online transaction failure
CN113722330B (en) * 2021-09-07 2024-06-07 辽宁振兴银行股份有限公司 Method and device for retrying online transaction failure
CN113822762A (en) * 2021-09-29 2021-12-21 上海通联金融服务有限公司 Method for triggering failure transaction short message in financial transaction authorization process

Similar Documents

Publication Publication Date Title
CN110618870B (en) Working method and device for deep learning training task
CN106445629B (en) A kind of method and device thereof of load balancing
CN109191135A (en) Transaction based on block chain retries method, apparatus, equipment and readable storage medium storing program for executing
CN103338252B (en) Realizing method of distributed database concurrence storage virtual request mechanism
CN104486407B (en) The generation method and device of numbering
CN103369041B (en) Resource allocation methods and device based on cloud computing
CN107819867A (en) The load-balancing method and device of a kind of cluster network
CN108241968A (en) The method that front end processor participates in block chain common recognition
CN105959235B (en) Distributed data processing system and method
CN108228363A (en) A kind of message method and device
CN104901898A (en) Load balancing method and device
CN109600798A (en) Multi-domain resource allocation method and device in a kind of network slice
CN110365748A (en) Treating method and apparatus, storage medium and the electronic device of business datum
CN110795120B (en) Software upgrading method and related device
CN104424240B (en) Multilist correlating method, main service node, calculate node and system
CN107426003A (en) A kind of fault detection method and device
CN106097092A (en) Data processing method and device for reconciliation
CN110266514A (en) Journal obtaining method, device, terminal and storage medium
CN109558446A (en) Job request method, apparatus, electronic equipment and storage medium
CN110414778A (en) Case work dispatching method and device
CN104506337B (en) Mapping method of virtual network and device based on regional faults prediction
CN107871262A (en) A kind of Order splitting processing method and server
CN110322161A (en) Flight comes into force come into force method of adjustment and the device of batch
CN108111628A (en) A kind of dynamic capacity-expanding storage method and system
CN109634747A (en) Resource capacity expansion method, apparatus, computer equipment and storage medium based on Saltstack

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176

Applicant after: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

Address before: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176

Applicant before: BEIJING JINGDONG FINANCIAL TECHNOLOGY HOLDING Co.,Ltd.

CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190111