Specific embodiment
Many details are explained in the following description in order to fully understand that this specification one or more is implemented
Example.But this specification one or more embodiment can be implemented with being much different from other way described herein, ability
Field technique personnel can do similar popularization, therefore this theory without prejudice to this specification one or more embodiment intension
Bright book one or more embodiment is not limited by following public specific implementation.
The term used in this specification one or more embodiment be only merely for for the purpose of describing particular embodiments,
It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and appended claims
The "an" of singular used in book, " described " and "the" are also intended to including most forms, unless context is clearly
Indicate other meanings.It is also understood that term "and/or" used in this specification one or more embodiment refers to and includes
One or more associated any or all of project listed may combine.
It will be appreciated that though term first, second, third, etc. may be used in this specification one or more embodiment
Various information are described, but these information should not necessarily be limited by these terms.These terms are only used to same type of information each other
It distinguishes.For example, first can also be referred to as in the case where not departing from this specification one or more scope of embodiments
Two, similarly, second can also be referred to as first.Depending on context, word as used in this " if " can be explained
As " ... when " or " when ... " or " in response to determination ".
In this specification one or more embodiment, provides a kind of processing method and processing device of payment flow, calculates
Equipment and computer storage medium, are described in detail one by one in the following embodiments.
It is illustrated firstly, for term involved in this specification one or more embodiment.
Channel of disbursement: a kind of carrier of Capital Flow, such as industrial and commercial bank's debit card channel, agricultural bank's credit card channel etc..
Flow engine: a kind of software systems component can load Service Component, successively execute business according to the sequence of layout
Component.
Wild card: the general credit card in the world such as Visa, MasterCard and JCB.
Asynchronous process: opposed with synchronization process, traditional synchronization process is successively to execute instruction in sequence, and asynchronous
Processing is multiple threads.In asynchronous process, payment flow engine can provide one after user submits payment application at once
It is a as a result, still final result needs payment flow engine that asynchronous process is waited to be finished just to provide.In this waiting
During, progress that user can be handled in real time.
Fig. 1 is system architecture applied by the processing method for the payment flow that this specification one or more embodiment provides
Schematic diagram.
Client 10 refers to user terminal, for example including mobile devices such as mobile phone, notebook, smartwatch, desk-top meter
The bench devices such as calculation machine or computer.Server end 20 refers to the network side server of website or application program, can be movement
The server of formula or state type.Server end 20 is connect with client 10 by network 30.First is provided in server end 20
Flow engine 21 and second procedure engine 22.
Client 10 generates payment events, and sends payment request to server end 20.Server end 20 receives client
After 10 payment request, starting first pass engine 21 loads the payment flow needed to be implemented, and sequence executes multiple process sections
Point.It is first-class in the case where first pass engine 21 determines that current pending flow nodes are asynchronous process flow nodes
Journey engine 21, which interrupts, executes asynchronous process flow nodes, and starts second procedure engine 22 and execute asynchronous process flow nodes.And
And during the available second procedure engine 22 of first pass engine 21 generates during executing asynchronous process flow nodes
Between as a result, and knowing the implementation progresses of asynchronous process flow nodes according to intermediate result.In addition, first pass engine 21 is according to different
The implementation progress for walking process flow node returns to implementation progress prompt information to client 10, and user is made to know current payment in real time
The processing progress of process.
The final result of the execution asynchronous process flow nodes of second procedure engine 22 is got in first pass engine 21
In the case of, first pass engine 21 continues to execute the flow nodes after asynchronous process flow nodes according to final result, until
Complete payment flow.
In one embodiment of this specification, a kind of processing method of payment flow is disclosed, referring to fig. 2, including step
202~210:
202, start first pass engine, load the payment flow needed to be implemented.
Wherein, the payment flow includes multiple flow nodes, and the multiple flow nodes include that at least one is asynchronous
Process flow node.
In step 202, starting first pass engine needs received server-side to execute to the payment request of client.Example
Such as in a specific usage scenario, user selects to pay using wild card channel in client, after submitting payment, client
End just sends payment request to server end, to trigger starting first pass engine.
Optionally, before the payment flow that load needs to be implemented, further includes:
Increase configuration information for each flow nodes, the configuration information includes: whether can asynchronous process, poll time
Interval, asynchronous waiting time-out time, polling result obtain address.
204, the first pass engine sequence executes the flow nodes.
Specifically, for first pass engine before executing current flow nodes, the first pass engine parsing is current
The configuration information of pending flow nodes judges current pending flow nodes as asynchronous process according to the configuration information
Flow nodes or non-asynchronous process flow nodes.
When " whether can asynchronous process " information in configuration information is "Yes", then current pending flow nodes are asynchronous
Process flow node;
When " whether can asynchronous process " information in configuration information is "No", then current pending flow nodes are non-different
Walk process flow node.
206, determine that current pending flow nodes are the feelings of asynchronous process flow nodes in the first pass engine
Under condition, the first pass engine, which interrupts, executes asynchronous process flow nodes, and starts second procedure engine and execute asynchronous process
Flow nodes.
Wherein, first pass engine includes: the asynchronization thread pool component for supporting configuration multiple threads rule, with
Realize that the first pass engine start second procedure engine executes the asynchronous process flow nodes.
In a specific example, by taking wild card channel payment flow as an example, asynchronous process flow nodes include: international business
Detection risk.In the case where current pending flow nodes are international business detection risk, first pass engine is first parsed
The configuration information of current pending flow nodes determines that international business detection risk is asynchronous process flow nodes, then the
One flow engine, which interrupts, executes international business risk inspection, and first pass engine starts second by asynchronization thread pool component
Journey engine executes international business risk inspection.Second procedure engine is during executing international business risk inspection, second
Strange land server outside journey engine meeting access domain, to call international business risk system to execute international business risk inspection.
It should be noted that second procedure engine is after actuation, the stream before asynchronous process flow nodes will not be traversed again
Cheng Jiedian, but directly execute current asynchronous process flow nodes.In addition, during second procedure engine executes, the
One flow engine only interrupts and executes flow nodes, not terminates implementation procedure.
208, the first pass engine obtains the second procedure engine in the process for executing asynchronous process flow nodes
The intermediate result of middle generation, and know according to the intermediate result implementation progress of the asynchronous process flow nodes.
Specifically, the first pass engine in step 208 obtains the second procedure engine and is executing asynchronous process process
The intermediate result generated during node, comprising:
2082, the second procedure engine deposits the intermediate result generated during executing asynchronous process flow nodes
It stores up to local cache.
In this specification, local cache can be the caching of server end.
In step 2082, second procedure engine can be to reach first time interval threshold value to store intermediate result to local
Caching.First time interval threshold value can be set, such as 1 second.
2084, the first pass engine queries local cache, obtains the intermediate result.
In step 2082, first pass engine be can be set at interval of the second time interval threshold query local cache.
Second time interval threshold value can be set, such as 2 seconds.
210, the first pass engine obtains the most termination that the second procedure engine executes asynchronous process flow nodes
Fruit, and continue to execute according to the final result flow nodes after asynchronous process flow nodes.
Specifically, first pass engine obtains the second procedure engine and executes asynchronous process flow nodes in step 210
Final result, comprising:
2102, the second procedure engine stores the final result for executing asynchronous process flow nodes to local cache.
2104, the first pass engine queries local cache, obtains the final result.
Specifically, asynchronous process flow nodes include: international business detection risk, and the first pass engine judges second
The final result that flow engine executes asynchronous process flow nodes is to check by or check not pass through, and is passed through if inspection,
Continue to execute the flow nodes after the asynchronous process flow nodes, comprising:
It generates interaction data and is sent to bank backstage, to complete to pay;
The payment data of user is saved to local;And
Terminate payment flow.
Do not pass through if checking, continuing to execute the flow nodes after the asynchronous process flow nodes includes: knot
Beam payment flow.
Wherein, interaction data is used for and bank backstage interacts, comprising: payment accounts, payment amount, payment channel etc.
Information;Payment data includes the information such as the account of user, bank card data.
Payment data and interaction data be not identical, and payment data is generated based on the payment platform with client,
Interaction data is generated based on bank backstage.
There are many payment platforms of client, such as the payment platform of Alipay.If user is in the payment platform of Alipay
Selection wild card channel of disbursement is paid, then, user generates payment data in selection wild card channel of disbursement and after submitting payment,
Interaction data is assembled by server and is generated after international business detection risk passes through.
The processing method of the payment flow of this specification determines that current pending flow nodes are in first pass engine
In the case where asynchronous process flow nodes, the first pass engine, which interrupts, executes asynchronous process flow nodes, and starts second
Flow engine executes asynchronous process flow nodes, and the available second procedure engine of first pass engine executes asynchronous process stream
The intermediate result and final result generated during Cheng Jiedian, and holding for asynchronous process flow nodes is known according to intermediate result
Traveling degree continues to execute the flow nodes after asynchronous process flow nodes according to final result, so as to improve international wind
The efficiency for controlling system service inspection card risk, improves the usage experience of user.
One embodiment of this specification discloses a kind of processing method of payment flow, referring to Fig. 3, includes the following steps 302
~314:
302, start first pass engine, load the payment flow needed to be implemented.
About the specific explanations of step 302, the related content of the step 202 of above-described embodiment may refer to.
304, the configuration information of the current pending flow nodes of first pass engine parsing, sentences according to the configuration information
Disconnected current pending flow nodes are asynchronous process flow nodes or non-asynchronous process flow nodes, if asynchronous process process
Node executes step 306;If non-asynchronous process flow nodes, step 314 is executed.
306, the first pass engine, which interrupts, executes asynchronous process flow nodes, and it is different to start the execution of second procedure engine
Walk process flow node.
About the specific explanations of step 306, the related content of the step 206 of above-described embodiment may refer to.
308, the first pass engine obtains the second procedure engine in the process for executing asynchronous process flow nodes
The intermediate result of middle generation, and know according to the intermediate result implementation progress of the asynchronous process flow nodes.
About the specific explanations of step 308, the related content of the step 208 of above-described embodiment may refer to.
310, the first pass engine obtains the most termination that the second procedure engine executes asynchronous process flow nodes
Fruit, and the flow nodes after asynchronous process flow nodes are continued to execute according to the final result, return to step 304.
About the specific explanations of step 310, the related content of the step 210 of above-described embodiment may refer to.
312, first pass engine executes the non-asynchronous process flow nodes, then returns to step 304.
Optionally, the processing method of the payment flow of the present embodiment further include:
314, the first pass engine returns to implementation progress prompt information to user interface.
Wherein, the implementation progress prompt information is generated according to the implementation progress of the asynchronous process flow nodes.
In addition, user interface is the display interface of client, such as the display interface of mobile phone.Client can be according to execution
Progress prompt information shows progress prompt in user interface.
Progress prompt can for example, show the progress bar of progress, number of show percent etc. to be a variety of.
This step 314 can return to implementation progress prompt letter reaching third time interval threshold value for first pass engine
Breath is to client, or client actively inquires server end reaching third time interval threshold value, first-class to obtain
The implementation progress prompt information that journey engine returns.Third time interval threshold value can be set, such as be set as 3 seconds.
The processing method of payment flow disclosed in this specification embodiment can be improved international air control system service inspection and use
The efficiency of card risk improves the usage experience of user.
Also, in method disclosed in this specification embodiment, first pass engine can be according to asynchronous process flow nodes
Implementation progress return to implementation progress prompt information to user interface, so that user be made to know the processing of current payment flow in real time
Progress alleviates the anxiety of user.
In order to more fully be illustrated to the present processes, Fig. 4 is shown in this specification one embodiment
In the payment flow schematic diagram of client.
Referring to fig. 4, it is used as example using wild card channel with user's selection to be illustrated, in the payment flow of client
Include:
402, selection is paid using wild card channel.
User can input the selection instruction of wild card channel by triggering command, phonetic order, key selection instruction etc.
Instruction is to realize.
In addition, this step 402 can be realized in the payment platform of client, such as Alipay platform.
404, submit payment request to server end.
406, whether success is submitted, if so, step 410 is executed, if it is not, executing step 408.
408, failure cause is prompted.
In the present embodiment, there are many failure causes of submitting payment request, such as network interruption, payment platform program are stuck
Deng.
410, the waiting page is jumped to, and obtains the implementation progress of server end.
Server executes the processing method of the payment flow in above-described embodiment after receiving payment request.Meanwhile visitor
Family end jumps to the waiting page, the payment result returned with waiting for server.
Also, during client jumps to and waits the page, the background program of client can inquire server end
Implementation progress.
In the process, the first pass engine of server end returns to implementation progress prompt information to user interface.
Implementation progress prompt information is generated according to the implementation progress of the asynchronous process flow nodes.
In the case where getting implementation progress prompt information, client shows that progress mentions according to implementation progress prompt information
It is shown in user interface.Progress prompt can for example, show the progress bar of progress, number of show percent etc. to be a variety of.
412, it checks whether and inquires payment result, if so, step 414 is executed, if it is not, return step 410.
414, payment result is shown.
In step 414, payment result can be payment successfully as a result, the international business for example executed in server end
The result of detection risk is in the case where, and server end generates interaction data and is sent to bank backstage, to complete to pay, and
It is returned after payment flow and pays successful result;Payment result can be payment failure as a result, for example in server
The result for holding the international business detection risk executed is in unacceptable situation, and payment flow terminates, and returns to the knot of payment failure
Fruit.
In order to more fully be illustrated to the present processes, Fig. 5 shows the branch of this specification one embodiment
Pay the specific application example schematic diagram of the processing method of process.In the specific example that a user carries out wild card payment, service
The processing method of the payment flow at device end includes the following steps 500~526:
500, start.
The payment request of received server-side client starts first pass engine.
502, first pass engine queries payment data.
Payment data includes the information such as the account of user, bank card data.
504, first pass engine prepares channel of disbursement.
In the present embodiment, channel of disbursement can be wild card channel of disbursement.
506, whether first pass engine queries channel of disbursement can be used, if so, step 508 is executed, if it is not, executing step
526。
508, first pass engine checks transaction business state.
Wherein, transaction business state can be waiting payment status.
510, first pass engine checks whether the current payment environment of user is normal, if so, step 510 is executed, if it is not, holding
Row step 526.
512, first pass engine checks whether User Status is normal, if so, step 514 is executed, if it is not, executing step
526。
514, first pass engine start second procedure engine carries out international business detection risk.
516, first pass engine obtains intermediate result and final result.
Wherein, first pass engine obtains what second procedure engine generated during carrying out international business detection risk
Intermediate result, and know according to the intermediate result implementation progress of international business detection risk.
The final result that the international business risk inspection of first pass engine acquisition second procedure engine execution generates, and according to
Final result continues to execute the flow nodes after asynchronous process flow nodes.
518, first pass engine checks whether final result passes through, if so, step 520 is executed, if it is not, executing step
526。
520, first pass engine payment is reported and submitted.
First pass engine generates interaction data, for interactive with bank.
Interaction data includes: the information such as payment accounts, payment amount, payment channel.
522, first pass engine returns to implementation progress prompt information to client.
Client can show progress prompt in user interface according to implementation progress prompt information.Progress prompt can be
It is a variety of, for example, show the progress bar of progress, number of show percent etc..
In this step, implementation progress prompt letter can be returned to reaching third time interval threshold value for first pass engine
Breath is to client, or client actively inquires server end to obtain implementation progress reaching third time interval threshold value
Prompt information.Third time interval threshold value can be set, such as be set as 3 seconds.
524, first pass engine saves payment data.
Wherein, first pass engine saves the caching of payment data to server.
526, terminate payment flow.
A kind of processing unit of payment flow is also disclosed in one embodiment of this specification, referring to Fig. 6, comprising:
Payment flow loading module 602 is configured as starting first pass engine, loads the payment flow needed to be implemented,
Wherein, the payment flow includes multiple flow nodes, and the multiple flow nodes include at least one asynchronous process process
Node;
First pass engine processing module 604 is configured as that the first pass engine sequence is made to execute the process section
Point;
Asynchronous process module 606 is configured as determining that current pending flow nodes are in the first pass engine
It in the case where asynchronous process flow nodes, interrupts the first pass engine and executes asynchronous process flow nodes, and start the
Two flow engines execute asynchronous process flow nodes;
Intermediate result obtains module 608, and being configured as, which makes the first pass engine obtain the second procedure engine, exists
The intermediate result generated during executing asynchronous process flow nodes, and the asynchronous process is known according to the intermediate result
The implementation progress of flow nodes;
Final result obtains module 610, and being configured as, which makes the first pass engine obtain the second procedure engine, holds
The final result of line asynchronous process flow node, and after continuing to execute asynchronous process flow nodes according to the final result
Flow nodes.
Wherein, first pass engine includes: the asynchronization thread pool component for supporting configuration multiple threads rule, with
Realize that the first pass engine start second procedure engine executes the asynchronous process flow nodes.
Optionally, multiple flow nodes include at least one non-asynchronous process flow nodes;
Described device further include: non-asynchronous process module 614, being configured as determining in the first pass engine currently needs
In the case that the flow nodes to be executed are non-asynchronous process flow nodes, execute the first pass engine described non-asynchronous
Process flow node.
Optionally, described device further include:
Configuration information increases module, is configured as each flow nodes and increases configuration information, the configuration information includes: to be
No energy asynchronous process, the interval of poll time, asynchronous waiting time-out time, polling result obtain address.
Optionally, the processing unit of the payment flow of the present embodiment further include:
Configuration information parsing module is configured as making the first pass engine before executing current flow nodes,
The configuration information of the current pending flow nodes of first pass engine parsing, according to configuration information judgement currently to
The flow nodes of execution are asynchronous process flow nodes or non-asynchronous process flow nodes.
Optionally, asynchronous process flow nodes include: international business detection risk;
If final result is to check to pass through, the final result acquisition module continues to execute described according to the final result
The flow nodes after asynchronous process flow nodes, comprising:
It generates interaction data and is sent to bank backstage, to complete to pay;
The payment data of user is saved to local;And
Terminate payment flow.
Optionally, the final result obtains module in the case where final result is to check unacceptable situation, according to it is described most
Termination fruit continues to execute the flow nodes after the asynchronous process flow nodes, comprising: terminates payment flow.
Optionally, referring to Fig. 6, intermediate result obtains module 608 and includes:
Intermediate result memory module 6082 is configured as making the second procedure engine that will execute asynchronous process process section
The intermediate result generated during point is stored to local cache;
Intermediate result enquiry module 6084, is configured as making the first pass engine queries local cache, described in acquisition
Intermediate result.
Optionally, referring to Fig. 6, the final result obtains module 610 and includes:
Final result memory module 6102 is configured as making the second procedure engine that will execute asynchronous process flow nodes
Final result store to local cache;
Final result enquiry module 6104, is configured as making the first pass engine queries local cache, described in acquisition
Final result.
Optionally, the processing unit of the payment flow of the present embodiment further include:
Implementation progress cue module 612 is configured as that the first pass engine is made to return to implementation progress prompt information extremely
User interface;Wherein, the implementation progress prompt information is generated according to the implementation progress of the asynchronous process flow nodes.
The processing unit of payment flow provided by the present application determines current pending flow nodes in first pass engine
In the case where for asynchronous process flow nodes, the first pass engine, which interrupts, executes asynchronous process flow nodes, and starts the
Two flow engines execute asynchronous process flow nodes, and the available second procedure engine of first pass engine executes asynchronous process
The intermediate result and final result generated during flow nodes, and asynchronous process flow nodes are known according to intermediate result
Implementation progress continues to execute the flow nodes after asynchronous process flow nodes, according to final result so as to improve the world
The efficiency of air control system service inspection card risk, improves the usage experience of user.
In addition, first pass engine can return to implementation progress prompt letter according to the implementation progress of asynchronous process flow nodes
Breath alleviates the anxiety of user to user interface so that user be made to know the processing progress of current payment flow in real time.
A kind of exemplary scheme of the processing unit of above-mentioned payment flow for the present embodiment.It should be noted that the branch
The technical solution for paying the technical solution of the processing unit of process and the processing method of above-mentioned payment flow belongs to same design, props up
The detail content that the technical solution of the processing unit of process is not described in detail is paid, may refer to the processing side of above-mentioned payment flow
The description of the technical solution of method.
One embodiment of this specification also provides a kind of calculating equipment, including memory, processor and storage are on a memory
And the computer instruction that can be run on a processor, the processor realize the processing of above-mentioned payment flow when executing described instruction
Method.
It should be understood that calculating equipment can also include network interface, network interface, which enables, calculates equipment via one
Or multiple network communications.The example of these networks include local area network (LAN), wide area network (WAN), personal area network (PAN) or such as because
The combination of the communication network of spy's net.Network interface may include wired or wireless any kind of network interface (for example, network
One or more of interface card (NIC)), such as IEEE802.11 WLAN (WLAN) wireless interface, Worldwide Interoperability for Microwave are mutual
Couple into (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) interface, cellular network interface, blue tooth interface, close
Field communication (NFC) interface, etc..
In one embodiment of this specification, the above-mentioned and others not mentioned component for calculating equipment can also be each other
It is connected, such as passes through bus.Those skilled in the art can according to need, and increase or replace other component.
Calculating equipment can be any kind of static or mobile computing device, including mobile computer or mobile computing are set
Standby (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), mobile phone
(for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of movement are set
It is standby, or the static calculating equipment of such as desktop computer or PC.Calculating equipment can also be mobile or state type service
Device.
A kind of exemplary scheme of above-mentioned calculating equipment for the present embodiment.It should be noted that the skill of the calculating equipment
The technical solution of art scheme and the processing method of above-mentioned payment flow belongs to same design, and the technical solution for calculating equipment is not detailed
The detail content carefully described may refer to the description of the technical solution of the processing method of above-mentioned payment flow.
One embodiment of this specification also provides a kind of computer readable storage medium, is stored with computer instruction, this refers to
The step of order realizes the processing method of payment flow as previously described when being executed by processor.
The computer instruction includes computer program code, the computer program code can for source code form,
Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute
State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code
Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory),
Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer-readable medium include it is interior
Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts
Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, this specification is not limited by the described action sequence, because
For according to this specification, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art also should
Know, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this
Necessary to specification.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment.It should be noted that this is deposited
The technical solution of the technical solution of storage media and the processing method of above-mentioned payment flow belongs to same design, the skill of storage medium
The detail content that art scheme is not described in detail may refer to the description of the technical solution of the processing method of above-mentioned payment flow.
In above-mentioned each embodiment, all emphasizes particularly on different fields to the description of each embodiment, be not described in detail in some embodiment
Part, may refer to the associated description of other embodiments.
This specification preferred embodiment disclosed above is only intended to help to illustrate this specification.Alternative embodiment is not
All details of detailed descriptionthe, do not limit the invention to the specific embodiments described.Obviously, according in this specification
Hold, can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain this theory
The principle and practical application of bright book, so that skilled artisan be enable to better understand and utilize this specification.This
Specification is limited only by the claims and their full scope and equivalents.