Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one
Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
Present context will be introduced by taking the application scenarios that bank card is paid as an example herein, to solve data receiver pair
Pending data repeats multiple processing movement, and causes the exception of data handling procedure, network resource overhead big and number
The problem of according to interaction process low efficiency.
Fig. 1 is the basic process of the method for data interaction provided by the embodiments of the present application processing, comprising the following steps:
S11: data processing request is sent to data receiver.
In the application of bank card payment, data processing request, that is, bank card is withholdd request.Data sending terminal is payment
Terminal, data receiver are banking systems, and after generating trade order, payment terminal acquires the bank card information of user, thus
The request of withholing for executing the movement of withholing of certain amount of money for specific bank card is obtained, and to banking system sends this and withholds and ask
It asks.
S12: from the corresponding processing result of data receiver inquiry data processing request.
In the embodiment of the present application, banking system request and is made accordingly to withhold after processing receiving to withhold, this can be withholdd
The result of processing is recorded.Payment terminal is to learn the disposition of the above request of withholing, then can pass through banking system
Channel is inquired to realize.
Specifically, banking system presets search access right, and payment terminal is first when needing to inquire the result for processing of withholing
First to banking system sending permission verification information, such as: identification information and password, if banking system is verified, proving should
Payment terminal has search access right, later on query actions.
S13: judge whether to inquire the corresponding processing result of the data processing request from data receiver.
In the embodiment of the present application, the result of inquiry is divided into the case where inquiring processing result and does not inquire processing result
Situation, and processing result then includes " bank card withhold success " and " bank card is withholdd unsuccessfully ".
S14: if inquiring the corresponding processing result of the data processing request, number no longer is retransmitted to data receiver
It is requested according to processing.
Present example is continued to use, if payment terminal finds corresponding processing result from bank's inquiry channel, shows the silver
The request of withholing of row card is accepted by banking system end, without sending the request of withholing of bank card again, specifically, if
The processing result found is " bank card withhold success ", then by the status modifier of the trade order at " paying successfully ";If
The processing result found is " bank card is withholdd unsuccessfully ", then by the status modifier of the trade order at " payment fails ", and
Turn to the processing of subsequent item.
S15: if successfully calling the data-query interfaces of data receiver and not inquire the data processing request corresponding
Processing result, it is determined that retransmit data processing request to data receiver.
Continue to continue to use present example, if not inquiring processing result from banking channels, shows banking system not
It receives to withhold accordingly between request or banking system and payment terminal and communication disruption occurs.Wherein, banking system with
Between payment terminal in the case where communication disruption, if payment terminal sends request of withholing to banking system again, it is likely that
Cause banking system receive it is multiple withhold request and execute repeatedly withhold movement (assuming that communication conditions withhold request send again
When restore normal suddenly).The embodiment of the present application takes following scheme to solve problem above: first determining whether that payment terminal whether can
Enough data-query interfaces for successfully calling banking system, if still not looked under the premise of data-query interfaces call successfully
Processing is ask as a result, then showing that banking system is not received by request of withholing really, it is determined that send button again to banking system
Money request;If payment terminal calls the data-query interfaces failure of banking system, the query actions are repeated, until can
Until the data-query interfaces of banking system are called in success.
Fig. 2 is the detailed process of the method for the data interaction processing that the application first embodiment provides, and is included the following steps:
S21: the corresponding transmission record of data processing request is searched.
In the embodiment of the present application, it is pre-configured with the request record sheet of an operating process to record request of withholing, is paid
One request of withholing of every transmission in terminal, then the payment terminal can correspondingly generate a transmission record in request record sheet.
When payment terminal monitors new trade order, the request of withholing of the trade order need to be generated, then withholing and asking sending this
Before asking, it is necessary first to check request record sheet.
S22: transmission record is judged whether there is.
According to check request record sheet as a result, this method process jumps to two different subsequent processing steps.Such as
Fruit shows that the trade order has been transmitted across a request of withholing, then jumps there are the corresponding transmission record of current trade order
To step S26;If there is no the corresponding transmission record of current trade order, then show that the trade order is strictly that New Transaction is ordered
It is single, then jump to step S23.
S23: the transmission record of the data processing request is generated.
It, first need to be in request record sheet when not finding the transmission for looking for trade order record in the embodiment of the present application
The transmission record of middle one trade order of insertion requests sending action to record subsequent required withholing for execution.
S24: data processing request is sent to data sending terminal.
S25: judge whether to receive the returned data of the data receiver feedback.
Continue to use present example, for New Transaction order, payment terminal for the first time to banking system send one withhold
After request, payment terminal can still wait banking system to feed back corresponding returned data, which can show " bank's buckle
Money success " or " bank card is withholdd unsuccessfully " if payment terminal receives the returned data of banking system show banking system
It has received to withhold and has requested and deal with movement, hereafter payment terminal modifies trade order state, and process terminates;Otherwise, show
The process that banking system receives request of withholing is abnormal, then jumps to step S21, carries out search request record sheet, because of request
There are a transmission of trade order record in record sheet, then process can jump to step S26.
S26: the corresponding processing result of the data processing request is inquired.
In the embodiment of the present application, the application programming interface of trade order data is inquired in banking system by calling
(Application Programming Interface, API) inquires to realize.
S27: judge whether to find processing result.
In the embodiment of the present application, there are following abnormal conditions: banking system, which actually has been received to withhold, request and to be made
Processing, but because special status (such as data transmission problems) causes banking system can not returned data or returned data delay.
Step S27 can handle the above abnormal conditions, if finding processing result from the inquiry channel of banking system, show to detain
Money request has sent success, and process terminates;If not finding processing result, show banking system and receive to withhold to ask
It asks, jumps to step S28.
S28: the corresponding transmission record of the data processing request is deleted.
In the embodiment of the present application, after the completion of the movement of step S28 executes, process jumps to step S21, due to requesting at this time
There is no the transmissions of the trade order to record in record sheet, then the trade order can be taken as New Transaction order, payment terminal meeting
Again the request of withholing of the trade order is sent to banking system.The embodiment of the present application takes the side for checking request record sheet
Formula, realizes the circulation of the above process, and will not there is a situation where requests of withholing to repeat to send.
It is noted that timing mode can be taken in the application other embodiments to inquire banking channels, i.e. New Transaction
After the request of withholing of order is sent, if not receiving the returned data of banking system in preset time, inquiry bank is opened
The movement of channel.
Fig. 3 is the detailed process of the method for the data interaction processing that the application second embodiment provides, the second embodiment
The content for continuing to use first embodiment above, includes the following steps:
S31: the corresponding transmission record of data processing request is searched.
S32: transmission record is judged whether there is, if so, thening follow the steps S35;If it is not, thening follow the steps S33.
S33: the transmission record of the data processing request is generated.
S34: data processing request is sent to data sending terminal.
S35: the corresponding processing result of the data processing request is inquired.
S36: judging whether to find processing result, if so, process terminates;If it is not, thening follow the steps S37.
S37: the corresponding transmission record of the data processing request is deleted, then executes step S31.
The difference of the present embodiment and first embodiment is: it is directed to New Transaction order, after completing to send request of withholing,
The corresponding processing result of the data processing request is directly inquired, and and is not waiting for banking system returned data.The present embodiment shortens
Process step learns disposition by way of real-time query banking channels to All Activity order.
The specific mistake for the step of Fig. 4 is query processing result in the method for data interaction provided by the embodiments of the present application processing
Journey.In practical applications, different system times the case where there may be slightly differences, if the system time of payment terminal is T
Day, and the system time of banking system is T-1 days, then above situation may cause the T days trade orders sent in payment terminal
Processing data corresponding to data are stored in T-1 days in banking system trade order processing data, to solve above ask
Topic, the two days trade orders in the embodiment of the present application inquiry front and back handle data.
In the embodiment of the present application, the step of query processing result, is specifically included:
S121: the first processing data of data receiver (banking system) in first time period are obtained.
S122: based on the first processing data, the corresponding processing result of the data processing request is inquired.
S123: judging whether to inquire processing result, if so, obtaining query result;If it is not, thening follow the steps S124.
S124: the second processing data of data receiver (banking system) in second time period are obtained.
S125: second processing data are based on, the corresponding processing result of the data processing request is inquired.
In the embodiment of the present application, first time period and second time period can respectively indicate different one days, and first, second
Handle the set that data are recorded one day All Activity order data dealt with by banking system.Certainly, other realities of the application
It applies in example, the length of first time period and second time period can also be two days, one week etc..
Fig. 5 is the structural schematic diagram of the system of data interaction provided by the embodiments of the present application processing, including payment terminal (number
According to transmitting terminal) 10 and banking system (data receiver) 20, payment terminal 10 includes off-line trading terminal or online transaction terminal,
Banking system 20 includes at least request receiving module 21, data processing module 22, result feedback module 23 and result database
24, request receiving module 21 is used for receiving request of withholing transmitted by one or more payment terminals, data processing module 22
It is acted in executing corresponding processing to request of withholing, as a result feedback module 23 is used for after processing is withholdd in execution, eventually to payment
End 10, which sends to withhold, requests corresponding returned data, and result database 24 handles all requests of withholing for storing banking system
Processing result.
Based on same thinking, in the embodiment of the present application, payment terminal (i.e. terminal device) 10 includes:
Sending module 11, for sending data processing request to data receiver 20;
Enquiry module 12, for inquiring the corresponding processing result of data processing request from data receiver 20;
Determining module 13, for no longer retransmitting data to data receiver 20 when inquiring the processing result
Processing request is determined when successfully calling the data-query interfaces of data receiver 20 and not inquiring processing result to number
Data processing request is retransmitted according to receiving end 20.
In the embodiment of the present application, payment terminal 10 further includes record search module 110, is used for:
Search the corresponding transmission record of the data processing request;Then
Sending module 11 specifically includes:
Record generation unit 110, for when not finding transmission record, generating the transmission note of the data processing request
Record;
Request transmitting unit 112, for sending data processing request to data receiver 20.
In the embodiment of the present application, payment terminal 10 further includes judgment module 15, is used for:
Judge whether to receive the returned data that data receiver is fed back;Then
Enquiry module 12 is specifically used for: if not receiving returned data, inquiring data processing from the data receiver 20
Request corresponding processing result.
In the embodiment of the present application, enquiry module 12 is specifically included:
First acquisition unit 121, for being obtained in first time period from the result database 24 of data receiver 20
First processing data;
First query unit 122, for inquiring the corresponding processing knot of the data processing request based on the first processing data
Fruit;
If not inquiring processing result from the first processing data, the movement of second acquisition unit 123 is executed;
Second acquisition unit 123, for being obtained in second time period from the result database 24 of data receiver 20
Second processing data;
Second query unit 124 inquires the corresponding processing knot of the data processing request for being based on second processing data
Fruit;Wherein, second time period is before first time period.
In the embodiment of the present application, determining module 13 is specifically included:
Record deletion unit 130, for successfully calling the data-query interfaces of data receiver 20 and not inquiring everywhere
When managing result, the corresponding transmission record of the data processing request is deleted, is retransmitted at data with determining to data receiver 20
Reason request;It has then executed the movement of record deletion unit 130 and then has executed the movement of record search module 14.
Above technical scheme based on the embodiment of the present application, can reach it is following the utility model has the advantages that
After data processing request is sent to data receiver, by being inquired from current data from the data receiver
The corresponding processing result of reason request, and the case where according to institute's query processing result, to determine the need for sending data again
Processing request to avoid in the prior art because of the exception of data receiver feedback returned data, and may cause data receiver
The case where end repeats multiple data processing actions, and unnecessary network resource overhead is effectively avoided, it promotes data and hands over
The efficiency mutually handled.
It is noted that terminal device described herein, system are based on above method, according to same thinking institute
It generates, therefore the terminal device, system can continue to use all technical characteristics of above method, no longer be repeated herein.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
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 embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art
For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal
Replacement, improvement etc., should be included within the scope of the claims of this application.