CN102346889B - POS (Point of Sale) terminal-based off-line transaction method, POS terminal-based off-line transaction system and related devices - Google Patents

POS (Point of Sale) terminal-based off-line transaction method, POS terminal-based off-line transaction system and related devices Download PDF

Info

Publication number
CN102346889B
CN102346889B CN201010245377.5A CN201010245377A CN102346889B CN 102346889 B CN102346889 B CN 102346889B CN 201010245377 A CN201010245377 A CN 201010245377A CN 102346889 B CN102346889 B CN 102346889B
Authority
CN
China
Prior art keywords
transaction
transaction data
log file
background server
clearing
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.)
Expired - Fee Related
Application number
CN201010245377.5A
Other languages
Chinese (zh)
Other versions
CN102346889A (en
Inventor
罗烽
乐祖晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Co Ltd
Original Assignee
China Mobile Communications 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 China Mobile Communications Co Ltd filed Critical China Mobile Communications Co Ltd
Priority to CN201010245377.5A priority Critical patent/CN102346889B/en
Publication of CN102346889A publication Critical patent/CN102346889A/en
Application granted granted Critical
Publication of CN102346889B publication Critical patent/CN102346889B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a POS (Point of Sale) terminal-based off-line transaction method, a POS terminal-based off-line transaction system and related devices, which are used for solving the problem that when the upper limit of the memory space of a POS terminal is reached in the current off-line transaction process, subsequent electronic payment can be carried out only after a long time of waiting. The method includes the following steps: when the POS terminal monitors that preset conditions are met in the process of writing the transaction data of current transaction into a first record file, another record file, except the first record file, is used as a second record file, which is empty, and the transaction data of the current transaction continues to be written into the second record file; the transaction data written into the first record file is sent to a background server, and after a feedback message sent by the background server, which indicates that the data written into the first record file are already completely received, is received, the transaction data written into the first record file are cleared up.

Description

Offline transaction method, system and relevant apparatus based on point of sales terminal
Technical field
The present invention relates to computing machine and communication technical field, relate in particular to a kind of offline transaction method, a kind of offline transaction system, a kind of point of sales terminal and a kind of background server based on point of sales terminal based on point of sales terminal.
Background technology
Electronic payment mode is compared with traditional pay-us-you-go plan, has advantages of without small change, and the risk of can evade cash loss simultaneously, sneak into counterfeit money, cash being robbed, is therefore accepted by people soon, becomes one of consumption pattern of current main flow.
Pay Payment Card, mobile phone wallet and the point of sales terminal (POS, Point-Of-Sale terminal) that conventionally need to hold by means of users such as stored-value card, bank cards by mails.Hold the user of Payment Card or mobile phone wallet when consumption, by POS terminal, read card number or the identification informations such as user ID corresponding to mobile phone wallet of Payment Card, the transaction related informations such as the consumption amount of money of this transaction, time of origin and the identification-information reporting that reads are settled accounts to background server.
The implementation of existing E-Payment mainly contains on-line transaction and two kinds of modes of offline transaction, and its ultimate principle is as follows:
(1) on-line transaction mode:
The schematic flow sheet of accompanying drawing 1 for adopting on-line transaction mode to pay by mails, existing bank card adopts on-line transaction mode to pay by mails conventionally.
Step 101, after user card punching, POS terminal sends on-line transaction request to background server, carries the transaction data such as the card number of the Payment Card reading and the authorization informations such as password of user's input and the dealing money of this transaction, exchange hour in this on-line transaction request;
Step 102, background server is according to the card number carrying in the on-line transaction request receiving, in the corresponding relation of the password of inputting when the card number of storing from database and registration, the password of inputting while finding registration corresponding to described card number, when the password finding is consistent with the password carrying in on-line transaction request, by checking, enter step 103;
Step 103, background server extracts transaction data from on-line transaction request, and preserves the transaction data extracting;
Step 104, background server sends on-line transaction response to POS terminal, this Transaction Success of notice POS terminal;
Step 105, POS terminal receives after on-line transaction response, stores the transaction data of this transaction;
When follow-up other user card punchings are paid by mails, circulation execution step 101~step 105;
Step 106, POS terminal is when every day, the predetermined clearing time arrived, according to the transaction data of storage, calculate the dealing money sum and the total stroke count of transaction of each transaction after clearing last time, and the dealing money sum calculating is carried in clearing request and sends to background server with the total stroke count of transaction;
Step 107, background server carries out reconciliation processing, be whether the dealing money sum that in comparison step 106, POS terminal is sent is consistent with the dealing money sum of extracting from each on-line transaction request receiving after clearing last time, and whether transaction stroke count sum corresponding to each on-line transaction request of receiving after clearing of the total stroke count of the transaction that in step 106, POS terminal is sent and last time be consistent, when dealing money and transaction stroke count are all consistent, determine reconciliation success, otherwise reconciliation failure;
Step 108, background server, when reconciliation success, sends clearing response to POS terminal, reconciliation of notice POS terminal success;
Step 109, the transaction data of POS terminal deletion storage on the same day.
(2) offline transaction mode:
The schematic flow sheet of accompanying drawing 2 for adopting offline transaction mode to pay by mails, existing mass transit card, mobile phone wallet adopt offline transaction mode to conclude the business conventionally.
Step 201, POS terminal and background server carry out alternately, carry out the processing of registering, and obtain a batch sign from background server;
Step 202, after user card punching (or mobile phone wallet), the transaction data of POS terminal storage card number (or user ID) and this transaction;
When follow-up other user card punchings are paid by mails, circulation execution step 202;
Step 203, when POS terminal receives the tally order that operating personnel input by modes such as buttons, calculation procedure 201 carry out register process after the dealing money summation of N transaction of storage, and by step 201 carry out register process after the transaction data of N transaction of storage, batch sign that the dealing money summation calculating and the total stroke count N of transaction and step 201 obtain is carried in clearing request, send to background server;
Step 204, background server carries out reconciliation processing, from clearing request, extract each transaction data, whether the dealing money sum of each transaction of calculate the extracting transaction stroke count corresponding with dealing money summation transaction data whether consistent and that extract in clearing request be consistent with the total stroke count N of transaction settling accounts in asking, if dealing money is all consistent with transaction stroke count, enter step 205;
Step 205, background server sends to POS terminal by clearing response, and notice POS terminal is settled accounts successfully;
Step 206, after POS terminal is known and settled accounts successfully, deletes the transaction data of the N transaction of storage;
Step 207, POS terminal sends to background server the message of registering again, and the processing of next time registering obtains next batch sign, follow-up repeated execution of steps 202~step 206.
Adopt mobile phone wallet to pay by mails and adopt bank card to pay by mails to compare, user inputs password when carrying card, memory cipher and concluding the business, simplified user's operation, simultaneously because user ID is all to adopt system of real name registration conventionally, thereby there is higher security, therefore obtained universal fast.
When yet the offline transaction mode shown in employing Fig. 2 is paid by mails, tend to exist following problem:
In the process of execution step 203~step 206, because POS terminal and the mutual mass data of background server can take certain hour, and the restriction due to POS terminal processing capacity, the transaction data that in step 206, POS terminal is checked the N ' transaction in transaction data and the clearing responses of N transaction of self storage also can take the more time, therefore at present conventionally the data upload time in step 203 is set in to the moment before leaving offices operating personnel, in order to avoid affect user, pays by mails.Yet due to the quantitative limitation of POS terminal storage, when the transaction data of storage approaches or arrive the memory space upper limit of POS terminal and owing to now not arriving the predetermined data upload time, thereby POS terminal be cannot empty the transaction data of storage time, POS terminal cannot be paid by mails more normally.While generally running into this situation, POS terminal can imperative operation personnel be settled accounts, perform step 203~step 206, before the transaction data of the N transaction of storing at POS terminal deletion, cannot pay by mails, the stand-by period that this will inevitably increase user, affect follow-up electric payment transaction.
Summary of the invention
The embodiment of the present invention provides a kind of offline transaction method based on point of sales terminal, in order to solve in existing offline transaction process, when arriving in POS terminal storage amount in limited time, need to wait for that the long period just can carry out the problem of follow-up E-Payment.
Accordingly, the embodiment of the present invention also provides a kind of offline transaction system, a kind of point of sales terminal and a kind of background server based on point of sales terminal.
The technical scheme that the embodiment of the present invention provides is as follows:
An offline transaction method based on point of sales terminal, comprising:
Point of sales terminal writes the transaction data of current transaction to monitor in the process of the first log file and meets when pre-conditioned, using another log file except the first log file as the second log file, the content of described the second log file is empty, and the transaction data of current transaction is continued to be written in the second log file; And the transaction data writing in described the first log file is sent to background server, and after the feedback message of the data that write, empty the transaction data that writes the first log file in receiving complete reception first log file of background server transmission.
A kind of offline transaction method based on point of sales terminal, comprise: background server receives transaction data the storage that described point of sales terminal is sent, and definite complete receiving after described transaction data, to the message of the complete reception data of described point of sales terminal feedback; Background server receives after the clearing request that described point of sales terminal sends, and searches the transaction data that described point of sales terminal is sent after front lump-sum settlement; And according to the transaction data finding and described clearing request, carry out settlement process, and after settlement process success, to described point of sales terminal, send clearing success response.
A point of sales terminal, comprises selected cell, writing unit, transmitting element and empties unit, wherein:
Determining unit, for the process that the transaction data of current transaction is write to the first log file at writing unit, monitor and meet when pre-conditioned, using another log file except the first log file as the second log file, the content of described the second log file is empty; Writing unit, for continuing the transaction data of current transaction to be written to the second log file that selected cell is selected; The first transmitting element, for selecting at selected cell after the second log file, sends to background server by the transaction data writing in described the first log file; Empty unit, after the feedback message of the data that send for complete reception the first transmitting element receiving background server transmission, empty the transaction data that writes the first log file.
A background server, comprising: the first receiving element, transaction data the storage of for receiving point of sales terminal, sending; Feedback unit, for determining complete receiving after described transaction data, to described point of sales terminal feedback message; The second receiving element, the clearing request of sending for receiving described point of sales terminal; Search unit, for receiving after described clearing request at the second receiving element, search the front lump-sum settlement transaction data that described point of sales terminal is sent afterwards; Settlement process unit, for receiving described clearing request according to searching transaction data and the second receiving element that unit finds, carries out settlement process; Transmitting element, for after the success of settlement process unit settlement process, sends clearing success response to described point of sales terminal.
An offline transaction system based on point of sales terminal, comprises point of sales terminal and background server, wherein:
Point of sales terminal, for the process that the transaction data of current transaction is write to the first log file, monitor and meet when pre-conditioned, using another log file except the first log file as the second log file, the content of described the second log file is empty, and the transaction data of current transaction is continued to be written in the second log file; And the transaction data writing in described the first log file is sent to background server, and after the feedback message of the data that write, empty the transaction data that writes the first log file in receiving complete reception first log file of background server transmission;
Background server, transaction data the storage of for receiving described point of sales terminal, sending, and definite complete receiving after described transaction data, to described point of sales terminal feedback message; Receive after the clearing request that described point of sales terminal sends, search the transaction data that described point of sales terminal is sent after front lump-sum settlement; According to the transaction data finding and described clearing request, carry out settlement process, and after settlement process success, to described point of sales terminal, send clearing success response.
The embodiment of the present invention by arranging at least two log files in POS terminal, in the process that the transaction data of current transaction is write to the first log file, monitor while meeting data upload condition, from comprise at least two log files of described the first log file, select next content be empty log file as the second log file, and the transaction data of current transaction is continued to be written in the second log file; And the transaction data writing in described the first log file is sent to background server, and after the feedback message of the data that write, empty the transaction data that writes the first log file in receiving complete reception first log file of background server transmission.Thereby when POS terminal sends the transaction data such as dealing money of each transaction of having stored to network side, still can pay by mails, and without after only having the clearing of wait, just can pay by mails, shorten the stand-by period.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of on-line transaction mode in prior art;
Fig. 2 is the schematic flow sheet of offline transaction mode in prior art;
Fig. 3 is the schematic diagram of log file in prior art;
Fig. 4 is the main principle flow chart of realizing of the embodiment of the present invention;
Fig. 5 a is the principle schematic of existing POS terminal;
The principle schematic of the POS terminal that Fig. 5 b provides for the embodiment of the present invention;
The detail flowchart of the offline transaction method that Fig. 6 provides for the embodiment of the present invention;
Fig. 7 a is the content schematic diagram of the embodiment of the present invention the first log file and second log file while carrying out step 608;
Fig. 7 b is the content schematic diagram of the embodiment of the present invention the first log file and second log file while carrying out step 609;
Fig. 8 is that embodiment of the present invention background server is divided into all POS terminals that connect the schematic diagram of the group of predetermined number;
Fig. 9 is the schematic diagram that a plurality of log file wheels of the embodiment of the present invention turn;
The structural representation of a kind of point of sales terminal that Figure 10 provides for the embodiment of the present invention;
The structural representation of the first transmitting element in the point of sales terminal that Figure 11 provides for the embodiment of the present invention;
The structural representation of the background server that Figure 12 provides for the embodiment of the present invention;
The structural representation of settlement process unit in the background server that Figure 13 provides for the embodiment of the present invention.
Embodiment
In existing POS terminal, the transaction data of many transactions adopts the mode of queue in log file, as shown in Figure 3, a plurality of steps in accompanying drawing 2 all relate to the operation to log file, for example, relate to during step 201 store transactional data log file is carried out to " writing " operation; During step 203 uploading data, need to carry out to log file " reading " operation; When deleting transaction data, step 206 need to carry out deletion action to log file.
Inventor finds in existing offline transaction process, occur that user cannot pay by mails when execution step 203~step 206, thereby causing period of reservation of number, long (transaction data of uploading that cannot simultaneously perform step 203~step 206 correspondence is processed, and step 201 correspondence is paid processing by mails) reason be that existing POS terminal only has the POS terminal synchronization that an instruction parser causes can only carry out an instruction, and the log file that stores transaction data can only be performed an operation at synchronization, otherwise there will be read/write conflict problem.
For the problems referred to above, inventor has proposed a kind of for carrying out the POS terminal of offline transaction, linux operating system is installed to support multi-threaded parallel operation, at least two log files is set simultaneously in POS terminal and in order to rotation, stores the transaction data of the E-Payment of current generation.The implementation of two log files of take is example: after start, first the transaction data that storage is concluded the business at every turn in the first log file, when meeting data upload condition, select content and continue the transaction data of the transaction of the current generation of storage for the second empty log file is used for replacing the first log file, and the transaction data of N the transaction of storing in the first log file is sent to background server, execution step 203~step 206; Until while again meeting data upload condition, the transaction data of M the transaction of storing in the second log file is sent to background server, perform step 203 steps 206, so move in circles, thereby the executed in parallel that realizes store transactional data and transmission transaction data, has solved the long problem of period of reservation of number in prior art.
Below in conjunction with each accompanying drawing, embodiment of the present invention technical scheme main realized to principle, embodiment and the beneficial effect that should be able to reach is explained in detail.
As shown in Figure 4, to realize principle process as follows for the embodiment of the present invention main:
Step 10, under point of sales terminal open state, the transaction data of current transaction is write in the process of the first log file, monitor and meet when pre-conditioned, using another log file except the first log file as the second log file, the content of described the second log file is empty, enters step 20 and step 30;
Step 20, point of sales terminal continues the transaction data of current transaction to be written in the second log file, returns to step 10;
Step 30, the transaction data writing in described the first log file is sent to background server, and after the feedback message of the data that write, empty the transaction data that writes the first log file in receiving complete reception first log file of background server transmission, return to step 10.
To, according to foregoing invention principle of the present invention, introduce in detail an embodiment the main principle that realizes of the inventive method is explained in detail and is illustrated below.
Accompanying drawing 5a is the principle schematic of existing POS terminal, and the resolver on hardware layer is inferior can only support synchronization can only carry out an instruction; Accompanying drawing 5b is the principle schematic of the POS terminal of the embodiment of the present application proposition, by the (SuSE) Linux OS on hardware level, supports two above instructions of executed in parallel.
The detail flowchart of the method for commerce that accompanying drawing 6 provides for the embodiment of the present invention, wherein stores at least two blank log files in POS terminal, the form of each log file is still similar to existing log file in accompanying drawing 3.
Step 601, POS terminal powers on after start, carries out alternately with background server, carries out the processing of registering, and obtains a batch sign from background server;
Be specially: POS terminal sends to background server by the request of registering that carries equipment of itself sign, background server is carried at a batch sign of distributing to this POS terminal in the response of registering and feeds back to POS terminal.
Step 602, it is that the first log file in empty log file is for writing the transaction data of current transaction that POS terminal is selected at least two contents;
Step 603, POS terminal writes at every turn the swipe the card transaction data of the E-Payment correspondence implemented of user after start in the first log file;
Step 604, judges whether to receive user by the tally order of the clearing key-press input in POS terminal, if enter step 610, otherwise enters step 605;
Step 605, POS terminal is when meeting the condition of predetermined uploading data, from at least two log files, selecting next content is that empty log file is as the second log file, enter concurrently step 606 and step 607, now the content of the first log file and the second log file is as shown in accompanying drawing 7a;
Preferably, the condition of the predetermined uploading data in step 605 is " residual memory space writing in the log file (being the first log file here) of transaction data is less than predetermined value ", and for example the residual memory space in the first log file is less than 1MByte, 500KByte; Or
" timing length of the uploading data timer of arrive setting ", for example, set at interval of within 2 hours, uploading a secondary data; Or
" receive user by the upper teletype command of uploading key-press input on POS terminal panel ";
Or " receive the upper teletype command that background server sends ", please refer to shown in accompanying drawing 8, described background server is divided into all POS terminals that connect the group of predetermined number, for every group of POS terminal set the corresponding uploading data time, between the POS terminal of different groups, the time of uploading data is different, for example background server is divided into 6 groups by 30 POS terminals that connect, each group comprises 5 POS terminals, 1 o'clock every afternoon, to the POS terminal of the first group, sent teletype command, 2 o'clock every afternoons, to the POS terminal of the second group, sent teletype command, the rest may be inferred.Can make by this method the time of POS terminal uploading data stagger, avoid due to most POS terminals network congestion problem that all uploading data causes in 1,2 hour after before leaving offices.
It should be noted that, pre-conditioned in step 605 can be also above-mentioned several pre-conditioned combinations, no matter, when that condition of this combination meets, all can trigger to background server and send the transaction data in the first log file.For example pre-conditioned is " residual memory space of the first log file is less than predetermined threshold and and arrives predetermined timing length ", predetermined timing length is within every 4 hours, to upload a secondary data, when POS terminal is comparatively idle, as the POS terminal in the supermarket morning or on weekdays the time period in the afternoon, according to every 4 hours, uploading a secondary data can meet the demands completely, but in the comparatively busy time period in the afternoon at weekend, the first log file will be occupied full very soon, in the time of should being less than predetermined threshold at the residual memory space of the first log file so, trigger uploading data, rather than wait until when predetermined timing length arrives just uploading data.Other situations pre-conditioned or pre-conditioned combination are also similar, here give an example no longer one by one.
Step 606, POS terminal sends to background server by the transaction data of storing in the first log file, enters step 608;
POS terminal can increase check bit when sending transaction data in the message sending, so that background server is determined correctness and the integrality of the transaction data receiving according to check bit.
Background server correctly intactly receives after the transaction data that described POS terminal sends determining, preserves the transaction data that the described POS terminal that receives is sent.
Step 607, is stored in transaction data corresponding to each E-Payment occurring after step 605 in the second log file that step 605 selects, and returns to step 604;
Step 608, receive after the notification message that background server successfully receives the data that write in complete reception first log file of POS terminal feedback in step 606, according to the transaction data in described the first log file, accumulation calculating goes out corresponding transaction total charge and the total stroke count of transaction of transaction data having sent, and enters step 609;
For example, in the first log file as shown in accompanying drawing 7a, there are 4 transaction records: transaction record 1~transaction record 4.Wherein the dealing money of transaction record 1 is that 10 yuan, the dealing money of transaction record 1 are that 15 yuan, the dealing money of transaction record 1 are that 50 yuan, the dealing money of transaction record 4 are 100 yuan, transaction total charge corresponding to transaction data having sent is 175 yuan, and total stroke count of concluding the business is 4.
Step 609, POS terminal empties the transaction data in the first log file, returns to step 604;
Now the content of the first log file and the second log file is as shown in accompanying drawing 7b, wherein three transaction data in log file 2 be after step 604, the transaction data of the E-Payment correspondence that occurs before step 609.The first log file again can be upper while once meeting the condition of predetermined uploading data after emptying, and selected being adopted as a child renews the transaction data of the current transaction of storage.
Step 610, when POS terminal receives the tally order of user by the key-press input on POS terminal panel, after the current transaction total charge and clearing last time writing in the transaction data of storing in the log file of transaction data, and receive the transaction total charge sum of the transaction data having sent in the described tally order time period before as clearing total charge, using current writing the total stroke count of transaction that the transaction data stored in the log file of transaction data is corresponding with the total stroke count sum of transaction of the transaction data having sent as the total stroke count of clearing, enter step 611,
Conventionally user settled accounts before coming off duty.
Preferably, after last time clearing and the transaction total charge and the total stroke count of concluding the business that receive the transaction data having sent in the time period before described tally order obtain in the following manner:
In can POS terminal, a counter being set is used for to the transaction total charge of the transaction data having sent and always than number, adds up, in above-mentioned steps 608, receive after the notification message of the data that write in complete reception first log file of background server feedback corresponding transaction total charge and the total stroke count of transaction of transaction data that uses this counter accumulation calculating to go out to have sent at every turn.The zero clearing after receiving clearing success response of this counter, registers and processes rear startup in execution; Or
Alternatively, in step 608, without accumulation calculating, go out corresponding transaction total charge and the total stroke count of transaction of transaction data having sent, but storage now transaction total charge and the total stroke count of transaction (at every turn sending to corresponding transaction total charge and the total stroke count of transaction of transaction data of background server) of the transaction data in (step 609 empty before) first log file, after receiving tally order, transaction total charge corresponding to the transaction data that at every turn sends to background server of storage and the total stroke count of transaction are sued for peace, after determining front lump-sum settlement, transaction total charge and the total stroke count of transaction of the transaction data of background server before these clearing, have been sent to.
Now in current the second log file that is writing transaction data, there are three transaction records, corresponding dealing money is all 10 yuan, so now the transaction total charge of the second log file is 30 yuan, the total stroke count of transaction of the second log file is 3, the correspondence transaction total charge of the transaction data before having sent is 175 yuan, the correspondence of the transaction data having sent total stroke count of concluding the business is 4, and therefore settling accounts total charge is 205 yuan, and settling accounts total stroke count is 7.
Step 611, POS terminal sends to background server by carrying the current clearing request that is writing the transaction data of storing in the log file of transaction data, the clearing total charge of determining and settling accounts total stroke count, enters step 612;
Step 612, background server receives after clearing request, after clearing last time, the transaction data comprising in the transaction data that this POS terminal is sent and clearing requests and settle accounts total charge and settle accounts total stroke count and carry out reconciliation processing, and after reconciliation success, to described POS terminal, send clearing success response;
Reconciliation process is specially: after background server calculates clearing last time, dealing money sum in each transaction data that the terminal of POS described in step 606 is sent adds that whether the result of the transaction total charge in the transaction data comprising in clearing requests is consistent with the clearing total charge comprising in clearing request, and whether the result of the total stroke count of transaction that the transaction stroke count sum in the transaction data sent of the terminal of POS described in step 606 adds the transaction data comprising in clearing request is with to settle accounts the total stroke count of clearing comprising in asking consistent;
Dealing money sum in calculating each transaction data that described POS terminal sends add the transaction stroke count sum in the transaction data that described in the result of transaction total charge of the transaction data comprising in clearing request and step 606 consistent with the clearing total charge comprising in clearing request, POS terminal is sent add the transaction data comprising in clearing request the total stroke count of transaction result with settle accounts the total stroke count of clearing comprising in asking when consistent, determine reconciliation success, otherwise determine reconciliation failure;
For example, background server is before receiving clearing request, store 4 transaction data that in the accompanying drawing 7a that in step 606, POS terminal is sent, the first log file comprises, after receiving clearing request, from clearing request, extract 3 transaction data that in the accompanying drawing 7b comprising, the first log file comprises, the dealing money that calculates 4 transaction data of storage is 205 yuan with the dealing money sum of 3 transaction data that extract, consistent with the clearing total charge comprising in clearing request, illustrate that the clearing total charge that dealing money sum in each transaction data that described POS terminal sends adds that the result of dealing money of the transaction data of each transaction comprising in clearing request comprises in asking with clearing is consistent, and the stroke count of the transaction data of storage is 4, the stroke count of the transaction data extracting is 3, sum of the two is 7, also consistent with 7 of the total stroke counts of clearing that comprise in clearing request, reconciliation success is now described.
Step 613, POS terminal, after receiving the clearing success response that background server sends, empties the transaction data in the file that writes transaction data, and at this moment the first log file and the second log file are all null file, return to step 601, wait for the processing of next time registering.
Preferably, after in step 612, background server can be determined clearing last time according to the time that receives the transaction data that described POS terminal sends, the transaction data that this POS terminal is sent, accuracy and promptness while determining the clearing last time transaction data that this POS terminal is sent afterwards in order further to improve background server, when in step 608, POS terminal sends to background server by message by the transaction data of storing in the first log file, can also in this message, carry batch sign that step 601 obtains, when background server receives the message that comprises transaction data that carries batch sign, the corresponding relation of the transaction data comprising in storage batch sign and this message, when step 612 is settled accounts, only need to be according to batch sign in clearing request, from the transaction data of having stored, find corresponding batch sign and batch transaction data that sign is consistent of settling accounts in asking, after settling accounts the transaction data finding as last time, the transaction data that this POS terminal is sent.
In the POS terminal that the embodiment of the present invention provides, safeguard and have at least two log files, one of them log file is for storing the transaction data of the E-Payment correspondence of the current enforcement of swiping the card.When pre-conditioned, meet, in the time of need to sending the transaction data writing in a log file to server, forbid writing transaction data in this log file, can only in another log file of selecting, write transaction data, after transaction data in this log file has been cleared, this log file allows to be reselected to write the transaction data of current transaction.Thereby when sending the transaction data such as dealing money of each transaction of having stored to network side, still can pay by mails, and without only writing after transaction data in the log file of transaction data sends to background server and complete clearing, just can pay by mails, shorten the stand-by period.Preferably, for example, for fear of meeting the condition of predetermined uploading data when (residual memory space that is writing the log file of transaction data is less than predetermined value), because also not emptied in time, the transaction data in another one log file cannot do not reselected out in order to continue to write the transaction data of current transaction, the mode that can adopt a plurality of log file wheels to turn, please refer to shown in accompanying drawing 9, 5 log file wheels turn, before the transaction data in the first log file is sent to background server, be chosen in the second log file relaying and continue the transaction data into current transaction, in the time the transaction data in the second log file need to being sent to background server, be chosen in the 3rd log file relaying and continue the transaction data into current transaction, ..., in the time the transaction data in the 5th log file need to being sent to background server, be chosen in the first log file relaying and continue the transaction data into current transaction, in this case as long as the first log file was cleared before the transaction data in the 5th log file is sent to background server.
In above-described embodiment step 605~step 609, by from upload a transaction data log file to server until delete the swipe the card transaction data of the E-Payment correspondence implemented of user in time period of the transaction data in this log file and be stored in another log file at every turn, rather than as prior art as long as wait for and could to process E-Payment next time after unique log file is cleared, thereby shortened the time of user's wait.
In addition, the method of commerce that the embodiment of the present invention provides, transaction data corresponding to all E-Payments occurring between twice clearing is divided into and repeatedly sends to respectively background server, rather than transaction data corresponding to all E-Payments that (normally before leaving offices after 1,2 hour) occurs between by twice clearing in regular time every day section as prior art once issued background server, realize the technique effect of equalising network load, avoided occurring in the short time network congestion situation.
Correspondingly, the embodiment of the present invention also provides a kind of point of sales terminal, and as shown in figure 10, this device comprises the first determining unit 110, writing unit 120, the first transmitting element 130 and empties unit 140, specific as follows:
The first determining unit 110, for the process that the transaction data of current transaction is write to the first log file at writing unit 120, monitor and meet when pre-conditioned, using another log file except the first log file as the second log file, the content of described the second log file is empty;
Writing unit 120, for continuing the transaction data of current transaction to be written to the second log file that the first determining unit 110 is selected;
The first transmitting element 130, for determining after the second log file in the first determining unit 110, sends to background server by the transaction data writing in described the first log file;
Empty unit 140, after the feedback message of the data that send for complete reception the first transmitting element 130 receiving background server transmission, empty the transaction data that writes the first log file.
Preferably, the point of sales terminal in accompanying drawing 10 also comprises receiving element 150, the second determining unit 160 and the second transmitting element 170, wherein:
Receiving element 150, for receiving tally order;
The second determining unit 160, while receiving tally order for receiving element 150, according to the dealing money comprising in the transaction data of the every transaction writing in the first log file, determine that transaction total charge that the transaction data that writes in the first log file is corresponding and transaction are always than number, and after settling accounts last time, and receive and in the time period, sent to before described tally order transaction total charge sum that the transaction data that writes in transaction total charge that the transaction data of background server is corresponding and the first log file is corresponding as clearing total charge, using the total stroke count sum of transaction corresponding to the transaction data writing in the total stroke count of transaction corresponding to the transaction data that sends to background server and the first log file as the total stroke count of clearing,
The second transmitting element 170, for sending to background server by carrying transaction data, the clearing total charge that the second determining unit 160 is determined and the clearing request of settling accounts total stroke count that the first log file writes;
The transaction data writing in the first log file, also for after receiving the corresponding clearing success response that clearing request that background server sends according to the second transmitting element 170 sends, is deleted in the described unit 140 that empties.
Preferably, please refer to accompanying drawing 11, the first transmitting element 130 in accompanying drawing 10 specifically comprises encapsulation subelement 111, carries subelement 112 and transmission subelement 113, wherein:
Encapsulation subelement 111, is encapsulated in message for the transaction data that the first log file is write;
Carry subelement 112, for the message obtaining in the encapsulation of encapsulation subelement 111, carry a batch sign, described batch is designated by registering, to process after described point of sales terminal start and obtains from described background server;
Send subelement 113, for sending to background server by carrying the message that has carried batch sign after subelement 112 is processed.
Please refer to accompanying drawing 12, the structural representation of the background server providing for the embodiment of the present invention, this background server comprises the first receiving element 121, feedback unit 122, the second receiving element 123, searches unit 124, settlement process unit 125 and transmitting element 126, wherein:
The first receiving element 121, transaction data the storage of for receiving point of sales terminal, sending;
Feedback unit 122, for determining complete receiving after described transaction data, to described point of sales terminal feedback message;
The second receiving element 123, the clearing request of sending for receiving described point of sales terminal;
Search unit 124, for receiving after described clearing request at the second receiving element 123, search the front lump-sum settlement transaction data that described point of sales terminal is sent afterwards;
Settlement process unit 125, for receiving described clearing request according to searching transaction data and the second receiving element that unit 124 finds, carries out settlement process;
Transmitting element 126, for after the 125 settlement process successes of settlement process unit, sends clearing success response to described point of sales terminal.
Preferably, please refer to accompanying drawing 13, the settlement process unit 125 in the background server in accompanying drawing 12 specifically comprises first definite subelement 131, relatively subelement 132 and second is determined subelement 133, wherein:
First determines subelement 131, for receiving according to searching transaction data and the second receiving element 123 that unit 124 finds the transaction data that described clearing request comprises, determine transaction total charge that the transaction data that receives is corresponding and transaction always than number;
Whether subelement 132 relatively, receive for the second receiving element 123 relatively clearing total charge and the total stroke count of clearing that described clearing request comprises and determine the transaction total charge that subelement 131 is determined and conclude the business always consistent than number with first respectively;
Second determines subelement 133, for determining clearing total charge that described clearing request comprises and the total stroke count of clearing at subelement 132 relatively respectively when first determines that transaction total charge that subelement 131 is determined and transaction are always consistent than number, determine that settlement process is successful.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, this program can be stored in a computer read/write memory medium, as: ROM/RAM, magnetic disc, CD etc.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.

Claims (16)

1. the offline transaction method based on point of sales terminal, is characterized in that, is provided with at least two log files in described point of sales terminal;
Described method comprises:
Point of sales terminal writes the transaction data of current transaction to monitor in the process of the first log file and meets when pre-conditioned, from described at least two log files, selection another log file except the first log file is as the second log file, the content of described the second log file is empty, and
The transaction data of current transaction is continued to be written in the second log file; And
The transaction data writing in described the first log file is sent to background server, and after the feedback message of the data that write, empty the transaction data that writes the first log file in receiving complete reception first log file of background server transmission;
Wherein, the described pre-conditioned following arbitrary pre-conditioned or pre-conditioned combination that comprises:
The residual memory space of the first log file is less than predetermined threshold; Or
Receive teletype command, or
Arrive predetermined timing length.
2. offline transaction method as claimed in claim 1, is characterized in that, described upper teletype command is the upper teletype command that background server sends, or the upper teletype command of user's input.
3. offline transaction method as claimed in claim 1, is characterized in that, described point of sales terminal sends to background server by the transaction data writing in described the first log file, specifically comprises:
Described point of sales terminal is encapsulated in the transaction data writing in the first log file in message; And
In described message, carry a batch sign, described batch is designated by registering, to process after the start of described point of sales terminal and obtains from described background server, and
The message that carries batch sign is sent to background server.
4. offline transaction method as claimed in claim 1, is characterized in that, also comprises:
While receiving tally order, described point of sales terminal is according to the dealing money comprising in the transaction data of the every transaction writing in the first log file, determines that transaction total charge that the transaction data that writes in the first log file is corresponding and transaction are always than number, and
After last time clearing and receive and sent to before described tally order transaction total charge sum that the transaction data that writes in transaction total charge that the transaction data of background server is corresponding and the first log file is corresponding as clearing total charge in the time period, using the total stroke count sum of transaction corresponding to the transaction data writing in the total stroke count of transaction corresponding to the transaction data that sends to background server and the first log file as the total stroke count of clearing;
The clearing request that carries the transaction data writing in the first log file, the clearing total charge of determining and settle accounts total stroke count is sent to background server;
And after receiving the corresponding clearing success response that background server sends, delete the transaction data writing in the first log file.
5. offline transaction method claimed in claim 4, is characterized in that, described point of sales terminal sends to background server by clearing request, specifically comprises:
Described point of sales terminal carries a batch sign in clearing requests, and described batch is designated by registering, to process after described point of sales terminal start and obtains from described background server, and
The clearing request of carrying batch sign is sent to background server.
6. the offline transaction method based on point of sales terminal based on the offline transaction method based on point of sales terminal claimed in claim 1, is characterized in that, comprising:
Background server receives transaction data the storage that described point of sales terminal is sent, and
Definite complete receiving after described transaction data, to the message of the complete reception data of described point of sales terminal feedback;
Background server receives after the clearing request that described point of sales terminal sends, and searches the transaction data that described point of sales terminal is sent after front lump-sum settlement; And
According to the transaction data finding and described clearing request, carry out settlement process, and
After settlement process success, to described point of sales terminal, send clearing success response.
7. offline transaction method as claimed in claim 6, is characterized in that, background server carries out settlement process, specifically comprises:
Background server is according to the transaction data comprising in clearing requests and the transaction data that finds, determines that transaction total charge that the transaction data that received after clearing last time is corresponding and transaction are always than number, and
When the clearing total charge comprising and the total stroke count of clearing are always consistent than number with the transaction total charge of determining and transaction respectively, determine that settlement process is successful in clearing requests.
8. the offline transaction method as described in claim 6 or 7, is characterized in that, described background server receives the transaction data that described point of sales terminal is sent, and specifically comprises:
Receive the message that comprises transaction data that described point of sales terminal is sent; And
From described message, obtain transaction data and batch sign;
The transaction data that storage gets and the corresponding relation of described batch of sign.
9. offline transaction method as claimed in claim 8, is characterized in that, described background server is searched the front lump-sum settlement transaction data that described point of sales terminal is sent afterwards, specifically comprises:
Background server obtains batch sign of carrying in clearing request, and
Using the corresponding batch sign of storage with in the clearing request getting, carry batch identify consistent transaction data as the transaction data finding.
10. offline transaction method as claimed in claim 6, is characterized in that, described background server, before receiving the transaction data that described point of sales terminal sends, also comprises:
When determining the uplink time that arrival is described point of sales terminal setting, to described point of sales terminal, send upper teletype command.
11. 1 kinds of point of sales terminals, is characterized in that, are provided with at least two log files in described point of sales terminal;
Described point of sales terminal comprises the first determining unit, writing unit, transmitting element and empties unit, wherein:
The first determining unit, for the process that the transaction data of current transaction is write to the first log file at writing unit, monitor and meet when pre-conditioned, using another log file except the first log file as the second log file, the content of described the second log file is empty; Wherein, the first determining unit specifically for: from described at least two log files, select another log file except the first log file as the second log file;
Writing unit, for continuing the transaction data of current transaction to be written to the second log file that the first determining unit is selected;
The first transmitting element, for determining after the second log file in the first determining unit unit, sends to background server by the transaction data writing in described the first log file;
Empty unit, after the feedback message of the data that send for complete reception the first transmitting element receiving background server transmission, empty the transaction data that writes the first log file;
Wherein, the described pre-conditioned following arbitrary pre-conditioned or pre-conditioned combination that comprises:
The residual memory space of the first log file is less than predetermined threshold; Or
Receive teletype command, or
Arrive predetermined timing length.
12. point of sales terminals as claimed in claim 11, is characterized in that, described the first transmitting element specifically comprises:
Encapsulation subelement, is encapsulated in message for the transaction data that the first log file is write;
Carry subelement, for the message obtaining in encapsulation subelement encapsulation, carry a batch sign, described batch is designated by registering, to process after described point of sales terminal start and obtains from described background server;
Send subelement, for sending to background server by carrying the message that has carried batch sign after subelement is processed.
13. point of sales terminals as claimed in claim 12, is characterized in that, also comprise:
Receiving element, for receiving tally order;
The second determining unit, while receiving tally order for receiving element, according to the dealing money comprising in the transaction data of the every transaction writing in the first log file, determine that transaction total charge that the transaction data that writes in the first log file is corresponding and transaction are always than number, and after settling accounts last time, and receive and in the time period, sent to before described tally order transaction total charge sum that the transaction data that writes in transaction total charge that the transaction data of background server is corresponding and the first log file is corresponding as clearing total charge, using the total stroke count sum of transaction corresponding to the transaction data writing in the total stroke count of transaction corresponding to the transaction data that sends to background server and the first log file as the total stroke count of clearing,
The second transmitting element, for sending to background server by carrying transaction data, the clearing total charge that the second determining unit is determined and the clearing request of settling accounts total stroke count that the first log file writes;
The transaction data writing in the first log file, also for after receiving the corresponding clearing success response that clearing request that background server sends according to the second transmitting element sends, is deleted in the described unit that empties.
The background server of 14. 1 kinds of point of sales terminals based on described in claim 11, is characterized in that, comprising:
The first receiving element, transaction data the storage of for receiving point of sales terminal, sending;
Feedback unit, for determining complete receiving after described transaction data, to described point of sales terminal feedback message;
The second receiving element, the clearing request of sending for receiving described point of sales terminal;
Search unit, for receiving after described clearing request at the second receiving element, search the front lump-sum settlement transaction data that described point of sales terminal is sent afterwards;
Settlement process unit, for receiving described clearing request according to searching transaction data and the second receiving element that unit finds, carries out settlement process;
Transmitting element, for after the success of settlement process unit settlement process, sends clearing success response to described point of sales terminal.
15. background servers as claimed in claim 14, is characterized in that, described settlement process unit specifically comprises:
First determines subelement, for receiving according to searching transaction data and the second receiving element that unit finds the transaction data that described clearing request comprises, determine transaction total charge that the transaction data that received after clearing last time is corresponding and transaction always than number;
Whether subelement relatively, receive for the second receiving element relatively clearing total charge and the total stroke count of clearing that described clearing request comprises and determine the transaction total charge that subelement is determined and conclude the business always consistent than number with first respectively;
Second determines subelement, for determining clearing total charge that described clearing request comprises and the total stroke count of clearing at subelement relatively respectively when first determines that transaction total charge that subelement is determined and transaction are always consistent than number, determines that settlement process is successful.
16. 1 kinds of offline transaction systems based on point of sales terminal, comprise point of sales terminal and background server, it is characterized in that, are provided with at least two log files in described point of sales terminal; Wherein:
Point of sales terminal, for the process that the transaction data of current transaction is write to the first log file, monitor and meet when pre-conditioned, from described at least two log files, selection another log file except the first log file is as the second log file, the content of described the second log file is empty, and the transaction data of current transaction is continued to be written in the second log file; And the transaction data writing in described the first log file is sent to background server, and after the feedback message of the data that write, empty the transaction data that writes the first log file in receiving complete reception first log file of background server transmission;
Background server, transaction data the storage of for receiving described point of sales terminal, sending, and definite complete receiving after described transaction data, to described point of sales terminal feedback message; Receive after the clearing request that described point of sales terminal sends, search the transaction data that described point of sales terminal is sent after front lump-sum settlement; According to the transaction data finding and described clearing request, carry out settlement process, and after settlement process success, to described point of sales terminal, send clearing success response;
Wherein, the described pre-conditioned following arbitrary pre-conditioned or pre-conditioned combination that comprises:
The residual memory space of the first log file is less than predetermined threshold; Or
Receive teletype command, or
Arrive predetermined timing length.
CN201010245377.5A 2010-08-04 2010-08-04 POS (Point of Sale) terminal-based off-line transaction method, POS terminal-based off-line transaction system and related devices Expired - Fee Related CN102346889B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010245377.5A CN102346889B (en) 2010-08-04 2010-08-04 POS (Point of Sale) terminal-based off-line transaction method, POS terminal-based off-line transaction system and related devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010245377.5A CN102346889B (en) 2010-08-04 2010-08-04 POS (Point of Sale) terminal-based off-line transaction method, POS terminal-based off-line transaction system and related devices

Publications (2)

Publication Number Publication Date
CN102346889A CN102346889A (en) 2012-02-08
CN102346889B true CN102346889B (en) 2014-04-30

Family

ID=45545540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010245377.5A Expired - Fee Related CN102346889B (en) 2010-08-04 2010-08-04 POS (Point of Sale) terminal-based off-line transaction method, POS terminal-based off-line transaction system and related devices

Country Status (1)

Country Link
CN (1) CN102346889B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312698B (en) * 2013-05-24 2016-02-24 成都秦川科技发展有限公司 Offline data validation method
CN110992017B (en) * 2019-11-07 2024-03-08 山东易通发展集团有限公司 Remote security wind control management method, system and storage medium for off-line prepaid card

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1417734A (en) * 2002-12-30 2003-05-14 邵苏毅 Method for implementation of electronic payment
TW200622773A (en) * 2004-12-31 2006-07-01 Inventec Corp Product delivering and packaging method and system
CN101404077A (en) * 2008-11-04 2009-04-08 侯万春 Remote payment system and method for associated affirmation of goods inspection and payment
CN101582084A (en) * 2009-06-03 2009-11-18 中兴通讯股份有限公司 Method and device for data storage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1417734A (en) * 2002-12-30 2003-05-14 邵苏毅 Method for implementation of electronic payment
TW200622773A (en) * 2004-12-31 2006-07-01 Inventec Corp Product delivering and packaging method and system
CN101404077A (en) * 2008-11-04 2009-04-08 侯万春 Remote payment system and method for associated affirmation of goods inspection and payment
CN101582084A (en) * 2009-06-03 2009-11-18 中兴通讯股份有限公司 Method and device for data storage

Also Published As

Publication number Publication date
CN102346889A (en) 2012-02-08

Similar Documents

Publication Publication Date Title
US7860790B2 (en) Systems and methods for automatic migration of a consumer between financial accounts
US11126996B2 (en) Settlement system, server device, terminal device, method and program
CN102663586A (en) Method for payment transaction completed through two mobile terminals
US20110125642A1 (en) Methods and systems for indirectly retrieving account data from data storage devices
US11188987B2 (en) System and method for providing a spend memory record
US20180060834A1 (en) Financial transaction routing
CN101587615A (en) Information integrated platform of traffic IC card and bank card
CN110084699A (en) Polymerization, device, transaction List Table system and the storage medium of transaction record
CN111292178B (en) Demand matching method and device, storage medium and electronic equipment
CN111897838A (en) Transaction query method and device, electronic equipment and readable storage medium thereof
CN109598603B (en) Account opening task processing method and account opening service system
WO2021066844A1 (en) Techniques for multi-tiered data storage in multi-tenant caching systems
CN102346889B (en) POS (Point of Sale) terminal-based off-line transaction method, POS terminal-based off-line transaction system and related devices
CN108629582A (en) Method for processing business and device
US10360640B2 (en) System and method for comprehensive sales and service event processing and reporting
CN111192113A (en) Order processing method, device, equipment and storage medium
WO2014049738A1 (en) Large-scale specifications transmission system, large-scale specifications transmission method, and server
CN113055401B (en) Enterprise business authorization processing method and device
KR101712020B1 (en) Apparatus and method for processing payment using virtual account
WO2017154142A1 (en) Cash transaction system and cash transaction method
JP7221927B2 (en) Information processing device, method and program
JP2017091213A (en) Database update processing system, and database update processing method
CN113222735A (en) Method for inquiring transaction associated information and related device
TWM591229U (en) Finance and trade connecting system
CN116777543A (en) Aggregate payment method and system supporting support and verification integration

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140430